MaplePrimes Questions

restart:with(Physics):

Setup(dimension=3,coordinates=(X=[x,y,z])):

Define(Tp3[~alpha,~beta,~gamma],B[~lambda,mu],T3[~rho,~epsilon,~sigma]):

Tp3[~alpha,~beta,~gamma]=B[~alpa,rho]B[~beta,epsilon]B[~gamma,sigma]T3[~rho,~epsilon,~sigma]

SumOverRepeatedIndices of the expression does not do anything. Why?

Thanks for the answer.

Dear sir,

In the given problem, eta = 0 to 20, I want the table value of eta for a step size of 1000 (0 to 20 in thousand parts).

i have calculated only for one value, zero

Download Demo_paper_work.mw

hi,

I don't know how to test the answers I got in Mathematica, can you help me?
I can't send the file here, I really need help.

Can I solve the given biquadratic equation in terms of sigma. I only need real positive root, if any

6125*_Z^4 + 68644*_Z^3*sigma - 219625*_Z^3 + 255712*_Z^2*sigma - 959250*_Z^2 + 238144*_Z*sigma - 1113500*_Z - 245000

I tried with solve for variable but it does not work. 

These are two examples of challenging ode solutions to show they satisfy the ode.

I tried many things myself but can't do it. Feel free to use any method or trick you want. The goal is simply to show that the solution is correct. The solutions are correct as far as I know, but hard to show by back substitution since the solutions are given in form of integrals and RootOf in them.

Extra credit points will be awarded for those who manage to do both.

28148

interface(version);

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

Example 1

 

_EnvTry:='hard';
ode:=y(x) = arcsin(diff(y(x), x)) + ln(1 + diff(y(x), x)^2);
sol:=dsolve(ode);
r:=odetest(sol,ode);
coulditbe(r=0);

hard

y(x) = arcsin(diff(y(x), x))+ln(1+(diff(y(x), x))^2)

x-Intat(1/sin(RootOf(-_a+_Z+ln(sin(_Z)^2+1))), _a = y(x))-c__1 = 0

-arcsin(sin(RootOf(-y(x)+_Z+ln(3/2-(1/2)*cos(2*_Z)))))+RootOf(-y(x)+_Z+ln(3/2-(1/2)*cos(2*_Z)))

FAIL

Example 2

 

ode:=(1 + diff(y(x), x)^2)*(arctan(diff(y(x), x)) + a*x) + diff(y(x), x) = 0;
sol:=dsolve(ode);
r:=odetest(sol,ode);
coulditbe(r=0)

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

y(x) = Int(tan(RootOf(a*x*tan(_Z)^2+tan(_Z)^2*_Z+a*x+tan(_Z)+_Z)), x)+c__1

(-arctan(tan(RootOf(2*a*x+sin(2*_Z)+2*_Z)))+RootOf(2*a*x+sin(2*_Z)+2*_Z))*tan(RootOf(2*a*x+sin(2*_Z)+2*_Z))/(a*x+RootOf(2*a*x+sin(2*_Z)+2*_Z))

FAIL

 

 

Download showing_solution_satisfies_ode.mw

Hi,

I am exploring the boxplot, and I see that I do not have the option to integrate 2 lists: One for observations and one for frequencies. The BoxPlot command only accepts one list (List A in my example). Is there a way to create the BoxPlot using the 'Obs' and 'Eff' lists? Thank you for your insight

QBoxPlot.mw

As Maple is not equipped to handle numerical solutions of elliptic PDEs, can anyone help top solve PDEs by finite differences or any other numerical solver?

pde.mw

Dear Maple Community,

I would like to ask you a question which will certainly be elementary for you. Imagine that I have a PDE (or, more generally, a system of PDEs) with (t, x) being independent variables, and the dependent variable defining the wave height or the fluid particle velocity u(t,x). The best example is the famous KdV equation:

u[t] + u*u[x] + u[x,x,x] = 0.

Now, I would like to automatically derive the ODE(s) that satisfy the travelling waves of this equation. Namely, we have to substitute the travelling wave ansatz u(t,x) = U(X) = U(x - c*t), where c is the travelling wave speed. In the case of the KdV equation, we obtain the following ODE:

