MaplePrimes Questions

Dear all

I have  Lie commutations for vectors e1, e2, e3, e4, e5, e6 as follow:

[e1, e3] = e3, [e1, e4] = e4, [e1, e5] = e5, [e1, e6] = e6, [e2, e3] = -e5, [e2, e4] = e6, [e3, e5] = e6

for which the command 

Query("Jacobi")

returns the false result, which means, the vectors are not closed under Jacobi's identity. How can I find vector triplets for which Jacobi's identity does not hold?

Please find Maple file.Jacobi_identity.mw

Hey everyone!
I have to solve this nonlinear system of equations . For small N (N=8), I tried to do it using solve but it is run forever. I have choosed \gamma to be equal to Pi/4.
test.mw

I tried to expand by the procedures series() and taylor(), but they compute to O(x15).

Hi

I have two sets of plots

1. plot([1 - 2*x, -0.6 - 2*x, -1 - 2*x], x = -1 .. 1)

2. smartplot[x, y](map('`=`', [31*y^2 + 0.19*x^2 + 0.34*x*y - 0.38*y - 0.22*x + 0.07, 0.31*y^2 + 0.19*x^2 + 0.34*x*y - 0.38*y - 0.22*x, 0.31*y^2 + 0.19*x^2 + 0.34*x*y - 0.38*y - 0.22*x + 0.02, 0.31*y^2 + 0.19*x^2 + 0.34*x*y - 0.38*y - 0.22*x + 0.07, 0.31*y^2 + 0.19*x^2 + 0.34*x*y - 0.38*y - 0.22*x + 0.11], 0))

How do i combine the two into one plot?

thanks!

R

 

Why Maple gives this error and is this a known issue?

restart;
pdsolve( [diff(u(x,t),t)=diff(u(x,t),x)*diff(u(x,t),x$2), u(x,0)=0],u(x,t))

Maple 2020.2 with Physics 893 on windows 10.

 

Dear all, 

I have a time-fractional PDE as follows.  ( denotes Caputo fractional derivative with respect to t) 

for alpha=1, this is a classical PDE and the exact solution is given as follows (in a book)

 

Question: 

 

1) for alpha=1, I want to find the L2 errors and L∞ errors in a table. 

2) for alpha=0.5, Can Maple find a solution (numeric or exact)?

 

MY TRY: (MAPLE 2020.2)

download the code.mw

restart:
with(plots):
PDE:=diff(y(x,t),t)=y(x,t)*diff(y(x,t),x$3)+y(x,t)*diff(y(x,t),x)+3*diff(y(x,t),x)*diff(y(x,t),x$2) ;


#c is an arbitratry constant
c:=4:
exact_sol:=(x,t)->-8*c/3*(cos ((x-c*t)/4))^2;

# I selected initial and boundary conditions as follows
IBC := { y(x,0)=exact_sol(x,0),y(0,t)=exact_sol(0,t),D[1](y)(0,t)=D[1](exact_sol)(0,t),y(1,t)=exact_sol(1,t)};
 	
numeric_sol := pdsolve(PDE,IBC,numeric);

num3d:=numeric_sol:-plot3d(t=0..1,x=0..1,axes=boxed,
            color=[0,0,y]);
exact3d:=plot3d(exact_sol(x,t),t=0..1,x=0..1,axes=boxed);
display(exact3d,num3d);

pdetest(y(x,t)=exact_sol(x,t),PDE,IBC);


Hi

I have a system of pde that it is solved with pdsolve procedure.

This procedure takes a few time, but when I need to do plots, especially 3d plot the software takes a lot of time (several hours).

How can I make plots faster?
Thanks.

The problem: to simplify the expression

for any negative  x  and  y .

Below we see that Maple copes with the task brilliantly (example 1). For example, it presents  sqrt(x*y)  as  sqrt(-x)*sqrt(-y)  and so on. But the same technique, applied only to the numerator of this expression does not give the desired presentation in the form of a square (example 2 and example 3).

restart;
# Example 1
A:=(x+y-2*sqrt(x*y))/(sqrt(-x)+sqrt(-y));
simplify(A) assuming negative;
factor(%,{sqrt(-x),sqrt(-y)});

                                         

restart;
# Example 2
B:=x+y-2*sqrt(x*y);
simplify(B) assuming negative;
factor(%,{sqrt(-x),sqrt(-y)});

                                           

 

restart;
# Example 3
B:=x+y-2*sqrt(x*y);
R:=simplify(B) assuming positive;
combine(R) assuming positive;
factor(R,{sqrt(x),sqrt(y)});

                                                   

