nm

11353 Reputation

20 Badges

13 years, 12 days

MaplePrimes Activity


These are questions asked by nm

I was wondering if this is by design or not. Here is one example., This ode is solved by Maple 2023.2.1 on windows 10. The solution is in terms of DESol though. It takes less than one minute.

In Maple 2024 on same PC, dsolve hangs on it.

If this by design? Since DESol solution is not very useful actually. I was thinking that may be Maple is now trying to return a solution without DESol in it, and that is why it hangs or take long time. I stopped it after 5 minutes. 

Or should I report it to Maplesoft as possible bug?  

Below are 2 worksheets. One using Maple 2023 and one using 2024.

42444

interface(version);

`Standard Worksheet Interface, Maple 2023.2, Windows 10, November 24 2023 Build ID 1762575`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1684. The version installed in this computer is 1672 created 2024, February 7, 18:34 hours Pacific Time, found in the directory C:\Users\Owner\maple\toolbox\2023\Physics Updates\lib\`

ode:=(x + 1)*diff(u(x), x, x)/((x - 1)*cosh(1/(x - 1))) - (1/((x - 1)*cosh(1/(x - 1))) - (x + 1)/((x - 1)^2*cosh(1/(x - 1))) + (x + 1)*sinh(1/(x - 1))/((x - 1)^3*cosh(1/(x - 1))^2) + (-2*x^3 - 2*x^2)*(x + 1)/((x - 1)^2*cosh(1/(x - 1))^2))*diff(u(x), x) + (x + 1)^2*(x^5 + x^4 + 2*x^2*cosh(1/(x - 1)) - 2*x*cosh(1/(x - 1)) - x - 1)*u(x)/((x - 1)^3*cosh(1/(x - 1))^3);

(x+1)*(diff(diff(u(x), x), x))/((x-1)*cosh(1/(x-1)))-(1/((x-1)*cosh(1/(x-1)))-(x+1)/((x-1)^2*cosh(1/(x-1)))+(x+1)*sinh(1/(x-1))/((x-1)^3*cosh(1/(x-1))^2)+(-2*x^3-2*x^2)*(x+1)/((x-1)^2*cosh(1/(x-1))^2))*(diff(u(x), x))+(x+1)^2*(x^5+x^4+2*x^2*cosh(1/(x-1))-2*x*cosh(1/(x-1))-x-1)*u(x)/((x-1)^3*cosh(1/(x-1))^3)

DEtools:-odeadvisor(ode);

[[_2nd_order, _with_linear_symmetries]]

dsolve(ode); #after about 1 minute...

u(x) = DESol({diff(diff(_Y(x), x), x)-(1/((x-1)*cosh(1/(x-1)))-(x+1)/((x-1)^2*cosh(1/(x-1)))+(x+1)*sinh(1/(x-1))/((x-1)^3*cosh(1/(x-1))^2)+(-2*x^3-2*x^2)*(x+1)/((x-1)^2*cosh(1/(x-1))^2))*(x-1)*cosh(1/(x-1))*(diff(_Y(x), x))/(x+1)+(x+1)*(x^5+x^4+2*x^2*cosh(1/(x-1))-2*x*cosh(1/(x-1))-x-1)*_Y(x)/((x-1)^2*cosh(1/(x-1))^2)}, {_Y(x)})

 

 

Download dsolve_march_7_2024_maple_2023.mw


restart;

interface(version);

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

ode:=(x + 1)*diff(u(x), x, x)/((x - 1)*cosh(1/(x - 1))) - (1/((x - 1)*cosh(1/(x - 1))) - (x + 1)/((x - 1)^2*cosh(1/(x - 1))) + (x + 1)*sinh(1/(x - 1))/((x - 1)^3*cosh(1/(x - 1))^2) + (-2*x^3 - 2*x^2)*(x + 1)/((x - 1)^2*cosh(1/(x - 1))^2))*diff(u(x), x) + (x + 1)^2*(x^5 + x^4 + 2*x^2*cosh(1/(x - 1)) - 2*x*cosh(1/(x - 1)) - x - 1)*u(x)/((x - 1)^3*cosh(1/(x - 1))^3);

(x+1)*(diff(diff(u(x), x), x))/((x-1)*cosh(1/(x-1)))-(1/((x-1)*cosh(1/(x-1)))-(x+1)/((x-1)^2*cosh(1/(x-1)))+(x+1)*sinh(1/(x-1))/((x-1)^3*cosh(1/(x-1))^2)+(-2*x^3-2*x^2)*(x+1)/((x-1)^2*cosh(1/(x-1))^2))*(diff(u(x), x))+(x+1)^2*(x^5+x^4+2*x^2*cosh(1/(x-1))-2*x*cosh(1/(x-1))-x-1)*u(x)/((x-1)^3*cosh(1/(x-1))^3)

DEtools:-odeadvisor(ode);

[[_2nd_order, _with_linear_symmetries]]

dsolve(ode); #hangs

 

 

Download dsolve_march_7_2024_maple_2024.mw

chatGPT version used by the new NaturalLanguage package seems to be using chatGPT 3?. I asked it and this what it said

NL:=NaturalLanguage;
NL:-Query("what is your name?");
"As an Artificial Intelligence, I don't have a personal name. However, If 
you're asking how to represent the question \"What is your name?\" in MathML, 
it's actually irrelevant as MathML is used for marking up mathematical notations, 
not regular text or questions. \n\nBut in English, it's as simple 
as just asking \"What is your name?

Then I asked it 

NL:-Query("what version of chatGPT are you?");
"As an AI developed by OpenAI, I don't have a specific version like software 
programs or applications. I get continuous updates and improvements over time. 
However, as of my current operation, I'm based on GPT-3 model.

some questions: It is possible to make it use chatGPT 3.5 or 4.0 with NL?

How is this free to use and without getting a key from openAI? After agreeing to terms fromn the options menu, can one continue to use it for free? I thought chatGPT requires some fee to use. But I could be wrong.  but this is nice to be able to use it this easily from Maple!

Btw, It is still not very good in math. Asked it to first this simple first order ode and got wrong answer

NL:-Query("what is the solution to the differential equation y'(x)+y(x)=sin(x)");
"Sorry, this query was too complicated. Please rephrase and/or try again."

So I tried

NL:-Query("solve the differential equation y'(x)+y(x)=sin(x)");
"The differential equation given is a first order linear 

   ordinary differential equation. 

  

  The general solution can be obtained through the following 

   steps:

  

  1. Identify the homogeneous part of the equation, which is 

   y'(x) + y(x) = 0. The solution of such a homogeneous 

   equation known as the "complementary function" is y_c = 

   e^(-x) * A. where A is an arbitrary constant which will be 

   determined by a specific condition or boundary value.

  

  2. Find a Particular Integral (solution specific to the 

   nonhomogeneous part of the differential equation) which in 

   this case is y_p = -cos(x)

  

  3. Combine the Complementary function and Particular Integral 

   to get a general solution, y(x) = e^(-x) * A - cos(x).

  

  Now let's express the solution in MathML:"


                            (-x)          
                     y x = e     A - cos x

 "Note: Here A is a to-be-determined constant. If the problem 

    was a boundary value or initial value problem, you would 

    substitute the given values into this general solution and 

    solve it for A."


The solution should be

dsolve(diff(y(x),x)+y(x)=sin(x))

                y(x) = -cos(x)/2 + sin(x)/2 + exp(-x)*c__1

 

many times I have an expression with constant of integrations in it and need to integrate., So need to make sure to add a new constant of integration which is not already used.

Currently I do this

restart;
sol:=x-_C1*x+_C3*x^2;
myconstants:=indets(sol,And(symbol, suffixed(_C, nonnegint)));
map(X->String(X),myconstants);
map(X->X[3..],%);
map(X->:-parse(X),%);
n:=max(%);
new_constant:=_C||(n+1);

This make _C4 as the new constant. 

This assumes all constants have form _Cn which is what I use. It finds all _Cn's then converts each to string, then remove _C part from the string leaving the number, then find the maximum one and adds 1 to it to generate new constant to use,

Is there a better way to do this? Even though the above works, I have feeling there might be better way.

I was trying this ode with Maple

Do you agree this solution is not correct by Maple?

restart;

ode:=diff(y(t),t)+y(t)=Dirac(t);
ic:=y(0)=1;
sol:=dsolve([ode,ic],y(t),method='laplace');

It gives  y(t) = 2*exp(-t)

But from the discussion in the above link we see this is wrong solution. Maple also does not verify it:

odetest(sol,[ode,y(0)=1])

[-Dirac(t), -1]

Would this be considered a bug I should report or not? Note this result is only when using Laplace method. The default method gives better solution.

ode:=diff(y(t),t)+y(t)=Dirac(t);
ic:=y(0)=1;
sol:=dsolve([ode,ic],y(t));
odetest(sol,[ode,y(0)=1])

 

Maple 2023.2.1

Question deleted since it tagged duplicate. Will go search for the duplicate. I did not know there was duplicate one.

update

Here is original question. If moderator thinks it is duplicate feel free to delete. 

I would like to duplicate this simplification done in Mathematica, but in Maple. Mathematica will cancel the exponential term automatically if told the domain is real, but in Maple it willl not.

My attempts in Maple which all fail

restart;


ode := diff(v(x), x, x)*exp(x^2) = 0;
simplify(ode);
simplify(ode) assuming real; #there is no such type
simplify(ode) assuming x::positive;
simplify(ode,symbolic);
use RealDomain in simplify(ode) end use;

How to cancel the exponential term from the above equation in Maple?

First 37 38 39 40 41 42 43 Last Page 39 of 199