Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

On joint un point M  d'une ellipse aux foyers F1 et F2.  Les droites MF1 et MF2 recoupent l'ellipse aux points H1 et H2 ,  trouver l'enveloppe de la droite H1H2,  quand le point M se `déplace` sur l'ellipse.;


restart;
Fig := proc(t) local a, b, c, courbe, sol, sol1, dr, tx; _EnvHorizontalName := 'x'; _EnvVerticalName := 'y'; a := 11; b := 7; c := sqrt(a^2 - b^2); geometry:-ellipse(e1, x^2/a^2 + y^2/b^2 = 1); geometry:-point(Oo, 0, 0); geometry:-point(M, a*cos(t), b*sin(t)); geometry:-point(F1, -c, 0); geometry:-point(F2, c, 0); geometry:-line(MF1, [M, F1]); geometry:-line(MF2, [M, F2]); sol := solve({geometry:-Equation(MF1), x^2/a^2 + y^2/b^2 = 1}, {x, y}, explicit); print(%); geometry:-point(H1, subs(sol[2], x), subs(sol[2], y)); geometry:-line(MH1, [M, H1]); sol := solve({geometry:-Equation(MF2), x^2/a^2 + y^2/b^2 = 1}, {x, y}, explicit); print(%); geometry:-point(H2, subs(sol[2], x), subs(sol[2], y)); geometry:-line(MH2, [M, H2]); courbe := plots:-implicitplot(x^2/a^2 + (a^2 + c^2)^2*y^2/b^2 - 1 = 0, x = -a .. a, y = -b .. b, color = cyan); tx := plots:-textplot([[geometry:-coordinates(M)[], "M"], [geometry:-coordinates(Oo)[], "O"], [geometry:-coordinates(H1)[], "H1"], [geometry:-coordinates(H2)[], "H2"], [geometry:-coordinates(F1)[], "F1"], [geometry:-coordinates(F2)[], "F2"]], font = [times, bold, 16], align = [above, left]); dr := geometry:-draw([e1(color = blue), MH1(color = magenta), MH2(color = magenta), M(color = red, symbol = solidcircle, symbolsize = 12), H1(color = red, symbol = solidcircle, symbolsize = 12), H2(color = red, symbol = solidcircle, symbolsize = 12), F1(color = red, symbol = solidcircle, symbolsize = 12), F2(color = red, symbol = solidcircle, symbolsize = 12), Oo(color = red, symbol = solidcircle, symbolsize = 12)]); plots:-display([dr, tx, courbe], scaling = constrained, axes = normal, title = "Ellipse et normales ", titlefont = [HELVETICA, 14]); end proc;
Fig(Pi/3);
    /    11      7  (1/2)\    /      26411   210177  (1/2)  
   { x = --, y = - 3      }, { x = - ----- - ------ 2     , 
    \    2       2       /    \      57074   28537          

         11319  (1/2)  (1/2)   66199  (1/2)\ 
     y = ----- 3      2      - ----- 3      }
         28537                 57074       / 


     /    11      7  (1/2)\    /    210177  (1/2)   26411  
    { x = --, y = - 3      }, { x = ------ 2      - -----, 
     \    2       2       /    \    28537           57074  

            11319  (1/2)  (1/2)   66199  (1/2)\ 
      y = - ----- 3      2      - ----- 3      }
            28537                 57074       / 

Fig(Pi/6);
   /      104027  (1/2)   17787  (1/2)  (1/2)   123420  (1/2)
  { x = - ------ 3      + ----- 3      6      - ------ 2     
   \      22226           11113                 11113        

       19404  (1/2)  (1/2)        66199   11319  (1/2)\   
     + ----- 2      6     , y = - ----- + ----- 6      }, 
       11113                      22226   11113       /   

     /    11  (1/2)      7\ 
    { x = -- 3     , y = - }
     \    2              2/ 


Error, (in geometry:-line) the line is not defined
plots:-animate(Fig, [t], t = 0.1 .. 2*Pi, frames = 150);
            {x = -10.99908244, y = -0.09041172732}, 

              {x = 10.94504582, y = 0.6988339166}


Error, (in plots/animate) the line is not defined
;
NULL;
Thank you for your help.

I am trying to calculate a probability density function for the distance between two points inside a unit circle.  I have succeeded with doing this for a few differing applications, but I am stuck on this problem.  I use uniformly distributed polar coordinates to find x and y values for two independent points.  When I ask for the PDF of the distance, I get a FAIL.

I am assuming that such a calculation is possible, I've succeeded with similar problems, but here I am stuck.  I hope my problem is rooted in my lack of knowledge, as opposed to a limitation of Maple.

Here are my Maple statements:

with(Statistics);
th1 := RandomVariable(Uniform(0, 2*Pi));
th2 := RandomVariable(Uniform(0, 2*Pi));
r1 := RandomVariable(Uniform(0, 1));
r2 := RandomVariable(Uniform(0, 1));
x1 := r1*cos(th1);
y1 := r1*sin(th1);
x2 := r2*cos(th2);
y2 := r2*sin(th2);
Dist := sqrt((x1 - x2)^2 + (y1 - y2)^2);
f := simplify(PDF(Dist, t));

Does anyone have any idea as to what I am doing wrong?  Thank you.


 

restart

_local(gamma)

Warning, A new binding for the name `gamma` has been created. The global instance of this name is still accessible using the :- prefix, :-`gamma`.  See ?protect for details.

 