Two questions:

1. Does anyone know the reasons for this behavior.

2. Does anyone know an easy way to simplify in examples 2 and 3 (without  substitutions  like  x=+-u^2  and  y=+-v^2 and so on,  of course)

 

Download sqrt.mw

 

I am using solution given in How-To-Make-Sort-Work-With-Alias which works well.

But on more testing, I found that Latex drops the constant of integration after applying the above solution, when this constant shows at the front of the rhs of the expression.

I have no idea why this happens. I will post two examples. The first shows the problem with the Latex generated, showing the constant is missing from the Latex. The second example is where I moved the constant  to inside the expression keeping everything else the same, and now the Latex generated no longer drops it. 

This is serious problem, since now my solutions are losing constant of integration in Latex display depending on where it is located.

example 1

restart;
assign(seq(`print/_C`||k, k=0..10) = seq(c[k], k=0..10)):
S:=[seq(_C||k = _C||k(), k=0..10)]:

sol:= y(x) = _C1/cosh(x)+(cosh(x)^2+cosh(x)*sinh(x)+x)/cosh(x);
sol:=subs(S, sort(sol));

Now watch what happens to the Latex of the above

Latex(sol)

y \! \left(x \right) = 
\frac{1}{\cosh \! \left(x \right)}+\frac{\cosh^{2}x +\cosh \! \left(x \right) \sinh \! \left(x \right)+x}{\cosh \! \left(x \right)}

Which compiles to 

\documentclass[11pt]{article}
\usepackage{amsmath}
\begin{document}
\[
y \! \left(x \right) = \frac{1}{\cosh \! \left(x \right)}+\frac{\cosh^{2}x +\cosh \! \left(x \right) \sinh \! \left(x \right)+x}{\cosh \! \left(x \right)}
\]
\end{document}

Now will do the same, but move the constant to the second term. Now it shows up

example 2

restart;
assign(seq(`print/_C`||k, k=0..10) = seq(c[k], k=0..10)):
S:=[seq(_C||k = _C||k(), k=0..10)]:

sol:= y(x) = 1/cosh(x)+ _C1*(cosh(x)^2+cosh(x)*sinh(x)+x)/cosh(x);
sol:=subs(S, sort(sol));

Now generate the latex

Latex(sol)

y \! \left(x \right) = 
\frac{\left(\cosh^{2}x +\cosh \! \left(x \right) \sinh \! \left(x \right)+x \right) c_{1}}{\cosh \! \left(x \right)}+\frac{1}{\cosh \! \left(x \right)}

Which compiles to 

\documentclass[11pt]{article}
\usepackage{amsmath}
\begin{document}
\[
y \! \left(x \right) = 
\frac{\left(\cosh^{2}x +\cosh \! \left(x \right) \sinh \! \left(x \right)+x \right) c_{1}}{\cosh \! \left(x \right)}+\frac{1}{\cosh \! \left(x \right)}
\] 
\end{document}

I am using 2020.2 with Physics 893 on windows 10.

Any idea what is going on? And why this happens when constant is at front only?

ps. the Purpose of using the solution in the above link, is to be able to use c[1] instead of _C1 in the final latex, and also have these constants show at front (this is what sort does) which makes the final expression better looking).

Thank you

Edit

In the debugger, going over Latex() function, I found where the problem happen.  There is a call near line 20 which does this

              Latex:-Print(e,':-executeprintroutines');

Where is the input. Which in this case is the sol expression passed to the Latex command.

Removing ':-executeprintroutines' from the above call, the constant remain there and is not lost.

It seems assign(seq(`print/_C`||k, k=0..10) = seq(c[k], k=0..10)): used before the call to Latex is confusing things.

Here is illustration:

restart;
assign(seq(`print/_C`||k, k=0..10) = seq(c[k], k=0..10)):
S:=[seq(_C||k = _C||k(), k=0..10)]:
sol:= y(x) = _C1/cosh(x)+(cosh(x)^2+cosh(x)*sinh(x)+x)/cosh(x);
sol:=subs(S, sort(sol));


Latex:-Print(sol,':-executeprintroutines');
Latex:-Print(sol);

And the output of the last 2 commands is

This shows when using ':-executeprintroutines' the constant is lost. I do not know what ':-executeprintroutines' does or where it is defined to try to modify it.

There is a problem here somewhere. Maple hangs on this ODE. Looking at trace, it hangs in trying homogeneous G

