nm

10239 Reputation

19 Badges

12 years, 151 days

MaplePrimes Activity


These are questions asked by nm

We see that this ode (x + y(x))*(1+diff(y(x),x)) = 0  has 2 solutions, One when (x + y(x))=0 and one when (1+diff(y(x),x))=0. Maple gives 3 solutions. They are correct but why?

Also when changing (1+diff(y(x),x)) to (a+diff(y(x),x)) now it gives only two solution.

Why does this happen? Should it not just return 2 solutions in both cases? and more strange one

(x + y(x))^2 *(1+diff(y(x), x))=0; now it gives 4 solutions. But this is no different. We also have 2 solutions. One when (x + y(x))=0 and one when (1+diff(y(x), x))=0. This time the extra two solutions are complex. 

17168

interface(version);

`Standard Worksheet Interface, Maple 2024.0, Windows 10, March 01 2024 Build ID 1794891`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1754 and is the same as the version installed in this computer, created 2024, June 3, 20:39 hours Pacific Time.`

ode:=(x + y(x))*(a+diff(y(x),x)) = 0;
dsolve(ode);
map(X->odetest(X,ode),[%])

(x+y(x))*(a+diff(y(x), x)) = 0

y(x) = -x, y(x) = -a*x+c__1

[0, 0]

ode:=(x + y(x))*(1+diff(y(x),x)) = 0;
dsolve(ode);
map(X->odetest(X,ode),[%])

(x+y(x))*(1+diff(y(x), x)) = 0

y(x) = -x, y(x) = -x-c__1, y(x) = -x+c__1

[0, 0, 0]

ode:= (x + y(x))^2 *(1+diff(y(x), x))=0;
dsolve(ode);
map(X->odetest(X,ode),[%])

 

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

y(x) = -x, y(x) = -x+c__1, y(x) = -(1/2)*c__1-((1/2)*I)*3^(1/2)*c__1-x, y(x) = -(1/2)*c__1+((1/2)*I)*3^(1/2)*c__1-x

[0, 0, 0, 0]

 

 

Download why_extra_solution_from_dsolve_june_5_2024.mw

Any idea why this sometimes happens? odeadvisor says ode is quadrature but when asking it to solve it using quadrature sometimes it works and sometimes not.

Am I doing something wrong?

22020

interface(version);

`Standard Worksheet Interface, Maple 2024.0, Windows 10, March 01 2024 Build ID 1794891`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1754 and is the same as the version installed in this computer, created 2024, June 3, 20:39 hours Pacific Time.`

restart;

18368

Example 1 that does not work

 

ode:=diff(y(x),x)=-1;
DEtools:-odeadvisor(ode);

diff(y(x), x) = -1

[_quadrature]

sol:=dsolve(ode,y(x),['quadrature']);

"sol := "

Example 2 that works

 

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

diff(y(x), x) = x

[_quadrature]

sol:=dsolve(ode,y(x),['quadrature']);

y(x) = (1/2)*x^2+c__1

 

 

Download sometimes_dsolve_works_on_quadrature_june_5_2024.mw

Any one could find why Maple 2024 gives Error, (in evalf/int) invalid arguments on this ode? Why is it even calling evalf in first place as this is all symbolic.

Also reported to Maplesof just in case.

25504

restart;

25504

interface(version);