with(plots)

NULL

sol3 := sqrt(2)*sqrt(-tau*gamma)*tanh(x-tau*t^alpha/alpha)*exp(I*gamma*(x+((2*gamma^3*tau-4*gamma*tau+8*tau^2)/(2*gamma^2)-tau*gamma)*t^alpha/((gamma-2*tau)*alpha)))/gamma

NULL

lprint(indets(sol3, name))

{alpha, gamma, t, tau, x}

 

NULL

P :=   [ alpha=1, gamma=-2,  tau=3]

[alpha = 1, gamma = -2, tau = 3]

(1)

PP := convert(sol3, polar)

polar(2^(1/2)*abs(tau*gamma)^(1/2)*exp(-Im(gamma*(x+((1/2)*(2*gamma^3*tau-4*gamma*tau+8*tau^2)/gamma^2-tau*gamma)*t^alpha/((gamma-2*tau)*alpha))))*abs(tanh(x-tau*t^alpha/alpha)/gamma), argument((-tau*gamma)^(1/2)*tanh(x-tau*t^alpha/alpha)*exp(I*gamma*(x+((1/2)*(2*gamma^3*tau-4*gamma*tau+8*tau^2)/gamma^2-tau*gamma)*t^alpha/((gamma-2*tau)*alpha)))/gamma))

(2)

polarplot(sol3, x = -20 .. 20, t = 0 .. 10, axis[radial] = [color = "Blue"])

NULL

Download polar.mw

How do I get my actual solution which involves _Z? I have  tried answers that w ere given on questions related to _Z in a solution but mine is not working. I am completely new to Maple ,kindly help me.

eq1 := Lambda[h]+rho[2]*R[h]-(b[h]+kappa+beta[1])*S[h] = 0

Lambda[h]+rho[2]*R[h]-(b[h]+kappa+beta[1])*S[h] = 0

(1)

eq2 := T[h] = 0

T[h] = 0

(2)

eq3 := R[h]-kappa*S[h]/(rho[2]+b[h]) = 0

R[h]-kappa*S[h]/(rho[2]+b[h]) = 0

(3)

eq4 := Lambda[m]*L-(alpha+pi)*S[m] = 0

Lambda[m]*L-(alpha+pi)*S[m] = 0

(4)

eq5 := c(1-L/K)*S[m]-(d+Lambda[m])*L = 0

c(1-L/K)*S[m]-(d+Lambda[m])*L = 0

(5)

sol := solve({eq1, eq2, eq3, eq4, eq5}, [T[h], S[h], R[h], L, S[m]])

[[T[h] = 0, S[h] = Lambda[h]*(rho[2]+b[h])/(kappa*b[h]+b[h]^2+b[h]*beta[1]+b[h]*rho[2]+beta[1]*rho[2]), R[h] = kappa*Lambda[h]/(kappa*b[h]+b[h]^2+b[h]*beta[1]+b[h]*rho[2]+beta[1]*rho[2]), L = 0, S[m] = 0], [T[h] = 0, S[h] = Lambda[h]*(rho[2]+b[h])/(kappa*b[h]+b[h]^2+b[h]*beta[1]+b[h]*rho[2]+beta[1]*rho[2]), R[h] = kappa*Lambda[h]/(kappa*b[h]+b[h]^2+b[h]*beta[1]+b[h]*rho[2]+beta[1]*rho[2]), L = (alpha+pi)*RootOf(-c((K*Lambda[m]-_Z*alpha-_Z*pi)/(K*Lambda[m]))*Lambda[m]+d*alpha+Lambda[m]*alpha+d*pi+Lambda[m]*pi)/Lambda[m], S[m] = RootOf(-c((K*Lambda[m]-_Z*alpha-_Z*pi)/(K*Lambda[m]))*Lambda[m]+d*alpha+Lambda[m]*alpha+d*pi+Lambda[m]*pi)]]

(6)

DF := sol[1]

[T[h] = 0, S[h] = Lambda[h]*(rho[2]+b[h])/(kappa*b[h]+b[h]^2+b[h]*beta[1]+b[h]*rho[2]+beta[1]*rho[2]), R[h] = kappa*Lambda[h]/(kappa*b[h]+b[h]^2+b[h]*beta[1]+b[h]*rho[2]+beta[1]*rho[2]), L = 0, S[m] = 0]

(7)

DF2 := sol[2]

[T[h] = 0, S[h] = Lambda[h]*(rho[2]+b[h])/(kappa*b[h]+b[h]^2+b[h]*beta[1]+b[h]*rho[2]+beta[1]*rho[2]), R[h] = kappa*Lambda[h]/(kappa*b[h]+b[h]^2+b[h]*beta[1]+b[h]*rho[2]+beta[1]*rho[2]), L = (alpha+pi)*RootOf(-c((K*Lambda[m]-_Z*alpha-_Z*pi)/(K*Lambda[m]))*Lambda[m]+d*alpha+Lambda[m]*alpha+d*pi+Lambda[m]*pi)/Lambda[m], S[m] = RootOf(-c((K*Lambda[m]-_Z*alpha-_Z*pi)/(K*Lambda[m]))*Lambda[m]+d*alpha+Lambda[m]*alpha+d*pi+Lambda[m]*pi)]

(8)

"(=)"

