MaplePrimes Questions

This is first order ode with IC. Solving it by Maple, then odetest verifies the Maple solution against the ode and the IC.

I solved it myself and got solution, which Maple says is same as its solution but my solution is written little different. Using simplify Maple says both solutions are same.

But I am not able to get zero when using odetest on my solution. No matter what I tried. I tried the tricks I know from before and from earlier questions/answers, but none of them worked on this one. So I have no idea what to try now.

It is clearly has something to do about how it is written. Even though it is  mathematically equivalent  to Maple's.

Would someone be able to find out why that is, and what trick is needed to make odetest verify my solution?

Since Maple says they are same, then odetest should give zero for my solution also.  odetest verifies my solution is correct only against the IC, but not against the ode itself. I did not show the output of odetest below since they are very very large.

Attached worksheet.

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 1792 and is the same as the version installed in this computer, created 2024, August 22, 12:6 hours Pacific Time.`

libname;

"C:\Users\Owner\maple\toolbox\2024\Physics Updates\lib", "C:\Program Files\Maple 2024\lib"

restart;

ode:=3*x - y(x) + 1 + (x - 3*y(x) - 5)*diff(y(x), x) = 0;
IC:=y(0) = 0;

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

y(0) = 0

maple_sol:=dsolve([ode,IC],[dAlembert],implicit):
maple_sol:=simplify(%);
odetest(maple_sol,[ode,IC]);

3*(x+1)*((2/3)*((x+y(x)+3)/(-x+3*y(x)+5))^(2/3)*(x-3*y(x)-5)*((-4*x+4*y(x)+4)/(x-3*y(x)-5))^(1/3)+I*3^(1/6)*2^(2/3)+(1/3)*6^(2/3))/(((x+y(x)+3)/(-x+3*y(x)+5))^(2/3)*((-4*x+4*y(x)+4)/(x-3*y(x)-5))^(1/3)*(2*x-6*y(x)-10)) = 0

[0, 0]

my_sol:=x + 2^(1/3)*(2^(2/3)*((y(x) + x + 3)/(-x + 3*y(x) + 5))^(2/3)*(x - 3*y(x) - 5)*((4*y(x) - 4*x + 4)/(x - 3*y(x) - 5))^(1/3) + 2^(2/3)*3^(2/3)*(-4)^(1/3)*(x + 1))/(((4*y(x) - 4*x + 4)/(x - 3*y(x) - 5))^(1/3)*((y(x) + x + 3)/(-x + 3*y(x) + 5))^(2/3)*(2*x - 6*y(x) - 10)) = 0;

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

#this shows my solution and Maple are same mathematically the same
simplify(lhs(maple_sol)-lhs(my_sol));

0

simplify(maple_sol-my_sol);

0 = 0

#but can't get odetest to give zero to my solution. Why?
the_residual:=odetest(my_sol,[ode,IC]):
evalb(the_residual=0);

false

evalb(simplify(the_residual)=0);

false

odetest(normal(my_sol),[ode,IC]): #did not work. Not zero. very long result

odetest(radnormal(my_sol),[ode,IC]): #did not work. Not zero. very long result

odetest(combine(my_sol),[ode,IC]): #did not work. Not zero. very long result

odetest(evala(my_sol),[ode,IC]): #did not work. Not zero. very long result

odetest(my_sol,[ode,IC]) assuming real: #did not work. Not zero. very long result

odetest(my_sol,[ode,IC]) assuming x>0: #did not work. Not zero. very long result

odetest(my_sol,[ode,IC]) assuming x<0: #did not work. Not zero. very long result

odetest(expand(my_sol),[ode,IC]): #did not work. Not zero. very long result

 


 

Download unable_to_get_odetest_to_verify_same_solution_august_23_2024.mw

I've modified my call to coulditbe() to always use assuming real to prevent false positives.

Now I find it gives internal error Error, (in type/complex) too many levels of recursion which can not even be trapped when the thing I am checking happened to have complex I in it. (This is done in code).

So I modied the code to only do this check if there is no complex in the expression being checked.

But I think Maple should not generate such error in first place. This indicates some internal problem in Maple, correct?

Here is worksheet. (ps. updated, wrong worksheet for somereason was uploaded).

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 1792 and is the same as the version installed in this computer, created 2024, August 22, 12:6 hours Pacific Time.`