-c*U' + U*U' + U''' = 0,

where prime ' denotes the derivative with respect to the new variable X.

My question is the following: What is the best way to automatically obtain this PDE -> ODE reduction in Maple?

Thanks a lot in advance!

Kind regards,

DDe

How to make Maple simplify a/sqrt(tan(x+c__1)^2+1); to a/sqrt(sec(x+c__1)^2);  ?

Below is worksheet. since the second one is smaller in leaf size, expected simplify(...,size) to do it, But it did not. Any suggestions?

24832

LC:=MmaTranslator:-Mma:-LeafCount;
e1:=a/sqrt(tan(x+c__1)^2+1);
e2:=a/sqrt(sec(x+c__1)^2);

MmaTranslator:-Mma:-LeafCount

a/(tan(x+c__1)^2+1)^(1/2)

a/(sec(x+c__1)^2)^(1/2)

LC(e1);

12

LC(e2);

10

#we see they are same
simplify(e1-e2);

0

#both nothing below make e1 to e2
simplify(e1); #not good simplification at all. Adds csgn.
LC(%);

a*csgn(sec(x+c__1))*cos(x+c__1)

11

#expected this to do it but no
simplify(e1,size);
LC(%);

a/(tan(x+c__1)^2+1)^(1/2)

12

simplify(e1,trig);

a/(tan(x+c__1)^2+1)^(1/2)

combine(e1,trig);

a/(tan(x+c__1)^2+1)^(1/2)

 


Using some other software:

 

 

 

Download tan_sec_simplification_june_9_2024.mw

Can't figure out what code makes this simplification.
If this simplification works, it will be a part of a larger simplication procedure ( if it not conflicts hopefully) 
vereenvouding_hoe_-vraag_MPF.mw

I was trying to find out why my solution was not validating for this ode. It turned out because I was using solve instead of PDEtools:-Solve. It took me sometime to find this.

This made huge difference on odetest to verify the solution.

This is very simple ode. We just need to integrate once. But first we have to solve for y'(x). 

And here comes the difference. When I used solve to solve for y'(x), odetest did not verify the solution.

When using PDEtools:-Solve, it did.

The difference is how each returned the solution for y'(x). Both have RootOf but written differently and this made the difference.

1) Why solutions are written differently? 

2) Is this to be expected? I have thought Solve uses same engine as solve below the cover.

3) is it possible to make solve give the same form as Solve or change to that form?

I am now changing more of my code to use PDEtools:-Solve because of this.

27860

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 1757. The version installed in this computer is 1756 created 2024, June 5, 19:39 hours Pacific Time, found in the directory C:\Users\Owner\maple\toolbox\2024\Physics Updates\lib\`

Using solve

 

restart;

27860

ode:=x-ln(diff(y(x),x))-sin(diff(y(x),x))=0;
RHS:=solve(ode,diff(y(x),x));

x-ln(diff(y(x), x))-sin(diff(y(x), x)) = 0

RootOf(_Z-exp(-sin(_Z)+x))

mysol:= y(x) = Int(RHS,x)+c__1;

y(x) = Int(RootOf(_Z-exp(-sin(_Z)+x)), x)+c__1

odetest(mysol,ode);

-ln(RootOf(_Z-exp(-sin(_Z)+x)))+x-sin(RootOf(_Z-exp(-sin(_Z)+x)))

using PDEtools:-Solve (now it verifies) with no extra effort

 

restart;

27860

ode:=x-ln(diff(y(x),x))-sin(diff(y(x),x))=0;
RHS:=PDEtools:-Solve(ode,diff(y(x),x)):
RHS:=rhs(%);

x-ln(diff(y(x), x))-sin(diff(y(x), x)) = 0

RootOf(-x+ln(_Z)+sin(_Z))

mysol:= y(x) = Int(RHS,x)+c__1;

y(x) = Int(RootOf(-x+ln(_Z)+sin(_Z)), x)+c__1

odetest(mysol,ode);

0

 

 

Download PDEtools_Solve_vs_solve_june_8_2024.mw

 

Update

Here is a counter example. Where now it is the other way around.

Using solve makes odetest happy, but when using PDEtools:-Solve odetest does not verify the solution.  Same exact ODE.   


 

28652

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 1757 and is the same as the version installed in this computer, created 2024, June 6, 14:53 hours Pacific Time.`

Example, using solve works

 

ode:=exp(diff(y(x), x) - y(x)) - diff(y(x), x)^2 + 1 = 0;
RHS:=solve(ode,diff(y(x),x));
RHS:=eval(RHS,y(x)=y);
mysol:=Intat(eval(1/RHS,y=_a),_a=y(x))=x+c__1;
odetest(mysol,ode);

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

Warning, solutions may have been lost

RootOf(-exp(_Z-y(x))+_Z^2-1)

RootOf(-exp(_Z-y)+_Z^2-1)

Intat(1/RootOf(-exp(_Z-_a)+_Z^2-1), _a = y(x)) = x+c__1

0

Example, using PDEtools:-Solve fails

 

ode:=exp(diff(y(x), x) - y(x)) - diff(y(x), x)^2 + 1 = 0;
RHS:=rhs(PDEtools:-Solve(ode,diff(y(x),x)));
RHS:=eval(RHS,y(x)=y);
mysol:=Intat(eval(1/RHS,y=_a),_a=y(x))=x+c__1;
odetest(mysol,ode);

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

RootOf(_Z^2*exp(y(x))-exp(_Z)-exp(y(x)))

RootOf(_Z^2*exp(y)-exp(_Z)-exp(y))

Intat(1/RootOf(_Z^2*exp(_a)-exp(_Z)-exp(_a)), _a = y(x)) = x+c__1

exp(RootOf(_Z^2*exp(y(x))-exp(_Z)-exp(y(x)))-y(x))-RootOf(_Z^2*exp(y(x))-exp(_Z)-exp(y(x)))^2+1

 


 

Download PDEtools_Solve_vs_solve_june_9_2024.mw

So now I have no idea which to use. Sometimes solve works and sometimes Solve works. I  guess I have to now solve the ode both ways each time and see which works.

 

This is an extremely common situation; either some moderator displaced or deleted the question, or the OP deleted himself (herself).
Whatever the reason, it's always extremely upsetting to be confronted with this situation, which shows how rude, to put it mildly, some people can be.

Initial question (this day, about 2 hours ago)

Comment

Should not  print("my matrix is ",A) at least print "my matrix is " even if A is not correctly filled/setup?

Notice that nothing shows on screen when using print (but lprint does)

Is this expected? If it makes any difference, I am using worksheet and this is my display options

21836

interface(version);

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

A:=Matrix(1,0);

print("My matrix is =",A);

lprint("My matrix is =",A);

"My matrix is =", Matrix(1,0,{},datatype = anything,storage = rectangular,order
= Fortran_order,shape = [])

 

 

Download why_print_empty_june_7_2024.mw

If I do    odetest(...,odeA) I get correct result. But if I do    odetest(...,odeB);  odetest(...,odeA);   now it gives wrong output for the odeA one. 

Same exact code. It just depends on the call done before it.

Why would issuing a command before changes the output of odetest? It seems Maple remembers something from last call. But I have no idea how to fix this.

Is there a way to tell odetest not to remember or cache any results from last calls? i.e. Can I clear its remember table before calling odetest??

This is messing all my testing now since I get different result each time depending on which call was made before. I can't do restart before testing each ode, since this is done in a loop.  I just need a way to tell Maple to clear its internal cache so that each call to odetest is not affected by last call result. 

Doing forget(odetest); before the call had no effect.

Reported to Maplesoft.

Worksheet below

``

interface(version);

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

restart;

4556

#EXAMPLE 1
ode:=x*diff(y(x),x)^n=0;
sol:=dsolve(ode);
odetest(sol,ode);

x*(diff(y(x), x))^n = 0

y(x) = c__1

0

restart;

4556

ode:=diff(y(x),x)^n=0;
sol:=dsolve(ode);
odetest(sol,ode);

(diff(y(x), x))^n = 0

y(x) = c__1

0^n

##EXAMPLE 1 repeated. Why now different result??

ode:=x*diff(y(x),x)^n=0;
sol:=dsolve(ode);
odetest(sol,ode);

x*(diff(y(x), x))^n = 0

y(x) = c__1

x*0^n

Download why_different_result_from_odetest_june_6_2024.mw

Update

FYI, I got email from Maplesupport that Maple R&D group will look at this issue.

So hopefully this will be fixed in a future version of Maple.  

I am not able to find a workaround but doing tracing I see that odetest does rememebr something from last call but have no idea to fix this myself.

I want to display W__LJ as I typed it, without Maple running the calculations resulting in the output here below:

restart;

'W__LJ = 0.75 + 0.98*((1.18/Gamma)^1.9 - (1.15/Gamma)^0.98)';

W__LJ = .75+1.342152577*(1/Gamma)^1.9-1.123854165*(1/Gamma)^.98

(1)
 

NULL

Download display_formula.mw

This is important as I will place such expression in a plot like this:
textplot([2,0.9,typeset('W__LJ=0.75+0.98((1.18/Gamma)^1.9-(1.15/Gamma)^0.98)')],'font'=["helvetica","roman",35])
and I need it in the original functional form, which is easier to interpret.

First 98 99 100 101 102 103 104 Last Page 100 of 2426