`Standard Worksheet Interface, Maple 2024.0, Windows 10, March 01 2024 Build ID 1794891`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1752 and is the same as the version installed in this computer, created 2024, May 31, 18:17 hours Pacific Time.`

ode:=diff(y(x), x)^3 = (x - 2)^2;
ic:=y(2)=1;
Student:-ODEs:-ODESteps([ode,ic]);

(diff(y(x), x))^3 = (x-2)^2

y(2) = 1

Error, (in evalf/int) invalid arguments

dsolve([ode,ic])

y(x) = 1+(1/5)*(3*x-6)*RootOf(_Z^3-x^2+4*x-4)

DEtools:-odeadvisor(ode)

[_quadrature]

 

 

Download odetest_internal_error_evalf_int_june_3_2024.mw

I wanted to do 

map(X->odetest(X,ode) assuming x>0,[sol]) 

where sol are the solutions I wanted to test. The above does not work as is. After some trial and errors, I found this works

map(X->[odetest(X,ode) assuming x>0],[sol]) 

I am not sure why. But it works. Is this the above the correct way to add assuming to a command inside Map? Or is there a different way or better way to do this?

I want to stick to the map command as above and nothing else such as ~ or some other ones. I find map more clear to use for me.

Here is worksheet.

9592

restart;

9592

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

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

sol:=dsolve(ode);
map(X->[odetest(X,ode) assuming x>0],[sol])

y(x) = ((1/32)*I)*2^(1/2)*(-(256/3)*Pi^(1/2)*2^(1/2)*x^3*cosh((3/2)*arcsinh(2*x))-8*Pi^(1/2)*2^(1/2)*(-(64/3)*x^4-(8/3)*x^2+2/3)*sinh((3/2)*arcsinh(2*x))/(4*x^2+1)^(1/2))/Pi^(1/2)+c__1, y(x) = -((1/32)*I)*2^(1/2)*(-(256/3)*Pi^(1/2)*2^(1/2)*x^3*cosh((3/2)*arcsinh(2*x))-8*Pi^(1/2)*2^(1/2)*(-(64/3)*x^4-(8/3)*x^2+2/3)*sinh((3/2)*arcsinh(2*x))/(4*x^2+1)^(1/2))/Pi^(1/2)+c__1, y(x) = Int(-(1/2)*(-2+2*(4*x^2+1)^(1/2))^(1/2), x)+c__1, y(x) = Int((1/2)*(-2+2*(4*x^2+1)^(1/2))^(1/2), x)+c__1

[[(1/2)*(2*x*(4*x^2+1)^(1/2)+(-8*x^2*cosh((3/2)*arcsinh(2*x))*(4*x^2+1)^(1/2)+16*x^3*sinh((3/2)*arcsinh(2*x))-cosh((3/2)*arcsinh(2*x))*(4*x^2+1)^(1/2)+4*sinh((3/2)*arcsinh(2*x))*x)*(-2+2*(4*x^2+1)^(1/2))^(1/2))/(4*x^2+1)^(1/2)], [-(1/2)*(-2*x*(4*x^2+1)^(1/2)+(-8*x^2*cosh((3/2)*arcsinh(2*x))*(4*x^2+1)^(1/2)+16*x^3*sinh((3/2)*arcsinh(2*x))-cosh((3/2)*arcsinh(2*x))*(4*x^2+1)^(1/2)+4*sinh((3/2)*arcsinh(2*x))*x)*(-2+2*(4*x^2+1)^(1/2))^(1/2))/(4*x^2+1)^(1/2)], [2*x], [0]]

for item in [sol] do
    odetest(item,ode) assuming x>0;
od;

(1/2)*(2*x*(4*x^2+1)^(1/2)+(-8*x^2*cosh((3/2)*arcsinh(2*x))*(4*x^2+1)^(1/2)+16*x^3*sinh((3/2)*arcsinh(2*x))-cosh((3/2)*arcsinh(2*x))*(4*x^2+1)^(1/2)+4*sinh((3/2)*arcsinh(2*x))*x)*(-2+2*(4*x^2+1)^(1/2))^(1/2))/(4*x^2+1)^(1/2)

-(1/2)*(-2*x*(4*x^2+1)^(1/2)+(-8*x^2*cosh((3/2)*arcsinh(2*x))*(4*x^2+1)^(1/2)+16*x^3*sinh((3/2)*arcsinh(2*x))-cosh((3/2)*arcsinh(2*x))*(4*x^2+1)^(1/2)+4*sinh((3/2)*arcsinh(2*x))*x)*(-2+2*(4*x^2+1)^(1/2))^(1/2))/(4*x^2+1)^(1/2)

2*x

0

 

 

Download how_to_use_map_with_assuming.mw

These  are good example(s)  why I think Maple's simplify needs to be improved. 

Example 1

Given an expression which is zero for nonnegative x, one would expect simplify to simplify it to zero when told that x is positive. 

But nothing I tried with simplify worked. combine  figured it out.

But why? Is this not the job of simplify? 

The expression is 

e:=x-1/4*(-2+2*(4*x^2+1)^(1/2))^(1/2)*(2+2*(4*x^2+1)^(1/2))^(1/2);

Here is worksheet

``

interface(version);

`Standard Worksheet Interface, Maple 2024.0, Windows 10, March 01 2024 Build ID 1794891`

restart;

28000

e:=x-1/4*(-2+2*(4*x^2+1)^(1/2))^(1/2)*(2+2*(4*x^2+1)^(1/2))^(1/2);

x-(1/4)*(-2+2*(4*x^2+1)^(1/2))^(1/2)*(2+2*(4*x^2+1)^(1/2))^(1/2)

coulditbe(e=0);

true

#we see it is zero for x>=0
plot(e,x=-3..3)

simplify(e) assuming x>=0;

x-(1/4)*(-2+2*(4*x^2+1)^(1/2))^(1/2)*(2+2*(4*x^2+1)^(1/2))^(1/2)

simplify(e,size) assuming x>=0;

x-(1/4)*(-2+2*(4*x^2+1)^(1/2))^(1/2)*(2+2*(4*x^2+1)^(1/2))^(1/2)

expand(e) assuming x>=0;

x-(1/4)*(-2+2*(4*x^2+1)^(1/2))^(1/2)*(2+2*(4*x^2+1)^(1/2))^(1/2)

simplify(e,sqrt) assuming x>=0;

x-(1/4)*(-2+2*(4*x^2+1)^(1/2))^(1/2)*(2+2*(4*x^2+1)^(1/2))^(1/2)

simplify(e,symbolic) assuming x>=0;

x-(1/4)*(-2+2*(4*x^2+1)^(1/2))^(1/2)*(2+2*(4*x^2+1)^(1/2))^(1/2)

combine(e) assuming x>=0;

0


Compare some other software on this same problem

It should be as simple as the above in Maple.

A user should not have to try 100 different commands in Maple to find which works.

simplify should have done it in first place. What Am I overlooking here?

Maple 2024

Download why_simplify_do_not_work_example.mw

EXAMPLE 2

In this example the expression is zero for x<0. Here nothing worked for me. This is challenge for Maple experts here to find the command to simplify this to zero. 

I know it is zero for x<0.

e := -1/2*(-2*x*sqrt(4*x^2 + 1) + (16*x^3*sinh(3/2*arcsinh(2*x)) - 8*x^2*cosh(3/2*arcsinh(2*x))*sqrt(4*x^2 + 1) + 4*sinh(3/2*arcsinh(2*x))*x - cosh(3/2*arcsinh(2*x))*sqrt(4*x^2 + 1))*sqrt(-2 + 2*sqrt(4*x^2 + 1)))/sqrt(4*x^2 + 1)


 

24064

interface(version);

`Standard Worksheet Interface, Maple 2024.0, Windows 10, March 01 2024 Build ID 1794891`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1752 and is the same as the version installed in this computer, created 2024, May 31, 18:17 hours Pacific Time.`

