Maple 2019 Questions and Posts

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

Hi, 

I try using the DeepLearning package.
I use the function Classify and, even in the simplest test case presented in the its help page (please look at it), I regularly get connection errors to the mpython server as soon as I execute classifier := Classify(...) or classifier(...) more than once.
Errors are one of these twos

Error, (in Train) unable to communicate with mpython server
or
Error (in Python:-EvalFunction) unable to communicate with mpython server

I work with Windows 7 Enterprise, on an 8 proc PC and 64 GB of memory. The worst situation happened when Maple didn't even return these errors and that I saw inflating the consumed memory in 2 minutes, forcing me to manually shut down my PC because the task manager wasn't no longer  operational.

Is it a known problem?
Could it be an installation problem?


Even if it's not the point here, I would like to say that trying to use the DeepLearning package is really challenging considering the poverty of the help pages.

Hello all

I wanna solve an optimal control problem and I have searched the Internet but I could not find any tutorial or video course on how to solve it with the Pontryagin maximum principle method. It is my first time that I want to use MAPLE for solving an optimal control problem and I would be thankful if someone can help me.

$$\max \int_{0}^{1} x_{2} [u(t)-u(t)^2] dt        $$

$$  \dot{x}_{0} = -(1-u(t)) x_{0}(t)+2 x_{1}(t) $$

$$  \dot{x}_{1}(t) = (1-u_{t}) x_{0}(t) +2 x_{2}(t) -[3-u(t)]x_{1}(t)  $$

$$   \dot{x}_{2}(t) = (1-u(t))x_{1}(t) -2 x_{2}(t)   $$

$$  0 \le u_{t}  \le \frac{1+t^2}{1+t}  $$

 

Thanks

Moving to online learning has proved difficult to get any real 1 on 1 time or with my teachers around this question, and the help I have got hasn't helped me as yet. 

I understand that asking for homework help is probably frowned upon but I would appreciate any help, guidance or direction on how to answer the below in Maple2019. 

The general formula for a plane in the 3D space is z = ax + by + c, where a, b, c are the parameters. Alice encodes three English words to three numbers by using the Maple command "text2num". She then set up a (3,4) secret sharing scheme with the idea of the Blakley method. The four shares are four planes given by: 

z =   4x + 19y + 2515211725275120 (mod 2515211819051461)

z = 52x + 27y + 2515210613496048 (mod 2515211819051461)

z = 36x + 65y + 2515210981587340 (mod 2515211819051461)

z =   6x + 60y + 2515211676449260 (mod 2515211819051461).

Find the secret English words of Alice with Maple command 

I'm absolutely hitting a wall. The most I have found in the word "you".

Thanks in advance. 

I have been stuggling with this for a few hours. I have my function 4x^2+9y^2. I have my point (2,1,25). I found my gradient to be 16i+18j. I want to plot the level curve that contains the point (2,1,25) and the gradient together. 

I know how to graph multiple level curves but not one.

Thank you in advanced!

I am so sorry for all of the questions. I am getting extremely frustrated with Maple. 

I want to plot a 3D rendering of 4x^2+9y^2 but I want the full paraboloid to show. However, all I keep getting is cut off versions.

 

I would like to factor an algebraic expression that contains exponentials.
Maple spits it back unfactored. Did I enter it wrong?

factor(exp(4*y) + 2*exp(2*y) + 1);

I want the legend to be produced to look like the third to last example. https://fr.maplesoft.com/support/help/Maple/view.aspx?path=plots/contourplot 

However, mine keeps coming out like this.

please help me

 

 

restart:

Similar*solution

Similar*solution

(1)

eq11 := (10-9*lambda1)*n*diff(f(eta),eta,eta,eta)*(-diff(f(eta),eta,eta))^(n-1)-m*diff(f(eta),eta)^2+M^2*diff(f(eta),eta)+(m*(2*n-1)+1)/(n+1)*f(eta)*diff(f(eta),eta,eta)=0;

(10-9*lambda1)*n*(diff(diff(diff(f(eta), eta), eta), eta))*(-(diff(diff(f(eta), eta), eta)))^(n-1)-m*(diff(f(eta), eta))^2+M^2*(diff(f(eta), eta))+(m*(2*n-1)+1)*f(eta)*(diff(diff(f(eta), eta), eta))/(n+1) = 0