is this a known defect and could be resolved?

restart;
infolevel[dsolve]:=4;
dsolve(x^3*diff(y(x),x)^2+x*diff(y(x),x)-y(x) = 0,y(x))

... hangs

Adding different timelimits, it looks like the function gcd/LinZip is the culprit. Since it always seems to be there each time the timelimit expires (if it expires, sometimes it hangs even with timelimit).  But I noticed the above function many times in timelimit. So it seems the above functions is what causes many of the hangs I see.

Using `Lie` method, dsolved finishes almost instantly.

restart;
dsolve(x^3*diff(y(x),x)^2+x*diff(y(x),x)-y(x) = 0,y(x),'Lie')

This is on Maple 2020.2

It would be useful to know the cause of the hang, as fixing it could solve other problems.

I also notice that on Maple 2019.2 the first example above finished very fast also. So this is an issue that was introduced in Maple 2020.

All on windows 10.

I am having hard time controlling my Latex:-Settings now. The issue is that I do not know what each setting accepts as values, and what each value does.  The way I've been doing it is by collecting what useful ones posted in this forum, and what it does and save it in my cheat sheet. 

But now I see I need to change something, but not sure to what.

Is there a way to find what all the settings are, and description  of what each does and accepts as values? For example, 

            powersoftrigonometricfunctions

Accepts mixed and computernotation  But where are these described in terms of what they do? does it accept anything else?  Notice that ?leavespaceafterfunctionname does not show anything.

If I do 

restart;
Latex:-Settings()

it gives

[cacheresults = true, invisibletimes = " ", leavespaceafterfunctionname = false, 
powersoftrigonometricfunctions = mixed, spaceaftersqrt = true, usecolor = true, 
useimaginaryunit = I, useinputlineprompt = true, userestrictedtypesetting = false, 
usespecialfunctionrules = true, usetypesettingcurrentsettings = false]

But do not know how to obtain full description and possible value of each to see what they mean and do.

I think having Latex:-Settings() is a great idea, as it allows maximum flexibility for user to configure how they want the Latex output to be, but as more options are added, this type of information become more important to know and to keep track of.

I am using 2020.2 and Physics version 893

 

Maple seems to have difficulty computing this sum, which occurs in molecular physics of the H atom.

fd := j -> 2^8*j^5*(j-1)^(2*j-4)/(3*(j+1)^(2*j+4));

sum(fd(n)*ln(1-1/n^2), n=2..infinity);

Can anybody discover a solution, please?

It's been about a year since I've been able to display any worksheet at all on MaplePrimes. In the example below, I took a very simple worksheet that had been displayed in an Answer to another recent Question and tried to upload it. So, we know that it's somehow possible to display this particular worksheet on MaplePrimes.

Maple Worksheet - Error
Failed to load the worksheet /maplenet/convert/prove.mw .
Download prove.mw

hi. 

i want to plot these two equation that z is complex. 

i try it by implicitplot but for the second one it's not work. thank you

I was trying to find if the type of module wide variable is considered local or global.

I have an exported variable in module. Maple then said it was local . OK

restart;
foo:=module()
   export n::integer;
   export boo:=proc()::integer;
     return n;
   end proc;       
end module;
                   

n:=foo:-boo():
type(n,`local`);

               # true

But when I did this

restart;
foo:=module()
   export n::integer;
end module;

n:=foo:-n;
type(n,`local`)

         #false

Now Maple says it no longer local.

What is the difference? The module wide variable is exported in both cases. So one can access it directly like in the second example above, or via call to a proc inside the module, which returns it.

Why in one case it is local and in the second case it is not?

Ok, I found the issue. It seems when doing return  n; in the first example above, it created and returned a local n to the proc itself (where n was not declared in the example). (even though maplemint did not complain. Strange).

I have assumed when doing return n Maple will know this is the module wide variable n since that is the closest one around.  i.e. the proc is inside the module. And sits inside the module. So return n should referenced this variable. But it did not, because when I changed the code to this

restart;
foo:=module()
   export n::integer;
   export boo:=proc()::integer;
     return foo:-n;
   end proc;       
end module;

n:=foo:-boo():
type(n,`local`);

     #false

Now it returned false. The same as the second example.

But it also returned false when asking if it is global

n:=foo:-boo():
type(n,`global`);

    #false

So the module wide variable in this example is not local and is not global.

Is there another type to use to check if the variable/symbol returned is a module wide type?

Maple 2020.2

First 462 463 464 465 466 467 468 Last Page 464 of 2427