libname;

"C:\Users\Owner\maple\toolbox\2024\Physics Updates\lib", "C:\Program Files\Maple 2024\lib"

the_residual:=-1/4*I*x^(1/2)/(8*x^(3/2)+12*c__1)^(1/3)*(-(8*x^(3/2)+12*c__1)^(2/3)-I*(8*x^(3/2)+12*c__1)^(2/3)*3^(1/2))^(1/2)*6^(1/2)-1/4*x^(1/2)/(8*x^(3/2)+12*c__1)^(1/3)*2^(1/2)*(-(8*x^(3/2)+12*c__1)^(2/3)-I*(8*x^(3/2)+12*c__1)^(2/3)*3^(1/2))^(1/2)-x^(1/2);
try
    coulditbe(the_residual=0) assuming real;
catch:
   print("error");
end try;

-((1/4)*I)*x^(1/2)*(-(8*x^(3/2)+12*c__1)^(2/3)-I*(8*x^(3/2)+12*c__1)^(2/3)*3^(1/2))^(1/2)*6^(1/2)/(8*x^(3/2)+12*c__1)^(1/3)-(1/4)*x^(1/2)*2^(1/2)*(-(8*x^(3/2)+12*c__1)^(2/3)-I*(8*x^(3/2)+12*c__1)^(2/3)*3^(1/2))^(1/2)/(8*x^(3/2)+12*c__1)^(1/3)-x^(1/2)

Error, (in type/complex) too many levels of recursion

the_residual:=-1/4*I*x^(1/2)/(8*x^(3/2)+12*c__1)^(1/3)*(-(8*x^(3/2)+12*c__1)^(2/3)-I*(8*x^(3/2)+12*c__1)^(2/3)*3^(1/2))^(1/2)*6^(1/2)-1/4*x^(1/2)/(8*x^(3/2)+12*c__1)^(1/3)*2^(1/2)*(-(8*x^(3/2)+12*c__1)^(2/3)-I*(8*x^(3/2)+12*c__1)^(2/3)*3^(1/2))^(1/2)-x^(1/2);
try
    if not has(the_residual,I) then
       coulditbe(the_residual=0) assuming real;
    else
       print("by passing, since residual is complex");
    fi;
catch:
   print("error");
end try;

-((1/4)*I)*x^(1/2)*(-(8*x^(3/2)+12*c__1)^(2/3)-I*(8*x^(3/2)+12*c__1)^(2/3)*3^(1/2))^(1/2)*6^(1/2)/(8*x^(3/2)+12*c__1)^(1/3)-(1/4)*x^(1/2)*2^(1/2)*(-(8*x^(3/2)+12*c__1)^(2/3)-I*(8*x^(3/2)+12*c__1)^(2/3)*3^(1/2))^(1/2)/(8*x^(3/2)+12*c__1)^(1/3)-x^(1/2)

"by passing, since residual is complex"

 


 

Download internal_error_too_many_Levels_from_coulditbe_august_23_2024.mw

while i am writing code for loop with if condition i am having problem kindly help me out i am sharing fileburgers_type_method.mw

Can solve give internal Maple error of division by zero to the caller?

Also when I run this using kernelopts('assertlevel'=1): or kernelopts('assertlevel'=2):, then not able to catch the internal error any more, which is division by zero using try/catch.

Only when kernelopts('assertlevel'=0).  can try/catch trap the error.

This means now I have to set kernelopts('assertlevel'=0) before calling solve to be able to trap the error and set it back to kernelopts('assertlevel'=2) after that, else the whole program halts.