e:=-1/2*(-2*x*sqrt(4*x^2 + 1) + (16*x^3*sinh(3/2*arcsinh(2*x)) - 8*x^2*cosh(3/2*arcsinh(2*x))*sqrt(4*x^2 + 1) + 4*sinh(3/2*arcsinh(2*x))*x - cosh(3/2*arcsinh(2*x))*sqrt(4*x^2 + 1))*sqrt(-2 + 2*sqrt(4*x^2 + 1)))/sqrt(4*x^2 + 1);

-(1/2)*(-2*x*(4*x^2+1)^(1/2)+(16*x^3*sinh((3/2)*arcsinh(2*x))-8*x^2*cosh((3/2)*arcsinh(2*x))*(4*x^2+1)^(1/2)+4*sinh((3/2)*arcsinh(2*x))*x-cosh((3/2)*arcsinh(2*x))*(4*x^2+1)^(1/2))*(-2+2*(4*x^2+1)^(1/2))^(1/2))/(4*x^2+1)^(1/2)

plot(e,x=-10..3);

coulditbe(e=0)

true

simplify(e) assuming x<0;

-8*((cosh((3/2)*arcsinh(2*x))*(-(1/2)*x^2-1/16)*(4*x^2+1)^(1/2)+sinh((3/2)*arcsinh(2*x))*x*(x^2+1/4))*(-2+2*(4*x^2+1)^(1/2))^(1/2)-(1/8)*x*(4*x^2+1)^(1/2))/(4*x^2+1)^(1/2)

