Maple 2022 Questions and Posts

These are Posts and Questions associated with the product, Maple 2022

Hi everyone,

I'm having trouble in maple to do the following:
Plot the curve x^3-4xy+2y^3=0 , as x variesbetween -3 and 3 with the aid of the implicitplot command

find dy/dx at all points (x,y) on the curve for which x=1. and find the equations of the lines tangent to the curve at the points

plot the curve and tangent lines on the same set of axes

Any help would be appreciated , thank you.

Why does no substitution work on functions with s(n+1,t) (see eqns (2-8))? Also (∂)/(∂ (sigma2*t))=1/(sigma2)(∂)/(∂ t), how can I do it on Maple?shift.mw

I am trying to load the third-party package 'CPC Program Library (qub.ac.uk)' by following the instructions as in 'how to install wkptest? - MaplePrimes'. But encounter with Errors: '

Error, `:` unexpected
with(wkptest);
Error, invalid input: with expects its 1st argument, pname, to be of type {`module`, package}, but received wkptest

restart:

sourcefolder:=cat(kernelopts('C:\Users\ahmed\Downloads\adty_v1_0'),"/wkptest");
installfolder:=cat(kernelopts('homedir'),"/maple/toolbox/wkptest/lib");
FileTools:-MakeDirectory(installfolder, 'recurse'=true);
libraryfile:=cat(installfolder,"/wkptest.mla");
try
  FileTools:-Remove(libraryfile);
catch:
end try:
LibraryTools:-Create(libraryfile);
libname:=libraryfile,libname;
read cat(sourcefolder,"/wkptest_cpc");

Error, `:` unexpected

 

with(wkptest);

Error, invalid input: with expects its 1st argument, pname, to be of type {`module`, package}, but received wkptest

 
 

 

Download exam_wkptest1.mws

How can I make if-statement work in my code?
assuming m,n :: integers
Thank you in advance.

restart;

 

x2 := proc(m,n)
  if ((is(m,even) and is(n,odd)) or (is(m,odd)and is(n,even))) then -8*L*m*n/(m+n)^2/Pi^2/(m-n)^2;
  else  0;
  end if;
end poc:

Error, missing operator or `;`

 


Download test2.mw

How can I  get the result for the integration when m =n or m is not equal to n and How can I add assumption that m, or n can be even or odd?

Thanks in advance for your help.

 

restart;
phi := proc(k,x,L)
  if (type(k,even)) then sqrt(2)*sin(Pi*k*x/L)/sqrt(L)
  else sqrt(2)*cos(Pi*k*x/L)/sqrt(L)
  end if;
end proc:

Int(phi(m,x,L)*_h^2/m2*diff(phi(n,x,L),x,x),x=-L/2..L/2);

Int(-2*cos(Pi*m*x/L)*_h^2*Pi^2*n^2*cos(Pi*n*x/L)/(L^3*m2), x = -(1/2)*L .. (1/2)*L)

(1)
 

 

Download test1.mw

 

ras5_v1.mw 

How can I  change eq13 to eq14 without using op command manually?

Thank you for your help in advance,

Hey! I need help ASAP, because my maple file has been corrupted and i dont know what to do. Do you guys know how to recover a file? i can save it again as_mw. but should i change it to xml? or how? i have the link to my maple file attached, so if someone can help me, it could be helpful! Because i have an upcoming exam. Thanks youu

 

Dear All,
I want to simplify the following trigonometric expression, considering that m is an integer number. For this, I use the following command:

expr:= 4*cos(Pi*m)/(Pi*(2*m + 1)); 
simplify(%, assume=integer);
factor(%);

However, if I want to simplify the following trigonometric expression, m is an integer number, and alpha is a real number, using the following command will lead to the wrong answer because alpha is also considered an integer number. Please guide me.

4*cos(Pi*m+2*alpha*Pi)/(Pi*(2*m + 1));
simplify(%, assume=integer);
factor(%);

Best wishes

