nm

11353 Reputation

20 Badges

13 years, 14 days

MaplePrimes Activity


These are questions asked by nm

 

Using t=0 .. 3*Pi the plot is truncated. Changing the 3*Pi to a number, then the full plot shows.

Also keeping 3*Pi but changing y=-1..1 to y=-1.01 .. 1.01 now the full plot shows again.

Is the above normal behaviour or it it a bug?


 

interface(version);

`Standard Worksheet Interface, Maple 2022.1, Windows 10, May 26 2022 Build ID 1619613`

restart;
ode := diff(y(t), t$2) + y(t)=0;
DEtools:-DEplot(ode, y(t), t=0 .. 3*Pi, y=-1 .. 1,[[y(0)=1,D(y)(0)=0]],linecolor=blue);

diff(diff(y(t), t), t)+y(t) = 0

#replacing 3*Pi by a number, then it shows the full plot
restart;
ode := diff(y(t), t$2) + y(t)=0;
DEtools:-DEplot(ode, y(t), t=0 .. 10, y=-1 .. 1,[[y(0)=1,D(y)(0)=0]],linecolor=blue);

diff(diff(y(t), t), t)+y(t) = 0

#keeping 3*Pi but changing the y range, it now also show the full plot
restart;
ode := diff(y(t), t$2) + y(t)=0;
DEtools:-DEplot(ode, y(t), t=0 .. 3*Pi, y=-1.01 .. 1.01,[[y(0)=1,D(y)(0)=0]],linecolor=blue);

diff(diff(y(t), t), t)+y(t) = 0

 


 

Download strange_result_of_DEplot.mw

 

Given two terms in expression of type  `+` where the first is rational and the second is not, I wanted to combine both under on common denominator to obtain one term (not `+` any more).

I expected that combine will do that.

restart;
expr:=A/B+C;
combine(expr);

But the above leaves the original expression as is. Ofcourse I can just do

numer(expr)/denom(expr);

Here is screen shot

My question is why combine does not do that automatically? For reference, Mathematica command Together is the equivalent to Maple combine and this is what it does

Which is what one would expect to happen. 

I am just trying to understand the logic why Maple's combine did not work as one would expect. That is all. I looked at help and tried different option to combine, but non worked.

Maple knows how to obtain differntials using D.

So typing  D(x*y) it gives   D(x)*y+x*D(y)

But what I want is given as input  D(x)*y+x*D(y) have Maple return back D(x*y)

Nothing I tried work. I tried simplify and convert(...,D) 

I am looking for a function that takes an expression with differentials like the above output, and return, if possible ONE differnetial in the form  D(  f(x,y) )

What I mean, given as INPUT any of these expressions on the RHS in the image below

To return back  the  D(...)  in the LHS above. I know Maple can do it going from the LHS to the RHS. But I want the other way around.

Does Maple support such operations?

Maple 2022.1

To Maple support,. 

fyi,

internal error generated on this ode when trying odetest
 

interface(version);

`Standard Worksheet Interface, Maple 2022.1, Windows 10, May 26 2022 Build ID 1619613`

restart;

ode:=x^3*diff(y(x),x$3)+x^2*diff(y(x),x$2)-3*x*diff(y(x),x)+(x-1)*y(x)=0;
sol:=dsolve(ode,y(x),'series',x=0):
odetest(sol,ode,'series','point'=0);

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

Error, (in odetest/series) complex argument to max/min: 1/4800*((-79*I+3*83^(1/2))*3^(1/2)+9*I*83^(1/2)-79)*(316+12*83^(1/2)*3^(1/2))^(2/3)+1/12*I*(316+12*83^(1/2)*3^(1/2))^(1/3)*3^(1/2)-1/12*(316+12*83^(1/2)*3^(1/2))^(1/3)+20/3


 

Download problem_odetest_july_23_2022.mw

 

Update 2 years later

FYI, This error is still not fixed in Maple 2024

restart;

interface(version);