[T[h] = 0, S[h] = Lambda[h]*(rho[2]+b[h])/(b[h]^2+(kappa+rho[2]+beta[1])*b[h]+beta[1]*rho[2]), R[h] = kappa*Lambda[h]/(b[h]^2+(kappa+rho[2]+beta[1])*b[h]+beta[1]*rho[2]), L = (alpha+pi)*RootOf(-c((K*Lambda[m]-_Z*alpha-_Z*pi)/(K*Lambda[m]))*Lambda[m]+d*alpha+Lambda[m]*alpha+d*pi+Lambda[m]*pi)/Lambda[m], S[m] = RootOf(-c((K*Lambda[m]-_Z*alpha-_Z*pi)/(K*Lambda[m]))*Lambda[m]+d*alpha+Lambda[m]*alpha+d*pi+Lambda[m]*pi)]

(9)

"(=)"

[T[h] = 0, S[h] = Lambda[h]*(rho[2]+b[h])/(b[h]^2+(kappa+rho[2]+beta[1])*b[h]+beta[1]*rho[2]), R[h] = kappa*Lambda[h]/(b[h]^2+(kappa+rho[2]+beta[1])*b[h]+beta[1]*rho[2]), L = (alpha+pi)*RootOf(-c((K*Lambda[m]-_Z*alpha-_Z*pi)/(K*Lambda[m]))*Lambda[m]+d*alpha+Lambda[m]*alpha+d*pi+Lambda[m]*pi)/Lambda[m], S[m] = RootOf(-c((K*Lambda[m]-_Z*alpha-_Z*pi)/(K*Lambda[m]))*Lambda[m]+d*alpha+Lambda[m]*alpha+d*pi+Lambda[m]*pi)]

(10)

solve({eq4, eq5}, [L, S[m]], explicit)

[[L = 0, S[m] = 0], [L = (alpha+pi)*RootOf(-c((K*Lambda[m]-_Z*alpha-_Z*pi)/(K*Lambda[m]))*Lambda[m]+d*alpha+Lambda[m]*alpha+d*pi+Lambda[m]*pi)/Lambda[m], S[m] = RootOf(-c((K*Lambda[m]-_Z*alpha-_Z*pi)/(K*Lambda[m]))*Lambda[m]+d*alpha+Lambda[m]*alpha+d*pi+Lambda[m]*pi)]]

(11)

theIndets := indets(indets(sol, atomic))

{K, L, alpha, d, kappa, pi, Lambda[h], Lambda[m], R[h], S[h], S[m], T[h], b[h], beta[1], rho[2]}

(12)

allvalues(sol)

[[T[h] = 0, S[h] = Lambda[h]*(rho[2]+b[h])/(kappa*b[h]+b[h]^2+b[h]*beta[1]+b[h]*rho[2]+beta[1]*rho[2]), R[h] = kappa*Lambda[h]/(kappa*b[h]+b[h]^2+b[h]*beta[1]+b[h]*rho[2]+beta[1]*rho[2]), L = 0, S[m] = 0], [T[h] = 0, S[h] = Lambda[h]*(rho[2]+b[h])/(kappa*b[h]+b[h]^2+b[h]*beta[1]+b[h]*rho[2]+beta[1]*rho[2]), R[h] = kappa*Lambda[h]/(kappa*b[h]+b[h]^2+b[h]*beta[1]+b[h]*rho[2]+beta[1]*rho[2]), L = -K*(RootOf(-c(_Z)*Lambda[m]+d*alpha+Lambda[m]*alpha+d*pi+Lambda[m]*pi)-1), S[m] = -K*Lambda[m]*(RootOf(-c(_Z)*Lambda[m]+d*alpha+Lambda[m]*alpha+d*pi+Lambda[m]*pi)-1)/(alpha+pi)]]

(13)

NULL

``

Download maple_code_for_disease_equilibruim.mw

How i can find parameter after substitution in our pde 

restart

with(PDEtools)

with(LinearAlgebra)

NULL

with(SolveTools)

undeclare(prime)

`There is no more prime differentiation variable; all derivatives will be displayed as indexed functions`

(1)

declare(u(x, t))

u(x, t)*`will now be displayed as`*u

(2)

declare(f(x, t))

f(x, t)*`will now be displayed as`*f

(3)

pde := diff(u(x, t), `$`(x, 3))+6*u(x, t)*(diff(u(x, t), x))+diff(u(x, t), t) = 0

diff(diff(diff(u(x, t), x), x), x)+6*u(x, t)*(diff(u(x, t), x))+diff(u(x, t), t) = 0

(4)

map(int, diff(diff(diff(u(x, t), x), x), x)+6*u(x, t)*(diff(u(x, t), x))+diff(u(x, t), t) = 0, x)

3*u(x, t)^2+diff(diff(u(x, t), x), x)+int(diff(u(x, t), t), x) = 0

(5)

pde1 := %

3*u(x, t)^2+diff(diff(u(x, t), x), x)+int(diff(u(x, t), t), x) = 0

(6)

Y := u(x, t) = 2*(diff(ln(f(x, t)), `$`(x, 2)))

u(x, t) = 2*(diff(diff(f(x, t), x), x))/f(x, t)-2*(diff(f(x, t), x))^2/f(x, t)^2

(7)

L := eval(pde1, Y)