(2)

eq21 := (10-9*lambda1)*n*diff(theta(eta),eta,eta)*(-diff(theta(eta),eta))^(n-1)+(m*(2*n-1)+1)/(n+1)*f(eta)*diff(theta(eta),eta)-m*diff(f(eta), eta)*theta(eta)=0;

(10-9*lambda1)*n*(diff(diff(theta(eta), eta), eta))*(-(diff(theta(eta), eta)))^(n-1)+(m*(2*n-1)+1)*f(eta)*(diff(theta(eta), eta))/(n+1)-m*(diff(f(eta), eta))*theta(eta) = 0

(3)

bc21:= f(0)=0, D(f)(0)=1+alpha*(D@@2)(f)(0), D(f)(N)=0, theta(0)=1+b*D(theta)(0), theta(N)=0;

f(0) = 0, (D(f))(0) = 1+alpha*((D@@2)(f))(0), (D(f))(N) = 0, theta(0) = 1+b*(D(theta))(0), theta(N) = 0

(4)

 

n:=1.2: b:=0: M:=0: alpha:=0:

N:=6:

 

m:=0.8:

A11:=dsolve({eq11,eq21,bc21},numeric,continuation=lambda1,maxmesh=15000, output=array([seq( i, i=0..N,0.01 )])):

Error, (in unknown) unable to store '-HFloat(1.03827200589718e-4)+HFloat(7.543487679217342e-5)*I' when datatype=float[8]

 

m:=1.2:

A12:=dsolve({eq11,eq21,bc21},numeric,continuation=lambda1,maxmesh=15000, output=array([seq( i, i=0..N,0.01 )])):

Error, (in unknown) unable to store '-HFloat(1.239112373179345e-4)+HFloat(9.002678360924433e-5)*I' when datatype=float[8]

 

m:=2:

A13:=dsolve({eq11,eq21,bc21},numeric,continuation=lambda1,maxmesh=15000, output=array([seq( i, i=0..N,0.01 )])):

Error, (in unknown) unable to store '-HFloat(5.684098069533373e-5)+HFloat(4.129738980869168e-5)*I' when datatype=float[8]

 

 

 

with(plots):

p1:=odeplot(A11, [[eta,f(eta),color=red,linestyle=2]],0..N):
p2:=odeplot(A12, [[eta,f(eta),color=blue,linestyle=2]],0..N):
p3:=odeplot(A13, [[eta,f(eta),color=green,linestyle=2]],0..N):

Error, (in plots/odeplot) input is not a valid dsolve/numeric solution

 

Error, (in plots/odeplot) input is not a valid dsolve/numeric solution

 

Error, (in plots/odeplot) input is not a valid dsolve/numeric solution

 

 

display({p1,p2,p3}, axes=boxed,  title=`velerature Profiles:`);

Error, (in plots:-display) expecting plot structures but received: {p1, p2, p3}

 

 

 

for j from 1 to 100*(N-1) do eta[j]:=A11[2,1][j,1] end do:

for j from 1 to 100*(N-1) do vel1[j]:=A11[2,1][j,2] end do:

for j from 1 to 100*(N-1) do vel2[j]:=A12[2,1][j,2] end do:

for j from 1 to 100*(N-1) do vel3[j]:=A13[2,1][j,2] end do:

 

with(LinearAlgebra):
E1:= <<seq(eta[j], j=1..100*(N-1) )>|<seq(vel1[j], j=1..100*(N-1) )>|<seq(vel2[j], j=1..100*(N-1) )>|<seq(vel3[j], j=1..100*(N-1))>>;

_rtable[18446746174193268126]

(5)

 

#ExportMatrix("F:/D/Drive D/Local/Rashad/Paper 9/vel1.txt", E1, format = rectangular):

 

NULL

with(plots):

p1:=odeplot(A11, [[eta,theta(eta), color=red,linestyle=2]],0..N):
p2:=odeplot(A12, [[eta,theta(eta), color=blue,linestyle=2]],0..N):
p3:=odeplot(A13, [[eta,theta(eta), color=green,linestyle=2]],0..N):