`Standard Worksheet Interface, Maple 2024.1, Windows 10, June 25 2024 Build ID 1835466`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1793 and is the same as the version installed in this computer, created 2024, August 25, 9:6 hours Pacific Time.`

Order:=4;
ode:=x^2*diff(y(x),x$2)+x^2*diff(y(x),x)+y(x)=0;
maple_sol:=dsolve(ode,y(x),'series','point'=0);
odetest(maple_sol,ode,'series','point'=0);

4

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

y(x) = c__1*x^(1/2-((1/2)*I)*3^(1/2))*(series(1-((1/2-((1/2)*I)*3^(1/2))/((1/2-((1/2)*I)*3^(1/2))^2+3/2-((1/2)*I)*3^(1/2)))*x+((3/2-((1/2)*I)*3^(1/2))*(1/2-((1/2)*I)*3^(1/2))/(((1/2-((1/2)*I)*3^(1/2))^2+3/2-((1/2)*I)*3^(1/2))*((1/2-((1/2)*I)*3^(1/2))^2+9/2-((3/2)*I)*3^(1/2))))*x^2-((5/2-((1/2)*I)*3^(1/2))*(3/2-((1/2)*I)*3^(1/2))*(1/2-((1/2)*I)*3^(1/2))/(((1/2-((1/2)*I)*3^(1/2))^2+3/2-((1/2)*I)*3^(1/2))*((1/2-((1/2)*I)*3^(1/2))^2+9/2-((3/2)*I)*3^(1/2))*((1/2-((1/2)*I)*3^(1/2))^2+19/2-((5/2)*I)*3^(1/2))))*x^3+O(x^4),x,4))+c__2*x^(1/2+((1/2)*I)*3^(1/2))*(series(1-((1/2+((1/2)*I)*3^(1/2))/((1/2+((1/2)*I)*3^(1/2))^2+3/2+((1/2)*I)*3^(1/2)))*x+((3/2+((1/2)*I)*3^(1/2))*(1/2+((1/2)*I)*3^(1/2))/(((1/2+((1/2)*I)*3^(1/2))^2+3/2+((1/2)*I)*3^(1/2))*((1/2+((1/2)*I)*3^(1/2))^2+9/2+((3/2)*I)*3^(1/2))))*x^2-((5/2+((1/2)*I)*3^(1/2))*(3/2+((1/2)*I)*3^(1/2))*(1/2+((1/2)*I)*3^(1/2))/(((1/2+((1/2)*I)*3^(1/2))^2+3/2+((1/2)*I)*3^(1/2))*((1/2+((1/2)*I)*3^(1/2))^2+9/2+((3/2)*I)*3^(1/2))*((1/2+((1/2)*I)*3^(1/2))^2+19/2+((5/2)*I)*3^(1/2))))*x^3+O(x^4),x,4))

Error, (in odetest/series) complex argument to max/min: 9/2-1/2*I*3^(1/2)

 


 

Download odetest_error_series_august_2024.mw

 

Will check again in 2-3 years and I am sure this bug will still not be fixed.

 

What is the correct way to write the explicit solution before calling odetest to verify it on an ode? is it

   sol:= y(x)= the RHS  (1)

or

   sol:= y(x) - the RHS = 0 (2)

I am asking because Maple sometimes gives very different result from odetest depending on which form the explicit solution is written. It is very hard to keep trying different forms each time.  Here is an example below.

Maple 2022.1 on windows 10.   Is this a bug? I do not think it should  make a difference, but it does and I have no idea why. Is there an option or way to make sure the same result is obtained each time regardless how the explicit soltion is written?

I have a theory as to why this might happen: When using (1) odetest sees y(x) on the LHS on its own, and then uses odetest  code internally designed for explicit solution testing.

When using (2), it sees y(x) not on its own on the LHS and it assumes this is then an implicit solution and uses odetest code internally meant for implicit solution testing, hence the difference in output.
 

restart;

ode:=sqrt(y(x))+(1+x)*diff(y(x),x)=0:
ic:=y(0) = 1:
mysol:=y(x)=1/4*(ln(1+x)-2)^2:
odetest(mysol,ode);

csgn(ln(1+x)-2)*ln((1+x)^(1/2))-csgn(ln(1+x)-2)+ln((1+x)^(1/2))-1

odetest((lhs-rhs)(mysol) = 0,ode);

y(x)^(1/2)+(1/2)*ln(1+x)-1

 

 


 

Download why_different_result.mw

First 66 67 68 69 70 71 72 Last Page 68 of 199