3*(2*(diff(diff(f(x, t), x), x))/f(x, t)-2*(diff(f(x, t), x))^2/f(x, t)^2)^2+2*(diff(diff(diff(diff(f(x, t), x), x), x), x))/f(x, t)-8*(diff(diff(diff(f(x, t), x), x), x))*(diff(f(x, t), x))/f(x, t)^2+24*(diff(diff(f(x, t), x), x))*(diff(f(x, t), x))^2/f(x, t)^3-6*(diff(diff(f(x, t), x), x))^2/f(x, t)^2-12*(diff(f(x, t), x))^4/f(x, t)^4-2*(diff(f(x, t), x))*(diff(f(x, t), t))/f(x, t)^2+2*(diff(diff(f(x, t), t), x))/f(x, t) = 0

(8)

numer(lhs(3*(2*(diff(diff(f(x, t), x), x))/f(x, t)-2*(diff(f(x, t), x))^2/f(x, t)^2)^2+2*(diff(diff(diff(diff(f(x, t), x), x), x), x))/f(x, t)-8*(diff(diff(diff(f(x, t), x), x), x))*(diff(f(x, t), x))/f(x, t)^2+24*(diff(diff(f(x, t), x), x))*(diff(f(x, t), x))^2/f(x, t)^3-6*(diff(diff(f(x, t), x), x))^2/f(x, t)^2-12*(diff(f(x, t), x))^4/f(x, t)^4-2*(diff(f(x, t), x))*(diff(f(x, t), t))/f(x, t)^2+2*(diff(diff(f(x, t), t), x))/f(x, t) = 0))*denom(rhs(3*(2*(diff(diff(f(x, t), x), x))/f(x, t)-2*(diff(f(x, t), x))^2/f(x, t)^2)^2+2*(diff(diff(diff(diff(f(x, t), x), x), x), x))/f(x, t)-8*(diff(diff(diff(f(x, t), x), x), x))*(diff(f(x, t), x))/f(x, t)^2+24*(diff(diff(f(x, t), x), x))*(diff(f(x, t), x))^2/f(x, t)^3-6*(diff(diff(f(x, t), x), x))^2/f(x, t)^2-12*(diff(f(x, t), x))^4/f(x, t)^4-2*(diff(f(x, t), x))*(diff(f(x, t), t))/f(x, t)^2+2*(diff(diff(f(x, t), t), x))/f(x, t) = 0)) = numer(rhs(3*(2*(diff(diff(f(x, t), x), x))/f(x, t)-2*(diff(f(x, t), x))^2/f(x, t)^2)^2+2*(diff(diff(diff(diff(f(x, t), x), x), x), x))/f(x, t)-8*(diff(diff(diff(f(x, t), x), x), x))*(diff(f(x, t), x))/f(x, t)^2+24*(diff(diff(f(x, t), x), x))*(diff(f(x, t), x))^2/f(x, t)^3-6*(diff(diff(f(x, t), x), x))^2/f(x, t)^2-12*(diff(f(x, t), x))^4/f(x, t)^4-2*(diff(f(x, t), x))*(diff(f(x, t), t))/f(x, t)^2+2*(diff(diff(f(x, t), t), x))/f(x, t) = 0))*denom(lhs(3*(2*(diff(diff(f(x, t), x), x))/f(x, t)-2*(diff(f(x, t), x))^2/f(x, t)^2)^2+2*(diff(diff(diff(diff(f(x, t), x), x), x), x))/f(x, t)-8*(diff(diff(diff(f(x, t), x), x), x))*(diff(f(x, t), x))/f(x, t)^2+24*(diff(diff(f(x, t), x), x))*(diff(f(x, t), x))^2/f(x, t)^3-6*(diff(diff(f(x, t), x), x))^2/f(x, t)^2-12*(diff(f(x, t), x))^4/f(x, t)^4-2*(diff(f(x, t), x))*(diff(f(x, t), t))/f(x, t)^2+2*(diff(diff(f(x, t), t), x))/f(x, t) = 0))

2*f(x, t)^2*(3*(diff(diff(f(x, t), x), x))^2+f(x, t)*(diff(diff(diff(diff(f(x, t), x), x), x), x))+f(x, t)*(diff(diff(f(x, t), t), x))-4*(diff(diff(diff(f(x, t), x), x), x))*(diff(f(x, t), x))-(diff(f(x, t), x))*(diff(f(x, t), t))) = 0

(9)

PP := simplify(2*f(x, t)^2*(3*(diff(diff(f(x, t), x), x))^2+f(x, t)*(diff(diff(diff(diff(f(x, t), x), x), x), x))+f(x, t)*(diff(diff(f(x, t), t), x))-4*(diff(diff(diff(f(x, t), x), x), x))*(diff(f(x, t), x))-(diff(f(x, t), x))*(diff(f(x, t), t))) = 0)

2*f(x, t)^2*(3*(diff(diff(f(x, t), x), x))^2+f(x, t)*(diff(diff(diff(diff(f(x, t), x), x), x), x))+f(x, t)*(diff(diff(f(x, t), t), x))-4*(diff(diff(diff(f(x, t), x), x), x))*(diff(f(x, t), x))-(diff(f(x, t), x))*(diff(f(x, t), t))) = 0

(10)

%/(2*f(x, t)^2)

3*(diff(diff(f(x, t), x), x))^2+f(x, t)*(diff(diff(diff(diff(f(x, t), x), x), x), x))+f(x, t)*(diff(diff(f(x, t), t), x))-4*(diff(diff(diff(f(x, t), x), x), x))*(diff(f(x, t), x))-(diff(f(x, t), x))*(diff(f(x, t), t)) = 0

(11)

