MaplePrimes Questions

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.

 

He Seniors, How to increase the quality of graph by puting command in ploting command according to required desire

Graph_qaulity_help.mw

Hi,

I found a bug in convert, please help me if you know a solution.

When we use the code

convert(U(xi)^2*y(xi)^5,list);

we get 

[U(xi)^2, y(xi)^5]

but when we use

convert(U(xi)^2,list);

we obtain

[U(xi),2]

while I expect the following result:

[U(xi)^2]

* "convert" is one part of my code for solving a problem. Sometimes there are cases that just exist one function instead of >1.

Since I want to keep my codes general, hence I need [U(xi)^2] in response to convert(U(xi)^2,list).

Thanks in advance.

A polynomial divided by another polynomial of lower degree. I want to find the remainder and quotient. How do I get.

The question is what should I add to the numerator get perfect division when x-3 x  -12 x+19 is divided by x2+x-6.

I shd get the answer as 2x+5 to be added since the remainder is -2x-5.   (Note that x-3 x  -10 x+24 is excatly divided by 2+x-6.

Can any one state the code to get the answer.

Quotient ( ) and Remainder (  ) codes , i tried, donot know how to use them.

Thanks for help. Cheers. RK


I'm using Maple 2021, and my Euler-Lagrange equation is coming out with a R[0] term that should not be there. I want to know what is causing this error and how I can fix it.

restartNULL

Lagrangian

 

Leq := (1/2)*R^2*[-cosh(rho1(tau)^2)*(diff(t(tau), tau))^2+(diff(rho1(tau), tau))^2+sinh(rho1(tau)^2)*(diff(theta1(tau), tau))^2]+(1/2)*R^2*[-cosh(rho2(tau)^2)*(diff(t(tau), tau))^2+(diff(rho2(tau), tau))^2+sinh(rho2(tau)^2)*(diff(theta2(tau), tau))^2]-(1/2)*k*rho1(tau)^2-(1/2)*k*rho2(tau)^2-(1/2*(tanh(rho2(tau)-rho1(tau))+1))*(rho2(tau)-rho1(tau))^2; L := subs({diff(rho1(tau), tau) = var4, diff(rho2(tau), tau) = var6, diff(t(tau), tau) = var2, diff(theta1(tau), tau) = var8, diff(theta2(tau), tau) = var10, rho1(tau) = var3, rho2(tau) = var5, t(tau) = var1, theta1(tau) = var7, theta2(tau) = var9}, Leq)

(1/2)*R^2*[-cosh(rho1(tau)^2)*(diff(t(tau), tau))^2+(diff(rho1(tau), tau))^2+sinh(rho1(tau)^2)*(diff(theta1(tau), tau))^2]+(1/2)*R^2*[-cosh(rho2(tau)^2)*(diff(t(tau), tau))^2+(diff(rho2(tau), tau))^2+sinh(rho2(tau)^2)*(diff(theta2(tau), tau))^2]-(1/2)*k*rho1(tau)^2-(1/2)*k*rho2(tau)^2-(1/2)*(-tanh(-rho2(tau)+rho1(tau))+1)*(rho2(tau)-rho1(tau))^2

(1.1)

Time Equation

 

epr11 := diff(L, var2); epr12 := diff(L, var1); epr13 := subs({var1 = t(tau), var10 = diff(theta2(tau), tau), var2 = diff(t(tau), tau), var3 = rho1(tau), var4 = diff(rho1(tau), tau), var5 = rho2(tau), var6 = diff(rho2(tau), tau), var7 = theta1(tau), var8 = diff(theta1(tau), tau), var9 = theta2(tau)}, epr11); epr14 := subs({var1 = t(tau), var10 = diff(theta2(tau), tau), var2 = diff(t(tau), tau), var3 = rho1(tau), var4 = diff(rho1(tau), tau), var5 = rho2(tau), var6 = diff(rho2(tau), tau), var7 = theta1(tau), var8 = diff(theta1(tau), tau), var9 = theta2(tau)}, epr12); epr15 := diff(epr13, tau); teq := epr15-epr14 = 0

2*R*[0]+(1/2)*R^2*[-4*rho1(tau)*(diff(rho1(tau), tau))*sinh(rho1(tau)^2)*(diff(t(tau), tau))-2*cosh(rho1(tau)^2)*(diff(diff(t(tau), tau), tau))]+(1/2)*R^2*[-4*rho2(tau)*(diff(rho2(tau), tau))*sinh(rho2(tau)^2)*(diff(t(tau), tau))-2*cosh(rho2(tau)^2)*(diff(diff(t(tau), tau), tau))] = 0

(2.1)

NULL


 

Download Maple_Help_Example.mw

 

Dear All,

I'm wondering if there is a simple way to define, given a "module" that protects "e" as a global, to allow the user to write e[0], e[1], e[2], e[3], e[inf] such that I calculate with e[4] but I display e[inf]. And if I type in e[inf], it translates behind the curtain of the module e[inf] into e[4] such that I keep my indexes 0-4 for the handling of my entities.

I hope I made myself understood ;)