But my main question is: can solve throw internal error of division by zero? I mean, is this expected sometimes to happen? I would have thought Maple should internally catch this and simply return no solution if can't solve it.

This equation is auto generated and the program calling solve on it to see if it can solve it.

Here is the worksheet

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 1792 and is the same as the version installed in this computer, created 2024, August 22, 12:6 hours Pacific Time.`

libname;

"C:\Users\Owner\maple\toolbox\2024\Physics Updates\lib", "C:\Program Files\Maple 2024\lib"

eq:=1 = 1/((exp(X*Y)*exp(X*y0)*exp(x0*Y)*exp(x0*y0)*X + exp(X*Y)*exp(X*y0)*exp(x0*Y)*exp(x0*y0)*x0 + 2*Y + 2*y0)^2*Y*(exp(X*Y)^2*exp(X*y0)^2*exp(x0*Y)^2*exp(x0*y0)^2*X + exp(X*Y)^2*exp(X*y0)^2*exp(x0*Y)^2*exp(x0*y0)^2*x0 + 2*exp(X*Y)*exp(X*y0)*exp(x0*Y)*exp(x0*y0)*X*Y^2 + 4*exp(X*Y)*exp(X*y0)*exp(x0*Y)*exp(x0*y0)*X*Y*y0 + 2*exp(X*Y)*exp(X*y0)*exp(x0*Y)*exp(x0*y0)*X*y0^2 + 2*exp(X*Y)*exp(X*y0)*exp(x0*Y)*exp(x0*y0)*Y^2*x0 + 4*exp(X*Y)*exp(X*y0)*exp(x0*Y)*exp(x0*y0)*Y*x0*y0 + 2*exp(X*Y)*exp(X*y0)*exp(x0*Y)*exp(x0*y0)*x0*y0^2 - X^2*exp(X*Y)*exp(X*y0)*exp(x0*Y)*exp(x0*y0) - 2*exp(X*Y)*exp(X*y0)*x0*exp(x0*Y)*exp(x0*y0)*X - exp(X*Y)*exp(X*y0)*x0^2*exp(x0*Y)*exp(x0*y0) - 2)):

kernelopts('assertlevel'=2):
try
   solve(identity(eq,X),[x0, y0]);
catch:
   print(lastexception);
end try;

Error, (in unknown) assertion failed

kernelopts('assertlevel'=1):

try
   solve(identity(eq,X),[x0, y0]);
catch:
   print(lastexception);;
end try;

Error, (in unknown) assertion failed

kernelopts('assertlevel'=0):

try
   solve(identity(eq,X),[x0, y0]);
catch:
   print(lastexception);
end try;

unknown, "numeric exception: division by zero"

 


 

Download division_by_zero_solve_identity_august_23_2024.mw

Hello,

Are there any tools in Maple that allow you to find real roots of complex integral equations?

I have attached examples of such equations.

Unfortunately, I can't solve them.

Best regards.

Test.mw

Hello community,

I recently became a Maple Ambassador and  I would like to ask about some portals that were mentioned to me. Are these portals on mapleprimes and how can I access them?

I was thinking that I could also create a LinkedIn group, so that I could present there the activities I will do at the university, the online workshops I will do in the future or upload material from student projects.

Best Regards,

Athanasios Paraskevopoulos

 

 

HI, I saw an example in Maplesim where the speed of the Unwinder roller is modeled as a feedback control from the dancer's position, the radius of the Unwinder roller, to maintain a constant speed of the web.

I was wondering how the Unwinder roller radius (m) was divided by the target constant web speed (Lamp signal (m/s)) and added from the dancer's angle to achieve feedback control of the Unwinder roller.

 

Studying the attached documentDuffing Equation from the University of Colorado, I tried to plot the Duffing equation in three different ways. My worksheet is attached.
But I didn't get the desired result as you can see below. Any suggestion on how to fix my problem?

 

Download Example.mw

 

This ode has solution when solving for the IC by hand. But Maple gives new error I did not see before when asking it to solve the ode with IC. 

No error if asked to solve the ODE without the IC.

Is this new error in dsolve? I have no earlier Maple versions to check. Below is worksheet. Solving for the IC by hand gives the solution which odetest verified.

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 1789 and is the same as the version installed in this computer, created 2024, August 10, 8:50 hours Pacific Time.`