collect(%, f)

(diff(diff(diff(diff(f(x, t), x), x), x), x)+diff(diff(f(x, t), t), x))*f(x, t)+3*(diff(diff(f(x, t), x), x))^2-4*(diff(diff(diff(f(x, t), x), x), x))*(diff(f(x, t), x))-(diff(f(x, t), x))*(diff(f(x, t), t)) = 0

(12)

pde2 := %

(diff(diff(diff(diff(f(x, t), x), x), x), x)+diff(diff(f(x, t), t), x))*f(x, t)+3*(diff(diff(f(x, t), x), x))^2-4*(diff(diff(diff(f(x, t), x), x), x))*(diff(f(x, t), x))-(diff(f(x, t), x))*(diff(f(x, t), t)) = 0

(13)

N = 1

N = 1

(14)

S := f(x, t) = a[0]+a[1]*exp(t*n[1]+x*k[1])

f(x, t) = a[0]+a[1]*exp(t*n[1]+x*k[1])

(15)

A := eval(pde2, S)

(a[1]*k[1]^4*exp(t*n[1]+x*k[1])+a[1]*n[1]*k[1]*exp(t*n[1]+x*k[1]))*(a[0]+a[1]*exp(t*n[1]+x*k[1]))-a[1]^2*k[1]^4*(exp(t*n[1]+x*k[1]))^2-a[1]^2*k[1]*(exp(t*n[1]+x*k[1]))^2*n[1] = 0

(16)

simplify((a[1]*k[1]^4*exp(t*n[1]+x*k[1])+a[1]*n[1]*k[1]*exp(t*n[1]+x*k[1]))*(a[0]+a[1]*exp(t*n[1]+x*k[1]))-a[1]^2*k[1]^4*(exp(t*n[1]+x*k[1]))^2-a[1]^2*k[1]*(exp(t*n[1]+x*k[1]))^2*n[1] = 0)

a[0]*a[1]*exp(t*n[1]+x*k[1])*k[1]*(k[1]^3+n[1]) = 0

(17)

%/exp(t*n[1]+x*k[1])

(k[1]^3+n[1])*k[1]*a[1]*a[0] = 0

(18)

PPP := %

(k[1]^3+n[1])*k[1]*a[1]*a[0] = 0

(19)

Co := solve(PPP, {a[0], a[1], k[1], n[1]})

{a[0] = a[0], a[1] = a[1], k[1] = k[1], n[1] = -k[1]^3}, {a[0] = a[0], a[1] = a[1], k[1] = 0, n[1] = n[1]}, {a[0] = a[0], a[1] = 0, k[1] = k[1], n[1] = n[1]}, {a[0] = 0, a[1] = a[1], k[1] = k[1], n[1] = n[1]}

(20)

case1 := Co[1]

{a[0] = a[0], a[1] = a[1], k[1] = k[1], n[1] = -k[1]^3}

(21)

F := subs(case1, S)

f(x, t) = a[0]+a[1]*exp(-t*k[1]^3+x*k[1])

(22)

F1 := eval(Y, F)

u(x, t) = 2*a[1]*k[1]^2*exp(-t*k[1]^3+x*k[1])/(a[0]+a[1]*exp(-t*k[1]^3+x*k[1]))-2*a[1]^2*k[1]^2*(exp(-t*k[1]^3+x*k[1]))^2/(a[0]+a[1]*exp(-t*k[1]^3+x*k[1]))^2

(23)

pdetest(F1, pde)

0

(24)

N = 2

N = 2

(25)

S2 := f(x, t) = a[0]+a[1]*exp(t*n[1]+x*k[1])+a[2]*exp(t*n[2]+x*k[2])+a[3]*exp(t*n[1]+t*n[2]+x*k[1]+x*k[2])

f(x, t) = a[0]+a[1]*exp(t*n[1]+x*k[1])+a[2]*exp(t*n[2]+x*k[2])+a[3]*exp(t*n[1]+t*n[2]+x*k[1]+x*k[2])

(26)

eq5 := normal(eval(pde2, S2))