How can I make a legend for this plot?

 

plot([17.85*(2.65*t^2 + 1 + 3*t)^2/t^2, 17.85*(2.65*t^2 - 47 + 3*t)^2/t^2, 17.85*(2.65*t^2 - 97 + 3*t)^2/t^2, 17.85*(2.65*t^2 - 147 + 3*t)^2/t^2, 17.85*(2.65*t^2 - 197 + 3*t)^2/t^2], t = 0 .. 25, labels = ['t', 'x'], labelfont = [Times, 12])

 I got the following figure.

 plot([17.85*(2.65*t^2 + 1 + 3*t)^2/t^2, 17.85*(2.65*t^2 - 47 + 3*t)^2/t^2, 17.85*(2.65*t^2 - 97 + 3*t)^2/t^2, 17.85*(2.65*t^2 - 147 + 3*t)^2/t^2, 17.85*(2.65*t^2 - 197 + 3*t)^2/t^2], t = 0 .. 25, labels = ['t', 'x'], labelfont = [Times, 12])


Now I want to put a legend box in this plot for each color line. How can I do it?
 

Dear Maple community,

I am facing a little problem verifying a power series solution obtained with Maple since the direct substitution back into the PDEs does not seem to be conclusive because the residual contains the powers of independent variables to almost any order.

Please see the enclosed Maple file with a minimal working example:

restart:

with(DETools):

PDE1 := diff(eta(t,x),t) + 1/2*diff(u(t,x),x) + 1/2*eta(t,x)*diff(u(t,x),x) - 1/48*diff(u(t,x),x$3) + diff(eta(t,x),x)*u(t,x);

diff(eta(t, x), t)+(1/2)*(diff(u(t, x), x))+(1/2)*eta(t, x)*(diff(u(t, x), x))-(1/48)*(diff(diff(diff(u(t, x), x), x), x))+(diff(eta(t, x), x))*u(t, x)

(1)

PDE2 := diff(u(t,x),t) + u(t,x)*diff(u(t,x),x) + diff(eta(t,x),x,t,t) + diff(eta(t,x),x) - 1/6*diff(u(t,x),x,x,t);

diff(u(t, x), t)+u(t, x)*(diff(u(t, x), x))+diff(diff(diff(eta(t, x), t), t), x)+diff(eta(t, x), x)-(1/6)*(diff(diff(diff(u(t, x), t), x), x))

(2)

sys := rifsimp([PDE1, PDE2]);

table( [( Solved ) = [diff(diff(diff(eta(t, x), t), t), x) = -u(t, x)*(diff(u(t, x), x))-(diff(u(t, x), t))+(1/6)*(diff(diff(diff(u(t, x), t), x), x))-(diff(eta(t, x), x)), diff(diff(diff(u(t, x), x), x), x) = 24*eta(t, x)*(diff(u(t, x), x))+48*(diff(eta(t, x), x))*u(t, x)+48*(diff(eta(t, x), t))+24*(diff(u(t, x), x))] ] )

(3)

id := initialdata(sys[Solved]);

table( [( Finite ) = [], ( Infinite ) = [eta(t, x[0]) = _F1(t), (D[2](eta))(t[0], x) = _F2(x), (D[1, 2](eta))(t[0], x) = _F3(x), u(t, x[0]) = _F4(t), (D[2](u))(t, x[0]) = _F5(t), (D[2, 2](u))(t, x[0]) = _F6(t)] ] )

(4)

sols := rtaylor(sys[Solved], id, point=[t = 0, x = 0], order = 3);

