vv

13977 Reputation

20 Badges

10 years, 37 days

MaplePrimes Activity


These are replies submitted by vv

@janhardo 

If you apply what tomleslie said, you have nothing to learn, because Worksheet Mode + 1D-input is almost the same as Classic Maple (actually Classic Maple also had & has a 2D input). The disadvantage of the modern Worksheet Mode is that it starts slower and uses much more memory -- due to Java; but it's more flexible.

@Preben Alsholm 

restart;
local gamma;
beta:=1/6; gamma:=1; delta:=13/6;  # special case
 

gamma

 

1/6

 

1

 

13/6

(1)

##The system in the pdf-file. Right hand sides:
RHS:=[x*(1-x)-x*y,y*(delta-beta*y/x)-alpha*y/(gamma+y)];
ROsol:=solve(RHS=~0,{x,y});
RO:=op(indets(ROsol[2],specfunc(RootOf)));
E:=subs(ROsol[2],[x,y]);
 

[x*(1-x)-x*y, y*(13/6-(1/6)*y/x)-alpha*y/(1+y)]

 

{x = 1, y = 0}, {x = 1-RootOf(14*_Z^2+(-6*alpha+1)*_Z+6*alpha-13), y = RootOf(14*_Z^2+(-6*alpha+1)*_Z+6*alpha-13)}

 

RootOf(14*_Z^2+(-6*alpha+1)*_Z+6*alpha-13)

 

[1-RootOf(14*_Z^2+(-6*alpha+1)*_Z+6*alpha-13), RootOf(14*_Z^2+(-6*alpha+1)*_Z+6*alpha-13)]

(2)

x2y2,x3y3:=allvalues(E);

[29/28-(3/14)*alpha-(1/28)*(36*alpha^2-348*alpha+729)^(1/2), (3/14)*alpha-1/28+(1/28)*(36*alpha^2-348*alpha+729)^(1/2)], [29/28-(3/14)*alpha+(1/28)*(36*alpha^2-348*alpha+729)^(1/2), (3/14)*alpha-1/28-(1/28)*(36*alpha^2-348*alpha+729)^(1/2)]

(3)

da:=diff(E,alpha);
dxa,dya:=op(subs(RO=y,y=1-x,da));
J:=VectorCalculus:-Jacobian(RHS,[x,y]);
TR:=LinearAlgebra:-Trace(J);
 

da := [-(6*RootOf(14*_Z^2+(-6*alpha+1)*_Z+6*alpha-13)-6)/(28*RootOf(14*_Z^2+(-6*alpha+1)*_Z+6*alpha-13)-6*alpha+1), (6*RootOf(14*_Z^2+(-6*alpha+1)*_Z+6*alpha-13)-6)/(28*RootOf(14*_Z^2+(-6*alpha+1)*_Z+6*alpha-13)-6*alpha+1)]

 

dxa, dya := 6*x/(29-28*x-6*alpha), -6*x/(29-28*x-6*alpha)

 

Matrix(%id = 18446744074364419718)

 

19/6-2*x-y-(1/3)*y/x-alpha/(1+y)+alpha*y/(1+y)^2

(4)

TR0:=simplify(eval(TR, [x,y]=~x2y2));

(1/7)*((432*alpha^3+288*alpha^2-5508*alpha+1692)*(36*alpha^2-348*alpha+729)^(1/2)+2592*alpha^4-10800*alpha^3-45432*alpha^2+147708*alpha+45684)/((-29+6*alpha+(36*alpha^2-348*alpha+729)^(1/2))*(27+6*alpha+(36*alpha^2-348*alpha+729)^(1/2))^2)

(5)

alpha0:=solve(TR0); evalf(%);

-1/2+2*3^(1/2)

 

2.964101616

(6)

simplify(eval(diff(TR0,alpha), alpha=alpha0));

3/4

(7)

subs(x=x2y2[1], alpha=alpha0,  gamma*( (beta+delta)*x - beta )^2 / (alpha*x)^2):  
simplify(%); # the "obvious" fact: 3/4 <> 1/3

1/3

(8)

 

@Carl Love 

Thanks. I know and I have also used SolveTools:-SemiAlgebraic. Both could be better and faster.

Thank you for this info!
I see that the Risch algorithm works indeed better when the radicals are expressed as RootOfs, and even in older versions (e.g. Maple 2015). So, I wonder why the conversion is not automatic (at least as an option in int).

@nm 

It is a standard parametric plot. plot( [sin(t),sin(t),  t=0..420]); So, x = sin(t), y = sin(t), t in the interval [0,420].
 

Nice, vote-up.
Note that a geometric solution is much simpler:

1. An ellipse is the orthogonal projection of a circle.
2. A triangle inscribed in a circle has maximal area iff it is equilateral.
So, an animation is given by:

a:=4: b:=sqrt(3): B:=plot([a*cos(t),b*sin(t), t=0..2*Pi], scaling=constrained):
plots:-animate(plot,[[seq([a*cos(t+2*k*Pi/3),b*sin(t+2*k*Pi/3)], k=0..3)]],t=0..2*Pi, background=B)

 

 

@Carl Love 

I know, but for small x (otherwise ln1 is useless) even series is much better than calling ln.

@Carl Love 

My point is that evalf/ln1 should use a special algorithm for ln(1+x) (e.g. via series) being so much faster. BTW, Digits=64 in ln1 is enough for OP's example.

@Carl Love 

Note that this way in OP's example the procedure evalf/ln1 uses Digits=91 (!). So, what it does is:

evalf[32](evalf[91](ln(1+exp(-64))));

All these symbols are defined here: https://en.wikipedia.org/wiki/List_of_mathematical_symbols

It's a matter of preferences and definitions/notations, rather than ambiguity. Even N could represent {0,1,...} or {1,2,...}, but the exact definition is clear from the context, or reminded in the case of a serious textbook or article.

@Carl Love 

It is unfortunate that they are not documented.

restart;
f := x -> sin(2*x)+3;
g := x -> sin(3*x)+6;
a:=0; b:=5;
plots:-animate(plot3d,
[ [ [a+t*(b-a), f(a+t*(b-a))*cos(u), f(a+t*(b-a))*sin(u)], 
    [a+t*(b-a), g(a+t*(b-a))*cos(u), g(a+t*(b-a))*sin(u)],
    [a, (f(a)+t*(g(a)-f(a)))*cos(u), (f(a)+t*(g(a)-f(a)))*sin(u)],
    [b, (f(b)+t*(g(b)-f(b)))*cos(u), (f(b)+t*(g(b)-f(b)))*sin(u)]
  ], 
t=0..1, u=0..U, transparency=0.3, grid=[40, max(2,floor(7*U))]
],  U = 0..2*Pi, axes=none,  paraminfo=false);

@Carl Love 

Please note that I have mentioned the sfloat->hfloat->sfloat conversion from the beginning. My impression was that the OP obtained the result in a evalhf environment and it was distorted. But now I see that he used a higher precision and wants to save the result as hfloat. For this of course it's enough to save it as float[8] without any evalhf or option hfloat.

@AOdrzywolek 

You are wrong here. It is proved mathematically that a long double can be exactly retrived (each of its 64 bits) using 18 decimal digits (it is irrelevant how it was obtained). [ The fact that to obtain n correct digits with a math function you may need Digits>n is quite another thing: after the computation you save evalf[18](result) ].

@AOdrzywolek 

You can use Digits=18. Then it seems the bug does not occur. But for portability, Carl's advise for ASCII is a better solution (even if the file could be up to 3 times bigger).

First 47 48 49 50 51 52 53 Last Page 49 of 177