exp(t*n[1]+x*k[1])*a[0]*a[1]*k[1]^4-4*exp(t*n[1]+x*k[1])*exp(t*n[2]+x*k[2])*a[1]*a[2]*k[1]^3*k[2]+6*exp(t*n[1]+x*k[1])*exp(t*n[2]+x*k[2])*a[1]*a[2]*k[1]^2*k[2]^2-4*exp(t*n[1]+x*k[1])*exp(t*n[2]+x*k[2])*a[1]*a[2]*k[1]*k[2]^3+exp(t*n[1]+x*k[1])*exp(t*n[2]+x*k[2])*a[1]*a[2]*k[1]*n[1]-exp(t*n[1]+x*k[1])*exp(t*n[2]+x*k[2])*a[1]*a[2]*k[1]*n[2]-exp(t*n[1]+x*k[1])*exp(t*n[2]+x*k[2])*a[1]*a[2]*k[2]*n[1]+exp(t*n[1]+x*k[1])*exp(t*n[2]+x*k[2])*a[1]*a[2]*k[2]*n[2]+exp(t*n[1]+x*k[1])*exp(t*n[1]+t*n[2]+x*k[1]+x*k[2])*a[1]*a[3]*k[2]*n[2]+exp(t*n[2]+x*k[2])*exp(t*n[1]+t*n[2]+x*k[1]+x*k[2])*a[2]*a[3]*k[1]*n[1]+exp(t*n[1]+x*k[1])*a[0]*a[1]*k[1]*n[1]+exp(t*n[2]+x*k[2])*a[0]*a[2]*k[2]^4+exp(t*n[1]+t*n[2]+x*k[1]+x*k[2])*a[0]*a[3]*k[1]^4+exp(t*n[1]+t*n[2]+x*k[1]+x*k[2])*a[0]*a[3]*k[2]^4+exp(t*n[1]+x*k[1])*exp(t*n[2]+x*k[2])*a[1]*a[2]*k[1]^4+exp(t*n[1]+x*k[1])*exp(t*n[2]+x*k[2])*a[1]*a[2]*k[2]^4+exp(t*n[1]+x*k[1])*exp(t*n[1]+t*n[2]+x*k[1]+x*k[2])*a[1]*a[3]*k[2]^4+exp(t*n[2]+x*k[2])*exp(t*n[1]+t*n[2]+x*k[1]+x*k[2])*a[2]*a[3]*k[1]^4+4*exp(t*n[1]+t*n[2]+x*k[1]+x*k[2])*a[0]*a[3]*k[1]^3*k[2]+6*exp(t*n[1]+t*n[2]+x*k[1]+x*k[2])*a[0]*a[3]*k[1]^2*k[2]^2+4*exp(t*n[1]+t*n[2]+x*k[1]+x*k[2])*a[0]*a[3]*k[1]*k[2]^3+exp(t*n[2]+x*k[2])*a[0]*a[2]*k[2]*n[2]+exp(t*n[1]+t*n[2]+x*k[1]+x*k[2])*a[0]*a[3]*k[1]*n[1]+exp(t*n[1]+t*n[2]+x*k[1]+x*k[2])*a[0]*a[3]*k[1]*n[2]+exp(t*n[1]+t*n[2]+x*k[1]+x*k[2])*a[0]*a[3]*k[2]*n[1]+exp(t*n[1]+t*n[2]+x*k[1]+x*k[2])*a[0]*a[3]*k[2]*n[2] = 0

(27)

indets(eq5)

{t, x, a[0], a[1], a[2], a[3], k[1], k[2], n[1], n[2], exp(t*n[1]+x*k[1]), exp(t*n[2]+x*k[2]), exp(t*n[1]+t*n[2]+x*k[1]+x*k[2])}

(28)

eq6 := eval(eq5, {t*n[1]+x*k[1] = X, t*n[2]+x*k[2] = Y}); indets(eq6)

Error, invalid input: exp expects its 1st argument, x, to be of type algebraic, but received u(x,t) = 2*diff(diff(f(x,t),x),x)/f(x,t)-2*diff(f(x,t),x)^2/f(x,t)^2

 

{eq6}

(29)

``

NULL

NULL

NULL

NULL

S3 := f(x, t) = a[0]+sum(exp(t*n[i]+x*k[i]), i = 1 .. 3)+a[1]*exp(t*n[1]+t*n[2]+x*k[1]+x*k[2])+a[2]*exp(t*n[1]+t*n[3]+x*k[1]+x*k[3])+a[3]*exp(t*n[2]+t*n[3]+x*k[2]+x*k[3])+a[4]*exp(t*n[1]+t*n[2]+t*n[3]+x*k[1]+x*k[2]+x*k[3])

f(x, t) = a[0]+exp(t*n[1]+x*k[1])+exp(t*n[2]+x*k[2])+exp(t*n[3]+x*k[3])+a[1]*exp(t*n[1]+t*n[2]+x*k[1]+x*k[2])+a[2]*exp(t*n[1]+t*n[3]+x*k[1]+x*k[3])+a[3]*exp(t*n[2]+t*n[3]+x*k[2]+x*k[3])+a[4]*exp(t*n[1]+t*n[2]+t*n[3]+x*k[1]+x*k[2]+x*k[3])

(30)

NULL

NULL

eq5 := normal(eval(pde2, S3))

 

``

Download N-soliton.mw

I want to calculate Hodge Star of forms on a solvable Lie algebra L, I have defined a metric tensor g on it. But when I use that g to compute the Hodge Star of an operator it tells me that the g is not a metric tensor.

with(DifferentialGeometry);
with(LieAlgebras);
A := Matrix(4, 4, [[A__11, A__12, A__13, A__14], [A__21, -A__11, A__23, A__24], [-A__24, -A__23, -A__11, A__21], [-A__14, -A__13, A__12, A__11]]);
x := [x__1, x__2, x__3, x__4, x__5, x__6];
StructureEquations := [[x[6], x[1]] = a*x[1], [x[6], x[2]] = add(A[1, i]*x[i + 1], i = 1 .. 4), [x[6], x[3]] = add(A[2, i]*x[i + 1], i = 1 .. 4), [x[6], x[4]] = add(A[3, i]*x[i + 1], i = 1 .. 4), [x[6], x[5]] = add(A[4, i]*x[i + 1], i = 1 .. 4)];
L := LieAlgebraData(StructureEquations, [x[1], x[2], x[3], x[4], x[5], x[6]], Alg1);
DGsetup(L);
with(Tensor);
e := [e1, e2, e3, e4, e5, e6];
theta := [theta1, theta2, theta3, theta4, theta5, theta6];
omega := evalDG(add(theta[i] &wedge theta[7 - i], i = 1 .. 3));
g := evalDG(add(theta[i] &t theta[7 - i], i = 1 .. 3));
HodgeStar(g, theta1)