Error, (in plots/odeplot) input is not a valid dsolve/numeric solution

 

Error, (in plots/odeplot) input is not a valid dsolve/numeric solution

 

Error, (in plots/odeplot) input is not a valid dsolve/numeric solution

 

 

display({p1,p2,p3}, axes=boxed,  title=`temperature Profiles:`);

Error, (in plots:-display) expecting plot structures but received: {p1, p2, p3}

 

 

``

"[[eta,F(eta),(&DifferentialD;)/(&DifferentialD;eta) F(eta),((&DifferentialD;)^2)/(&DifferentialD;eta^2) F(eta),Theta(eta),(&DifferentialD;)/(&DifferentialD;eta) Theta(eta),f(eta),(&DifferentialD;)/(&DifferentialD;eta) f(eta),((&DifferentialD;)^2)/(&DifferentialD;eta^2) f(eta),theta(eta),(&DifferentialD;)/(&DifferentialD;eta) theta(eta)]]"

for j from 1 to 100*(N-1) do eta[j]:=A11[2,1][j,1] end do:

for j from 1 to 100*(N-1) do temp1[j]:=A11[2,1][j,5] end do:

for j from 1 to 100*(N-1) do temp2[j]:=A12[2,1][j,5] end do:

for j from 1 to 100*(N-1) do temp3[j]:=A13[2,1][j,5] end do:

 

with(LinearAlgebra):
E2:= <<seq(eta[j], j=1..100*(N-1) )>|<seq(temp1[j], j=1..100*(N-1) )>|<seq(temp2[j], j=1..100*(N-1) )>|<seq(temp3[j], j=1..100*(N-1))>>;

_rtable[18446746174193227646]

(6)

#ExportMatrix("F:/D/Drive D/Local/Rashad/Paper 9/temp1.txt", E2, format = rectangular):

 

 

NULL

Download text.mw

Dear Community,

I have a four compartment flow model described with the following system of linear ODEs:

diff(L[1](t), t) = L[2](t)/T[21] - L[1](t)/T[12]

diff(L[2](t), t) = L[1](t)/T[12] - L[2](t)/T[21] + L[3](t)/T[32] - L[2](t)/T[23] + Q(t)

diff(L[3](t), t) = L[2](t)/T[23] - L[3](t)/T[32] + L[4](t)/T[43] - L[3](t)/T[34]

diff(L[4](t), t) = L[3](t)/T[34] - L[4](t)/T[43]

(For easier readability I’ve also described the problem in the attached FourCompartmentModelDescription.docx Word file.)

 

The time constants are as follows:

T12 = 23.1481 d

T21 = 5.4537 d

T23 =  9.752 d

T32 = 14.9007 d

T34 = 8.8235 d

T43 = 363.7255 d

Initial conditions are as follows:

L1(0) = 2500.

L2(0) = 589.

L3(0) = 900.

L4(0) = 37100.

Simulation should run from 0 to 400 d.

Could you pls. help me, to solve it numerically in Maple? As a solution I would need L1(t), L2(t), L3(t) and L4(t) both numerically and graphically. I used Maple to solve ODEs previously, but this time I don’t know, how to correctly specify the problem with an external, tabulated source. I’ve also prepared and attached a Maple worksheet, but did not try to run it yet. (FourCompartments.mw). The external Q(t) source for compartment 2 is attached as Source.xlsx. Should I've forgotten something, pls. let me know.

Your kind help is appreciated in advance,

best regards

Andras

 

MaplePrimesFourCompartmentModelDescription.docx

FourCompartments.mw

Source.xlsx

Hi everyone.

I have a 2D function and I wanna after Differentiating from it with respect to tau (at any amount of sigma value) and equaling this derivative to zero solve the infinite system of equations.

P[n](tau)==LegendreP(n - 1/2, cosh(tau)) , Q[n](tau)==LegendreQ(n - 1/2, cosh(tau)) 

are Legendre function.

Thanks in advanced

FUNCTION_f.mw


 

"restart;:N:=3: f(sigma,tau):=(sqrt(cosh(tau)-cos(sigma)))*(&sum;)(A[n]*P[n]((tau)) -n*Q[n]((tau)) )*sin(n*sigma)"