simplify(e,symbolic) assuming x<0;

-8*((cosh((3/2)*arcsinh(2*x))*(-(1/2)*x^2-1/16)*(4*x^2+1)^(1/2)+sinh((3/2)*arcsinh(2*x))*x*(x^2+1/4))*(-2+2*(4*x^2+1)^(1/2))^(1/2)-(1/8)*x*(4*x^2+1)^(1/2))/(4*x^2+1)^(1/2)

combine(e) assuming x<0;

-(1/2)*(-2*x*(4*x^2+1)^(1/2)+(16*x^3*sinh((3/2)*arcsinh(2*x))-8*x^2*cosh((3/2)*arcsinh(2*x))*(4*x^2+1)^(1/2)+4*sinh((3/2)*arcsinh(2*x))*x-cosh((3/2)*arcsinh(2*x))*(4*x^2+1)^(1/2))*(-2+2*(4*x^2+1)^(1/2))^(1/2))/(4*x^2+1)^(1/2)

simplify(e,arctrig) assuming x<0;

-8*((cosh((3/2)*arcsinh(2*x))*(-(1/2)*x^2-1/16)*(4*x^2+1)^(1/2)+sinh((3/2)*arcsinh(2*x))*x*(x^2+1/4))*(-2+2*(4*x^2+1)^(1/2))^(1/2)-(1/8)*x*(4*x^2+1)^(1/2))/(4*x^2+1)^(1/2)

simplify(e,sqrt) assuming x<0;

-8*((cosh((3/2)*arcsinh(2*x))*(-(1/2)*x^2-1/16)*(4*x^2+1)^(1/2)+sinh((3/2)*arcsinh(2*x))*x*(x^2+1/4))*(-2+2*(4*x^2+1)^(1/2))^(1/2)-(1/8)*x*(4*x^2+1)^(1/2))/(4*x^2+1)^(1/2)

simplify(normal(e),sqrt) assuming x<0;

-8*((cosh((3/2)*arcsinh(2*x))*(-(1/2)*x^2-1/16)*(4*x^2+1)^(1/2)+sinh((3/2)*arcsinh(2*x))*x*(x^2+1/4))*(-2+2*(4*x^2+1)^(1/2))^(1/2)-(1/8)*x*(4*x^2+1)^(1/2))/(4*x^2+1)^(1/2)

simplify(normal(e, expanded)) assuming x<0;

-8*((cosh((3/2)*arcsinh(2*x))*(-(1/2)*x^2-1/16)*(4*x^2+1)^(1/2)+sinh((3/2)*arcsinh(2*x))*x*(x^2+1/4))*(-2+2*(4*x^2+1)^(1/2))^(1/2)-(1/8)*x*(4*x^2+1)^(1/2))/(4*x^2+1)^(1/2)

simplify(radnormal(e)) assuming x<0;

(1/8)*((4*x^2+(4*x^2+1)^(1/2)+1)*(-2+2*(4*x^2+1)^(1/2))-64*x*((1/2)*cosh((3/2)*arcsinh(2*x))*(-1/8-x^2)*(4*x^2+1)^(1/2)+sinh((3/2)*arcsinh(2*x))*x*(x^2+1/4))*(-2+2*(4*x^2+1)^(1/2))^(1/2))/((4*x^2+1)^(1/2)*x)

simplify(evala(e)) assuming x<0;

-8*((cosh((3/2)*arcsinh(2*x))*(-(1/2)*x^2-1/16)*(4*x^2+1)^(1/2)+sinh((3/2)*arcsinh(2*x))*x*(x^2+1/4))*(-2+2*(4*x^2+1)^(1/2))^(1/2)-(1/8)*x*(4*x^2+1)^(1/2))/(4*x^2+1)^(1/2)

 


Using some other software gives

I'd like to find command to do the same in Maple. i.e. simplify it to zero. What else to try?

 

Download why_simplify_do_not_work_example_2.mw

First 16 17 18 19 20 21 22 Last Page 18 of 186