vv

13827 Reputation

20 Badges

9 years, 317 days

MaplePrimes Activity


These are replies submitted by vv

@toandhsp 

Here it is solve's fault:

solve([x2/(x2+x5) = a1, x3/(x2+x5) = a2, x5/(x2+x5) = a3], {x2, x3, x5});
                    {x2 = 0, x3 = 0, x5 = 0}

On the other side  the first n-1 parameters are supposed to be "independent"
which is not the case:  log[10](2) + log[10](5) = 1.
lnrel(log[10](2), log[10](3), log[10](150));  #works

 


 

 

 

The code looks to me as unnecessarily complicated, almost obfuscated.
Please compare with the similar general solution in the provided link.

@Preben Alsholm 


 

restart;

r:=solve([7/18-(1/2)*cos(15625*Pi*x)=0, 6/125<=x, x<=7/125],x,explicit, allsolutions);

Warning, returning only the first 100 solutions, increase _MaxSols to see more solutions

 

{x = (1/15625)*(750*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(752*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(754*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(756*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(758*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(760*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(762*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(764*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(766*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(768*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(770*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(772*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(774*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(776*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(778*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(780*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(782*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(784*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(786*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(788*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(790*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(792*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(794*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(796*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(798*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(800*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(802*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(804*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(806*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(808*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(810*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(812*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(814*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(816*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(818*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(820*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(822*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(824*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(826*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(828*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(830*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(832*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(834*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(836*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(838*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(840*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(842*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(844*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(846*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(848*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(850*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(852*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(854*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(856*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(858*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(860*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(862*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(864*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(866*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(868*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(870*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(872*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(874*Pi+arccos(7/9))/Pi}, {x = (1/15625)*(752*Pi-arccos(7/9))/Pi}, {x = (1/15625)*(754*Pi-arccos(7/9))/Pi}, {x = (1/15625)*(756*Pi-arccos(7/9))/Pi}, {x = (1/15625)*(758*Pi-arccos(7/9))/Pi}, {x = (1/15625)*(760*Pi-arccos(7/9))/Pi}, {x = (1/15625)*(762*Pi-arccos(7/9))/Pi}, {x = (1/15625)*(764*Pi-arccos(7/9))/Pi}, {x = (1/15625)*(766*Pi-arccos(7/9))/Pi}, {x = (1/15625)*(768*Pi-arccos(7/9))/Pi}, {x = (1/15625)*(770*Pi-arccos(7/9))/Pi}, {x = (1/15625)*(772*Pi-arccos(7/9))/Pi}, {x = (1/15625)*(774*Pi-arccos(7/9))/Pi}, {x = (1/15625)*(776*Pi-arccos(7/9))/Pi}, {x = (1/15625)*(778*Pi-arccos(7/9))/Pi}, {x = (1/15625)*(780*Pi-arccos(7/9))/Pi}, {x = (1/15625)*(782*Pi-arccos(7/9))/Pi}, {x = (1/15625)*(784*Pi-arccos(7/9))/Pi}, {x = (1/15625)*(786*Pi-arccos(7/9))/Pi}, {x = (1/15625)*(788*Pi-arccos(7/9))/Pi}, {x = (1/15625)*(790*Pi-arccos(7/9))/Pi}, {x = (1/15625)*(792*Pi-arccos(7/9))/Pi}, {x = (1/15625)*(794*Pi-arccos(7/9))/Pi}, {x = (1/15625)*(796*Pi-arccos(7/9))/Pi}, {x = (1/15625)*(798*Pi-arccos(7/9))/Pi}, {x = (1/15625)*(800*Pi-arccos(7/9))/Pi}, {x = (1/15625)*(802*Pi-arccos(7/9))/Pi}, {x = (1/15625)*(804*Pi-arccos(7/9))/Pi}, {x = (1/15625)*(806*Pi-arccos(7/9))/Pi}, {x = (1/15625)*(808*Pi-arccos(7/9))/Pi}, {x = (1/15625)*(810*Pi-arccos(7/9))/Pi}, {x = (1/15625)*(812*Pi-arccos(7/9))/Pi}, {x = (1/15625)*(814*Pi-arccos(7/9))/Pi}, {x = (1/15625)*(816*Pi-arccos(7/9))/Pi}, {x = (1/15625)*(818*Pi-arccos(7/9))/Pi}, {x = (1/15625)*(820*Pi-arccos(7/9))/Pi}, {x = (1/15625)*(822*Pi-arccos(7/9))/Pi}, {x = (1/15625)*(824*Pi-arccos(7/9))/Pi}

(1)

evalf(r);

{x = 0.4801384620e-1}, {x = 0.4814184621e-1}, {x = 0.4826984620e-1}, {x = 0.4839784620e-1}, {x = 0.4852584621e-1}, {x = 0.4865384620e-1}, {x = 0.4878184620e-1}, {x = 0.4890984621e-1}, {x = 0.4903784621e-1}, {x = 0.4916584620e-1}, {x = 0.4929384621e-1}, {x = 0.4942184621e-1}, {x = 0.4954984620e-1}, {x = 0.4967784621e-1}, {x = 0.4980584621e-1}, {x = 0.4993384620e-1}, {x = 0.5006184620e-1}, {x = 0.5018984621e-1}, {x = 0.5031784620e-1}, {x = 0.5044584620e-1}, {x = 0.5057384621e-1}, {x = 0.5070184621e-1}, {x = 0.5082984620e-1}, {x = 0.5095784621e-1}, {x = 0.5108584621e-1}, {x = 0.5121384620e-1}, {x = 0.5134184621e-1}, {x = 0.5146984621e-1}, {x = 0.5159784620e-1}, {x = 0.5172584620e-1}, {x = 0.5185384621e-1}, {x = 0.5198184620e-1}, {x = 0.5210984620e-1}, {x = 0.5223784621e-1}, {x = 0.5236584621e-1}, {x = 0.5249384620e-1}, {x = 0.5262184621e-1}, {x = 0.5274984621e-1}, {x = 0.5287784620e-1}, {x = 0.5300584621e-1}, {x = 0.5313384621e-1}, {x = 0.5326184620e-1}, {x = 0.5338984620e-1}, {x = 0.5351784621e-1}, {x = 0.5364584620e-1}, {x = 0.5377384620e-1}, {x = 0.5390184621e-1}, {x = 0.5402984621e-1}, {x = 0.5415784620e-1}, {x = 0.5428584621e-1}, {x = 0.5441384621e-1}, {x = 0.5454184620e-1}, {x = 0.5466984621e-1}, {x = 0.5479784621e-1}, {x = 0.5492584620e-1}, {x = 0.5505384620e-1}, {x = 0.5518184621e-1}, {x = 0.5530984620e-1}, {x = 0.5543784620e-1}, {x = 0.5556584621e-1}, {x = 0.5569384621e-1}, {x = 0.5582184620e-1}, {x = 0.5594984621e-1}, {x = 0.4811415380e-1}, {x = 0.4824215379e-1}, {x = 0.4837015379e-1}, {x = 0.4849815380e-1}, {x = 0.4862615379e-1}, {x = 0.4875415379e-1}, {x = 0.4888215380e-1}, {x = 0.4901015380e-1}, {x = 0.4913815379e-1}, {x = 0.4926615380e-1}, {x = 0.4939415380e-1}, {x = 0.4952215379e-1}, {x = 0.4965015380e-1}, {x = 0.4977815380e-1}, {x = 0.4990615379e-1}, {x = 0.5003415379e-1}, {x = 0.5016215380e-1}, {x = 0.5029015379e-1}, {x = 0.5041815379e-1}, {x = 0.5054615380e-1}, {x = 0.5067415380e-1}, {x = 0.5080215379e-1}, {x = 0.5093015380e-1}, {x = 0.5105815380e-1}, {x = 0.5118615379e-1}, {x = 0.5131415380e-1}, {x = 0.5144215380e-1}, {x = 0.5157015379e-1}, {x = 0.5169815379e-1}, {x = 0.5182615380e-1}, {x = 0.5195415379e-1}, {x = 0.5208215379e-1}, {x = 0.5221015380e-1}, {x = 0.5233815380e-1}, {x = 0.5246615379e-1}, {x = 0.5259415380e-1}, {x = 0.5272215380e-1}

(2)

 


 

 

@J4James 

691-694

@taro 

Actually remove expects the result of the procedure to be Boolean-"evaluable", i.e. creates a Boolen context.
This is not a problem because evalb(evalb(u)) = evalb(u).

@J4James 

See e.g.

Burden R.L.,Faires J.D. - Numerical Analysis, 9th Ed., Brooks/Cole 2011
(pseudocode provided, Maple oriented).

(probably) if one asks for a function f : N ^2 -> Z, defined in Maple by an expression having at most 5 characters such that a[i+1] = f(a[i], i).

The answer for f(x,y) is  2*x-y.  Proof?
[f is probably still unique if more characters are allowed, e.g. 7].

@rlopez 

 

@Preben Alsholm 

restart;
with(VectorCalculus);
int(1,[x=0..1,y=0..1]);

produces an error because VectorCalculus wants us to use:
int(1,[x,y]=Rectangle(0..1,0..1));
or
int(1,[x,y]=Region(0..1,0..1));

 

 

 

@taro 

Right click on the plot, choose Export in the context menu then "Encapsulated postscript".
You can also use:
p:=plot3d(x^2+y^2, x=-1..1,y=-1..1);
plottools:-exportplot("d:/temp/fig.eps",p); # choose an existent directory


In this case the plot is different but also wrong.

Not sure whether it's a bug or just a "generic" result.
Note that if n,p are numeric, the result is correct.

@gkokovidis 

In Maple 2016.1 ==> error

Please set

infolevel[int]:=5;

run it again and post the results.

This is indeed interesting; if the method is general enough you deserve congratulations!
Maybe you will show us the code or the algorithm.

@one man 

For a good simulation you will probably need to use ELO ratings, see

https://en.wikipedia.org/wiki/Elo_rating_system

and update the ratings after each game or competition.

See also http://www.mapleprimes.com/posts/204346-Eurocup-Simulation-In-Maple

@Mac Dude 

mseries works in your example, but as mentioned in the answer,  x=0  cannot be replaced with x.
In your example you must use:

map(vvmseries,TM,[x=0,xp=0,y=0,yp=0,dl=0,dp=0,dkQ1=0],3);

On the other side, iterated series does not always work;
An example:

restart;
(* Test case for mtaylor *)

vvmseries:=proc(f,X::list(name=anything),n::posint)
local t;
  eval( f, `=`~(lhs~(X), rhs~(X)+t*~(lhs~(X)-rhs~(X))) );
  eval(convert(series(%, t, n), polynom),t=1);
end proc:
mymseries:=proc(f,vars,norder)
      local i,fs:=f;
          for i from 1 to numelems(vars) do
              fs:=convert(series(fs,vars[-i],norder),polynom);
          end do;
          return fs;
end proc:

f:=(x+y)^x:
f1:=vvmseries(f,[x=0,y=0],5):
f2:=mymseries(f,[x,y],5):
eval([f,f1,f2],[x=0.0001, y=0.001]);

[.9993189875,  .9993189874,  .7786567398]

 

Best regards,

V.A.

[edited example]

@one man 

1. The only problem is that the thread is about parametrization of a surface and you insist in posting curves (animated or not).
Your curves are not bad, but their place is not here.

2. I do not have a general method. In your example:
(x1^2+x2^2-0.4)^2+(x3+sin(x1*x2+x3))^4-0.1=0;

a) start with a parametrization U(t), V(t) of the curve U^2 + V^4 - 0.1 = 0.
b) define g(v,w) as the unique root z of    z + sin(w + z) = v
     (In Maple it us a RootOf)
c) The parametrization is
     x := sqrt(U(t) + 0.4) * cos(u)
     y := sqrt(U(t) + 0.4) * sin(u)
     z := g(V(t), x*y).

 

First 130 131 132 133 134 135 136 Last Page 132 of 176