nm

11353 Reputation

20 Badges

13 years, 20 days

MaplePrimes Activity


These are questions asked by nm

Why Maple returns -1/x as singular solution below when this solution can be obtained from the general solution when constant of integration is zero?

restart;

ode:=2*y(x)+2*x*y(x)^2+(2*x+2*x^2*y(x))*diff(y(x),x) = 0;
dsolve(ode,singsol=false);

2*y(x)+2*x*y(x)^2+(2*x+2*x^2*y(x))*(diff(y(x), x)) = 0

y(x) = (-1-_C1)/x, y(x) = (-1+_C1)/x

sol:=[dsolve(ode,singsol=essential)];

[y(x) = -1/x, y(x) = (-1-_C1)/x, y(x) = (-1+_C1)/x]

subs(_C1=0,sol)

[y(x) = -1/x, y(x) = -1/x, y(x) = -1/x]

 


Download essential.mw

We all know that Maple's Latex is not the best of Maple to say the least.

But this one is really strange. Maple prints a `1` for no apparant reason in the latex which makes it ugly. 

I wonder if Maplesoft still maintains its Latex conversion code at all?  So one can at least hope may be one day all of this will get fixed? Year after year, and Maple's Latex still not changed.  

If Mapesoft do not intend to make any changes in its Latex conversion software at all, it will be good if an official statement is made in this regards so that at least customers know.

sol:=dsolve((x-a)*(x-b)*diff(y(x),x)+k*(y(x)-a)*(y(x)-b) = 0,y(x)):
sol:=subs(_C1=C[1],sol);

y(x) = ((x-b)^(-k)*(x-a)^k*a*exp(a*k*C[1]-b*k*C[1])-(x-b)^(-k)*(x-a)^k*b*exp(a*k*C[1]-b*k*C[1])+b*((-x+b)/(-x+a))^(-k)*exp(a*k*C[1]-b*k*C[1])-b)/(-1+((-x+b)/(-x+a))^(-k)*exp(a*k*C[1]-b*k*C[1]))

latex(sol)

y \left( x \right) ={1 \left(  \left( x-b \right) ^{-k} \left( x-a
 \right) ^{k}a{{\rm e}^{akC_{{1}}-bkC_{{1}}}}- \left( x-b \right) ^{-k
} \left( x-a \right) ^{k}b{{\rm e}^{akC_{{1}}-bkC_{{1}}}}+b \left( {
\frac {-x+b}{-x+a}} \right) ^{-k}{{\rm e}^{akC_{{1}}-bkC_{{1}}}}-b

 \right)  \left( -1+ \left( {\frac {-x+b}{-x+a}} \right) ^{-k}{{\rm e}
^{akC_{{1}}-bkC_{{1}}}} \right) ^{-1}}

 

 

Download why_1_in_latex.mw

 

Why odetest sometimes fail to give 0  from odetest when simply using C[1] instead of _C1 as constant of integration?

I do not remember now if I asked about this before now. But for me as a user, this does not look right. I like to use C[1] instead of _C1 as the constant of integration as it looks better in Latex. I had no idea it will make a difference to odetest what the constant of integration symbol used is.

Is this a known issue? Do you consider this a bug? Maple 2019.1 on windows 10.

restart;

ode:= x^2*diff(y(x),x)+x*y(x)+sqrt(y(x)) = 0;

x^2*(diff(y(x), x))+x*y(x)+y(x)^(1/2) = 0

sol_1:=sqrt(y(x))=1/x+_C1/sqrt(x);
odetest(sol_1,ode)

y(x)^(1/2) = 1/x+_C1/x^(1/2)

0

sol_2:=subs(_C1=C[1],sol_1);
odetest(sol_2,ode); #why this now fails??

y(x)^(1/2) = 1/x+C[1]/x^(1/2)

-y(x)^(1/2)-y(x)^(1/2)*x^(1/2)*C[1]+x*y(x)

sol_3:=subs(C[1]=_C1,sol_2);
odetest(sol_3,ode)