It is showing the following error,

Error, (in DifferentialGeometry:-Tensor:-HodgeStar) expected 1st argument to be a metric tensor. Received: _DG([["tensor", Alg1, [["cov_bas", "cov_bas"], []]], [`...`]])

How can I correct this? If not is there an alternative of doing what I am trying to do?

I would like to define a binary operator, let's say T, such that `T`(a, b) be displayed a T b.

Is this possible in Maple (preferably 2015 [define doesn't have a 'binary' property], but a solution for any higher version would be welcome)?

Example

restart;

`union`(a, b);

`union`(a, b)

(1)

alias(`#mo("≅")` = `union`):
`union`(a, b);  

`#mo("≅")`(a, b)

(2)

# desired:
`#mrow(mo("a"),mo(" "),mo("≅"),mo(" "),mo("b"))`

`#mrow(mo("a"),mo(" "),mo("≅"),mo(" "),mo("b"))`

(3)
 

 

Download binary_operator.mw

Thanks in advance

I am trying to find the phase portraits of a dynamical system; couples ODE system but it appears in singular form. How can we remove the singularity of coupled ODE system in P and W depending on \xi, where \alpha is scalar and v is velocity.

How remove quadratic singularity to make this system Hamiltonian in below coupled ODE system in P & W.

 singular_system.mw

restart

with(PDEtools):

alias(P = P(xi), W = W(xi))

P, W

(1)

rf1 := diff(P, xi) = W

diff(P, xi) = W

(2)

rf2 := diff(W, xi) = (P-(alpha^2+1)*P*W^2)/(v+(1/2*(alpha^2+1))*P^2)

diff(W, xi) = (P-(alpha^2+1)*P*W^2)/(v+(1/2)*(alpha^2+1)*P^2)

(3)
 

 

Download singular_system.mw

I would like the graph to display the optimal point clearly marked with a red dot. Additionally, the optimal point should be labeled for easy identification. what is the syntax for it.
The  sheet is attached below :
trial_question.mw

ContoursWithLabels(............................, labels = ["delta0", "s2"]);

how to make delta0  and s2 ? and delta should be symbol not word?

I am trying to look at source code of one Maple application to learn it. The application is old and uses  .lib and .ind files and not the new .mla files to store the code.

When I use the command march('list',path_to_lib), it shows the .m files there OK.

Next, when I use the command march('extractfile',path_to_lib,member_name.m,file_name_to_extract_to.m)

And then look at file_name_to_extract_to.m created in text editor, it is a binary and not plain text.

But when I do print(member_name),  in the worksheet, Maple prints the source code on the screen OK.

Below is worksheet to show this. All what you need to run this is download the zip file to your C:/TMP/ folder (or any other folder of your choice). 

https://www.maplesoft.com/applications/download.aspx?id=123874/an_extension_of_prelle-singer_method_and_maple_implementatio.zip

When you unzip the above file, you will see maple.lib, maple.ind, and maple.hdb files.  

I changed the names to PS.lib, PS.ind and PS.hdb (not to conflict with any maple own files).

So my C:/TMP/ folder now have these 3 files PS.lib, PS.ind and PS.hdb in it. 

Then I opened worksheet and did the following

restart;

libname := "C:/TMP",libname;

"C:/TMP", "C:\Users\Owner\maple\toolbox\2024\Physics Updates\lib", "C:\Program Files\Maple 2024\lib"

march('list',"C:/TMP/PS.lib");

[["PSsolve.m", [2001, 11, 22, 12, 23, 49], 15008, 59], ["PSIntFac.m", [2001, 11, 22, 12, 23, 50], 15067, 517], ["polygen.m", [2001, 11, 22, 12, 23, 55], 16722, 433], ["Signature.m", [2001, 11, 22, 12, 23, 56], 17155, 404], ["dPSBasis.m", [2001, 11, 22, 12, 23, 51], 16267, 55], ["powerN.m", [2001, 11, 22, 12, 24, 19], 18866, 200], ["PS.m", [2001, 11, 22, 12, 6, 33], 1, 15007], ["Darboux.m", [2001, 11, 22, 12, 23, 50], 15584, 269], ["PSDop.m", [2001, 11, 22, 12, 23, 52], 16322, 335], ["typos.m", [2001, 11, 22, 12, 23, 57], 17559, 749], ["EigenPval.m", [2001, 11, 22, 12, 23, 51], 15853, 273], ["PSBasis.m", [2001, 11, 22, 12, 23, 51], 16126, 141], ["nothas.m", [2001, 11, 22, 12, 23, 55], 16657, 65], ["unknownfunc.m", [2001, 11, 22, 12, 24, 16], 18308, 464], ["int.m", [2001, 11, 22, 12, 24, 18], 18772, 94]]

march('extractfile',"C:/TMP/PS.lib","PSIntFac.m","C:/TMP/PSIntFac.m")

interface(verboseproc=3);

1

print(PSIntFac)

proc (ode, n) local base, intfac, subs_Us_by_func, x, y, M, N, eq; n; base := PS(args, PSBasis); subs_Us_by_func := map(proc (u) options operator, arrow; rhs(u) = lhs(u) end proc, base); intfac := [PS(args, PSIntFac)]; if intfac = [`We could not find an integrating factor.`] then RETURN(`We could not find an integrating factor.`) end if; x := intfac[2]; y := intfac[3]; M := subs(subs_Us_by_func, intfac[4]); N := subs(subs_Us_by_func, intfac[5]); eq := diff(y(x), x) = subs(y = y(x), M/N); print(`For the FOODE in the form`); print(eq); print(`the integrating factor will be`); intfac := normal(subs(subs_Us_by_func, intfac[1])) end proc

 

 

Download why_extract_not_working.mw

Now when opening the extracted file PSIntFac.m it shows this (in the folder C:/TMP/)

M7R0
I)PSIntFacf*6$%$odeG%"nG6*%%baseG%'intfacG%0subs_Us_by_funcG%"xG%"yG%"MG%"NG%#e
qG6"F0C09%>8$-%#PSG6$9"%(PSBasisG>8&-%$mapG6$f*6#%"uGF06$%)operatorG%&arrowGF0/
-%$rhsG6#9$-%$lhsGFHF0F0F0F4>8%7#-F66$F8F"@$/FM7#%IWe~could~not~find~an~integra
ting~factor.G-%'RETURNG6#FT>8'&FM6#""#>8(&FM6#""$>8)-%%subsG6$F;&FM6#""%>8*-F_o
6$F;&FM6#""&>8+/-%%diffG6$-Fhn6#FYFY-F_o6$/FhnFap*&F]o"""Feo!""-%&printG6#%:For
~the~FOODE~in~the~formG-Fjp6#F\p-Fjp6#%?the~integrating~factor~will~beG>FM-%'no
rmalG6#-F_o6$F;&FM6#FgpF0F0F0F0

It seems Maple kepts the .m file in binary form.   Is it not supposed to convert it to plain text readable form, as the one which shows when using the command print() on the screen?  

Is there another march command to extract the .m files in plain text form? I looked at help of march, but see nothing so far.

If this is how march extractfile is supposed to work, then is there another way to extract in plain text?

in this link   https://maplesoft.com/applications/Preview.aspx?id=123874  there is paper/application 

which is supposed to have Maple package called with(PSsolver);

But when downloading the application (by clicking on the download link) and opening it, it only has one file 

              an_extension_of_prelle-singer_method_and_maple_implementatio.mws

Where will the package (source code) itself PSolver be?  I can't see any other link in the Maple page above to download additional files which might include the package itself.

The worksheet above says this

Before actualy introducing the ideas concerning our program, let us first load it to the Maple section. (Please, put the library file into directory `c:/DirectoryWhereIputtheLibrary`).

I googled and not able to find it also. This was written almost 24 years ago, so trying to contact the author now might not be good idea.

Should not the Maple application be all self contained with all the files needed to run it?

Any one has copy of this package by any chance?

the most paper use another function to get the result and then do substitute i try to get by the way of them but i fail so how about if we can get the results in direct function there is any way for finding thus parameter after substitution of our function in ode?

restart

with(PDEtools)

with(LinearAlgebra)

NULL

with(SolveTools)

undeclare(prime)

`There is no more prime differentiation variable; all derivatives will be displayed as indexed functions`

(1)

"          with(Student[ODEs][Solve]):"

_local(gamma)

Warning, A new binding for the name `gamma` has been created. The global instance of this name is still accessible using the :- prefix, :-`gamma`.  See ?protect for details.

 

ode := beta*U(xi)^2*c^2+(-alpha*c^2+1)*U(xi)+mu^2*c^2*(diff(diff(U(xi), xi), xi)) = 0

beta*U(xi)^2*c^2+(-alpha*c^2+1)*U(xi)+mu^2*c^2*(diff(diff(U(xi), xi), xi)) = 0

(2)

n := 2

2

(3)

F := U(xi) = sum(tanh(xi)^(i-1)*(B[i]*sech(xi)+A[i]*tanh(xi)), i = 1 .. n)+A[0]

U(xi) = B[1]*sech(xi)+A[1]*tanh(xi)+tanh(xi)*(B[2]*sech(xi)+A[2]*tanh(xi))+A[0]

(4)

K1 := eval(ode, F)

beta*(B[1]*sech(xi)+A[1]*tanh(xi)+tanh(xi)*(B[2]*sech(xi)+A[2]*tanh(xi))+A[0])^2*c^2+(-alpha*c^2+1)*(B[1]*sech(xi)+A[1]*tanh(xi)+tanh(xi)*(B[2]*sech(xi)+A[2]*tanh(xi))+A[0])+mu^2*c^2*(B[1]*sech(xi)*tanh(xi)^2-B[1]*sech(xi)*(1-tanh(xi)^2)-2*A[1]*tanh(xi)*(1-tanh(xi)^2)-2*tanh(xi)*(1-tanh(xi)^2)*(B[2]*sech(xi)+A[2]*tanh(xi))+2*(1-tanh(xi)^2)*(-sech(xi)*tanh(xi)*B[2]+A[2]*(1-tanh(xi)^2))+tanh(xi)*(sech(xi)*tanh(xi)^2*B[2]-sech(xi)*(1-tanh(xi)^2)*B[2]-2*A[2]*tanh(xi)*(1-tanh(xi)^2))) = 0

(5)

solve(identity(K1, {xi}), {A[0], A[1], A[2], B[1], B[2]})

Error, (in unknown) incorrect use of identity(<expr>,<name>)

 

Download Find_params.mw

Is there any function that returns a boolean value that tells me if a point is within a polygon or not?

3 4 5 6 7 8 9 Last Page 5 of 2180