I was woundering if there is some way with the standard "TypeSetting Module" ?

Sincerely

Ivar 

How can I achieve something like this (i.e. an output in a worksheet)?

It is important that the variables of the lables match the columns.

In the attached file is a typical dataset. A display of row lables would be optional.

Context: Easier interpretation (of the structure) of a Jacobian and subsequent manual solving the equations of interest that correspond to the rows.

 

Labels_for_sparse.mw

Hi!

I would like Maple to show the full solution method to this pde.  How do I do this?

 

Show_Solution_to_NLPDE.mw

Hello my friends
Please help me solve the integration problem in the attached Maple code below (why was the integration not done in u[4]?) ... Thank you very much

``

u[1] :=  1/3*t^3*x + 2*t*x + (-1)*0.7522527780*t^(3/2)*x + (-1)*0.1719434922*t^(7/2)*x + (-1)*0.01587301587*t^7*x + (-1)*0.1333333333*t^5*x

(1/3)*t^3*x+2*t*x-.7522527780*t^(3/2)*x-.1719434922*t^(7/2)*x-0.1587301587e-1*t^7*x-.1333333333*t^5*x

(1)

u[2] := subs(t=Tau,u[1]);

(1/3)*Tau^3*x+2*Tau*x-.7522527780*Tau^(3/2)*x-.1719434922*Tau^(7/2)*x-0.1587301587e-1*Tau^7*x-.1333333333*Tau^5*x

(2)

u[3]:= int(u[2],Tau = 0 .. t);

t^2*x+0.8333333333e-1*t^4*x-0.2222222222e-1*t^6*x-0.1984126984e-2*t^8*x-.3009011112*t^(5/2)*x-0.3820966493e-1*x*t^(9/2)

(3)

u[4]:= int((t-Tau)^(-0.5)*u[2],Tau = 0 .. t);

int(((1/3)*Tau^3*x+2*Tau*x-.7522527780*Tau^(3/2)*x-.1719434922*Tau^(7/2)*x-0.1587301587e-1*Tau^7*x-.1333333333*Tau^5*x)/(t-Tau)^.5, Tau = 0 .. t)

(4)

``

Download help.mw

When displaying two tubeplots together, we may specify their colors at will, as long as they are different colors!  For instance, specifying red and green works correctly, but specifying red and red results in red and black!

See the attached worksheet.  Interestingly, when displaying the contents of the worksheet on this website, the colors are rendered correctly!  So don't go with what you see on this web page; look inside the worksheet instead.

restart;

kernelopts(version);

`Maple 2022.1, X86 64 LINUX, May 26 2022, Build ID 1619613`

with(plots):

Two intersecting tori colored red and green -- works as expected:

display(
        tubeplot([cos(t), 0, sin(t)], t=-Pi..Pi, radius=0.2),
        tubeplot([cos(t), sin(t), 0], t=-Pi..Pi, radius=0.2),
style=surface, color=[red,green]);

When we set both colors to red, one of the surfaces is painted black!  Why?

Please note: This website displays the colors corectly as red and red.  But

within the worksheet the colors are read and black.

display(
        tubeplot([cos(t), 0, sin(t)], t=-Pi..Pi, radius=0.2),
        tubeplot([cos(t), sin(t), 0], t=-Pi..Pi, radius=0.2),
style=surface, color=[red,red]);

Specifying colors as red/red within the tubeplots still produces red/black!

display(
        tubeplot([cos(t), 0, sin(t)], t=-Pi..Pi, radius=0.2, color=red),
        tubeplot([cos(t), sin(t), 0], t=-Pi..Pi, radius=0.2, color=red),
style=surface);

Download mw.mw

PS: As a workaround, we may replace the red & red specification with
COLOR(RGB, 1, 0, 0) and
COLOR(RGB, 1, 0, 0.01)
which are different enough to make Maple happy, but produce essentially the same red color.

Hello everyone,

I am trying to solve a simple nonlinear 4 variable function with NLPsolve giving real values ranges for the variables but the NLPsolve gives "non numerical" result. Find attached the worksheet.CoreOptimization.mw

Am I doing something wrong?

Regards,

Cata

I have a mixture function of power fractional along with natural log, where both contain x variable. Can I use Maple to extract the x variable to one side of the formula?

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

Any way to write a function to get a RandomPlanar connected graph

That I have function say RandomPlanar(n,m) where n is the number of vertices and m is optional parameter and is the number of edges 

How to find if all the rows in a matrix are unique and return true if unique and false if not

That is their are no duplicate rows 

Also without another post 

If given two matricies A and B how to find if they are same like what i mean is as equal here is

A and B have the same rows but they may be in rows can be jumbled imples

A:=Matrix(3, 3, [[1, 2, 3], [3, 2, 1], [4, 6, 5]])

B:=Matrix(3, 3, [[3, 2, 1], [1, 2, 3], [4, 6, 5]])

They have the same rows exactly but in jumbled order then I say they are equal then return true. 

That is i have function RowEqual(A,B) gives TRUE if same by above condition and FALSE is not

First 228 229 230 231 232 233 234 Last Page 230 of 2363