y(x)^(1/2) = 1/x+_C1/x^(1/2)

0

 

Download why_odetest_fail.mw

A=B  but not able to simplify arctanh(A)-arctanh(B)  to be zero.  Why? Is there a workaround? Using Maple 2019.1

restart;

A:=((y*sqrt(3) + 3)*sqrt(3))/(6*sqrt(y^2 + 1));
B:=(y + sqrt(3))/(2*sqrt(y^2 + 1));
simplify(A-B)

(1/6)*(y*3^(1/2)+3)*3^(1/2)/(y^2+1)^(1/2)

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

0

simplify(arctanh(A)-arctanh(B))

arctanh((1/6)*(y*3^(1/2)+3)*3^(1/2)/(y^2+1)^(1/2))-arctanh((1/2)*(y+3^(1/2))/(y^2+1)^(1/2))

simplify(arctanh(A)-arctanh(B),trig)

arctanh((1/6)*(y*3^(1/2)+3)*3^(1/2)/(y^2+1)^(1/2))-arctanh((1/2)*(y+3^(1/2))/(y^2+1)^(1/2))

simplify(arctanh(A)-arctanh(B)) assuming positive

arctanh((1/6)*(y*3^(1/2)+3)*3^(1/2)/(y^2+1)^(1/2))-arctanh((1/2)*(y+3^(1/2))/(y^2+1)^(1/2))

simplify(arctanh(A)-arctanh(B),trig) assuming positive

arctanh((1/6)*(y*3^(1/2)+3)*3^(1/2)/(y^2+1)^(1/2))-arctanh((1/2)*(y+3^(1/2))/(y^2+1)^(1/2))

plot(arctanh(A),y=-Pi..Pi)

plot(arctanh(B),y=-Pi..Pi)

 

 

Download will_not_simplify.mw

Compare to Mathematica:

This for me seems strange. A first oder ODE of degree one of form   A+B*y'=0. Asking Maple for its classification, it gives exact AND rational.  After rewriting it in the form y'=f(x,y) , now Maple says it is rational only. It no longer recognize it as exact.

How could this be possible? It is the same ODE, just rewrittng differently.  Maple 2019.1 on windows.

restart;

Typesetting:-Settings(typesetprime=true):

ode:=2*x/y(x)-y(x)/(x^2+y(x)^2)+(-x^2/y(x)^2+x/(x^2+y(x)^2))*diff(y(x),x) = 0;
DEtools:-odeadvisor(ode);

2*x/y(x)-y(x)/(x^2+y(x)^2)+(-x^2/y(x)^2+x/(x^2+y(x)^2))*(diff(y(x), x)) = 0

[_exact, _rational]

dsolve(ode)

y(x) = x/tan(RootOf(-_Z+x*tan(_Z)+_C1))

new_ode:=convert(ode,D); #so I can solve for y'
RHS:=solve(new_ode,D(y)(x));

2*x/y(x)-y(x)/(x^2+y(x)^2)+(-x^2/y(x)^2+x/(x^2+y(x)^2))*(D(y))(x) = 0

(2*x^3+2*x*y(x)^2-y(x)^2)*y(x)/(x*(x^3+x*y(x)^2-y(x)^2))

new_ode:=diff(y(x),x)=RHS;
DEtools:-odeadvisor(new_ode);

diff(y(x), x) = (2*x^3+2*x*y(x)^2-y(x)^2)*y(x)/(x*(x^3+x*y(x)^2-y(x)^2))

[_rational]

dsolve(new_ode)

_C1-arctanh((-2/(x^4*(1/y(x)^2+(x-1)/x^3)))^(1/2)*x/((-2*x+2)/(x^3*(1/y(x)^2+(x-1)/x^3))+2)^(1/2))+((-2*x+2)/(x^3*(1/y(x)^2+(x-1)/x^3))+2)^(1/2)/(-2/(x^4*(1/y(x)^2+(x-1)/x^3)))^(1/2) = 0

 


 

Download why_type_changed.mw

First 134 135 136 137 138 139 140 Last Page 136 of 199