proc (sigma, tau) options operator, arrow, function_assign; sqrt(cosh(tau)-cos(sigma))*(sum((A[n]*P[n](tau)-n*Q[n](tau))*sin(n*sigma), n = 1 .. N)) end proc

(1)

NULL

W := simplify(diff(f(sigma, tau), tau))

(1/2)*((2*A[2]*(cosh(tau)-cos(sigma))*(diff(P[2](tau), tau))+(-4*cosh(tau)+4*cos(sigma))*(diff(Q[2](tau), tau))+sinh(tau)*(A[2]*P[2](tau)-2*Q[2](tau)))*sin(2*sigma)+(2*A[3]*(cosh(tau)-cos(sigma))*(diff(P[3](tau), tau))+(-6*cosh(tau)+6*cos(sigma))*(diff(Q[3](tau), tau))+sinh(tau)*(A[3]*P[3](tau)-3*Q[3](tau)))*sin(3*sigma)+sin(sigma)*(2*A[1]*(cosh(tau)-cos(sigma))*(diff(P[1](tau), tau))+(-2*cosh(tau)+2*cos(sigma))*(diff(Q[1](tau), tau))+sinh(tau)*(A[1]*P[1](tau)-Q[1](tau))))/(cosh(tau)-cos(sigma))^(1/2)

(2)

``


 

Download FUNCTION_f.mw

The following transfer function has zero/pole cancelation. I am trying to create a transfer function object, but Maple automatically simplifies the transfer function before it gets to the DynamicSystem call, which result in different output than what I expected.

I do set the cancellation=false option, even though this is the default. The problem is Maple does pole/zero cancelation before the call.

I tried to add '' around it to delay evaluation, but it did not work.  

restart;
alias(DS=DynamicSystems):
DS:-SystemOptions(cancellation=false,complexfreqvar=s):
tf:=DS:-TransferFunction('-(s - 1)/((-2 + s)*(s - 1))'):
DS:-PrintSystem(tf)

You can see it did pole/zero cancelation.

In Matlab and Mathematica, this does not happen. For example

Clear["Global`*"];
sys = TransferFunctionModel[-(s - 1)/((-2 + s) (s - 1)), s]

Same with Matlab:

>> s=tf('s');
>> sys_tf =-(s - 1)/((-2 + s)*(s - 1))

sys_tf =
 
     -s + 1
  -------------
  s^2 - 3 s + 2
 
Continuous-time transfer function.

What do I need to do in Maple to keep the transfer function without pole/zero cancelation (this affects the state space realization later on when this cancelation happens)

I am using Maple 2019 at this moment as Maple 2020 is busy.

 

I am using Maple to solve a system of ODEs numerically. Right now, I want to find the integration of the output of the system of ODEs. How it is possible to do this? 

F := dsolve(ODESys union ICs, {y0(t), y1(t), y2(t), y3(t)}, type = numeric)

Y0 := t -> rhs(op(2, F(t)))

Now, I want to find int(Y0,t=0..1).

How I can prove the following equation in red box.

Also, Pn(v) and qn(v) are the real combinations of half-integer Legendre functions.

For more details please see 

https://math.stackexchange.com/questions/2746660/potential-flow-around-a-torus-laplace-equation-in-toroidal-coordinates/3809487#3809487

Hello

I need Nu[a] in the label of y-axis.

i am writing      labels = [eta, 'Nu[a]'(eta)] but I am not getting. Please help me for writing correct code.

 

Here are 4 statements that attempt to use invlaplace on the exponential function. Two work, two don't.

Does anyone know why the two that don't work do that?

Thank you.

__________________________

with(inttrans);
[addtable, fourier, fouriercos, fouriersin, hankel, hilbert,   invfourier, invhilbert, invlaplace, invmellin, laplace, mellin,   savetable]
invlaplace(exp(-s),s,t);
                          Dirac(t - 1)
invlaplace(exp(s),s,t);
                    invlaplace(exp(s), s, t)
invlaplace(exp(s),s,t) assuming s<0,s::real;
                    invlaplace(exp(s), s, t)

invlaplace(exp(-s),s,t) assuming s<0,s::real;
                          Dirac(t - 1)
What is going on here?
 

First 14 15 16 17 18 19 20 Last Page 16 of 47