ode := diff(y(x), x) = sqrt(2)*sqrt(-(y(x) - 6)*(2*y(x) - 3))/(-y(x) + 6);
IC:=y(0)=3;

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

y(0) = 3

sol:=dsolve(ode);

x-(1/4)*(-4*y(x)^2+30*y(x)-36)^(1/2)-(9/8)*arcsin((4/9)*y(x)-5/3)+c__1 = 0

sol_with_IC:=dsolve([ode,IC]); #why this error??

Error, (in dsolve) when calling 'series/RootOf'. Received: 'unable to compute series'

#lets solve for the IC by hand:
eq:=eval(sol,[y(x)=3,x=0])

-(1/4)*18^(1/2)+(9/8)*arcsin(1/3)+c__1 = 0

C_sol:=PDEtools:-Solve(eq,_C1);

c__1 = (3/4)*2^(1/2)-(9/8)*arcsin(1/3)

my_new_sol:=eval(sol,C_sol)

x-(1/4)*(-4*y(x)^2+30*y(x)-36)^(1/2)-(9/8)*arcsin((4/9)*y(x)-5/3)+(3/4)*2^(1/2)-(9/8)*arcsin(1/3) = 0

odetest(my_new_sol,[ode,IC])

[0, 0]

 


 

Download internal_error_when_unable_to_find_solution_august_22_2024.mw

i have solution of ODE but again i want take derivative from solution function F then i want take reciprocal of derivative
if F'=G then i want 1/F'=1/G like that i want all solution by list and if possible don't give the parameter a sequence  it will be better

thanks for any help

K := diff(G(xi), xi $ 2) = -lambda*diff(G(xi), xi) - mu;
                 2                                    
                d                    / d        \     
          K := ----- G(xi) = -lambda |---- G(xi)| - mu
                   2                 \ dxi      /     
                dxi                                   

V:= [seq](-1..1, 1/2);
                          [    -1     1   ]
                     V := [-1, --, 0, -, 1]
                          [    2      2   ]

interface(rtablesize= nops(V)^3):
DataFrame(
    <seq(seq(<a | b | rhs(dsolve(eval(K, [lambda,mu]=~ [a,b])))>, a= V), b= V)>,
    columns= [lambda, mu, F]
);

loading

Error occurred during PDF generation. Please refresh the page and try again

Dear Expert Users,

I am still struggling with my transition from Mathcad 15 to Maple. Would someone be so kind to look at the attached worksheet and how I can obtain the desired result? Thanks in advance. The data used in the example come from TestFleck.xlsx

QuestionPrimes.mw TestFleck.xlsx

Hi
my odetest must give me zero everything is true but still not simplify the function with power include 1/n  not do cancelation even

test_sol_for_PDE.mw

*****************************

EDIT: Thanks for the help i used the restore backup feature. I made my anti virus not react to maple since i thought that might work, so far no more problems. Else this is a fix if anybody else has this problem.

******************************

Hi, so my maple freezes during simple tasks, such as trying to type something, or somtimes copying and inerting the results from a previous equation, the feature where you mark something and drag the answer to somewhere else also does this. When this happens, maple completely freezes and i'm forced to close the app with taksmanager, where i lose everything i have worked on, sometimes for the past hour because i didn't save every minute which is basically not something you can do.

Is there any fix for this or anything i can do to prevent this, cause it really sucks. 

I'm on a windows 11 with maple 2024