[eta(t, x) = _F1(0)+(D(_F1))(0)*t+_F2(0)*x+(1/2)*((D@@2)(_F1))(0)*t^2+_F3(0)*t*x+(1/2)*(D(_F2))(0)*x^2+(1/6)*((D@@3)(_F1))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)*_F4(0)+(_F2(0)+_F3(0)*t+(D(_F2))(0)*x+(1/2)*(-_F4(0)*_F5(0)-(D(_F4))(0)+(1/6)*(D(_F6))(0)-_F2(0))*t^2+(D(_F3))(0)*t*x+(1/2)*((D@@2)(_F2))(0)*x^2)*(_F4(0)+(D(_F4))(0)*t+_F5(0)*x+(1/2)*((D@@2)(_F4))(0)*t^2+(D(_F5))(0)*t*x+(1/2)*_F6(0)*x^2+(1/6)*((D@@3)(_F4))(0)*t^3+(1/2)*((D@@2)(_F5))(0)*t^2*x+(1/2)*(D(_F6))(0)*t*x^2+(1/6)*(24*_F1(0)*_F5(0)+48*_F2(0)*_F4(0)+48*(D(_F1))(0)+24*_F5(0))*x^3)

(6)

simplify(PDE2);

((D@@2)(_F4))(0)*t+(D(_F5))(0)*x+(1/2)*((D@@3)(_F4))(0)*t^2+((D@@2)(_F5))(0)*t*x+(1/2)*(D(_F6))(0)*x^2+(_F4(0)+(D(_F4))(0)*t+_F5(0)*x+(1/2)*((D@@2)(_F4))(0)*t^2+(D(_F5))(0)*t*x+(1/2)*_F6(0)*x^2+(1/6)*((D@@3)(_F4))(0)*t^3+(1/2)*((D@@2)(_F5))(0)*t^2*x+(1/2)*(D(_F6))(0)*t*x^2+(1/6)*(24*_F1(0)*_F5(0)+48*_F2(0)*_F4(0)+48*(D(_F1))(0)+24*_F5(0))*x^3)*(_F5(0)+(D(_F5))(0)*t+_F6(0)*x+(1/2)*((D@@2)(_F5))(0)*t^2+(D(_F6))(0)*t*x+(1/2)*(24*_F1(0)*_F5(0)+48*_F2(0)*_F4(0)+48*(D(_F1))(0)+24*_F5(0))*x^2)-_F4(0)*_F5(0)+_F3(0)*t+(D(_F2))(0)*x-(1/2)*t^2*(_F4(0)*_F5(0)+_F2(0)+(D(_F4))(0)-(1/6)*(D(_F6))(0))+(D(_F3))(0)*t*x+(1/2)*((D@@2)(_F2))(0)*x^2

(7)

NULL

Download MinWorkingExa.mw

Thanks a lot in advance for any help or suggestions.

Kind regards,

DDe

Suppose I have an expression like the following:

h(t, x) :=  (m*t^2 + 6*t - 2*x)^2/(36*g*t^2)

I want to calculate multiple values of t in a single expression. Say, for t:= 1,5,10,15,20. I want to evaluate h(t,x) in vector form. so that I can extract for each t. How to write it?

 

How do we define a matrix or a vector of the partial differential operator?
 

How to evaluate the right eigenvector of a given matrix in maple?

How to obtain the commutator table of the infinitesimal generators?
Can we obtain a commutator table by using any inbuild command in pdetools?

I got a plot by following the code in Mpale 2022.
restart;
with(plots);
P2 := plot3d(-t^2 + x, t = 0 .. 20, x = 0 .. 400, labels = ['t', 'x', 'rho'], labelfont = [Times, 15], viewpoint = "circleleft", colorscheme = ["ygradient", ["Green", "Purple", "Blue", "Red", "BlueViolet"]]);
plotsetup(ps, plotoutput = "P2");
print(P2);


Then I tried the following code for the overleaf. However, I did not get the desired result.

\documentclass[11pt]{article}
\usepackage{graphicx}
\usepackage{epsfig}

\begin{document}
Plot obtained from Maple 2022. \\

\includegraphics[width=0.9\textwidth]{P2.eps}
\end{document}

plotting_file.pdf

Any help is highly appreciated.
Thanks
Deb

5 6 7 8 9 10 11 Last Page 7 of 42