Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

i found solution of PDE but there is some different from my solution and paper solution so there is must be a mistake becuase he solved by maple too he mentioned in the paper i try to figure out but i can't see any mistake from my solution can anyone watch where i did mistake, i change some letter in finding parameter but they are same like p=k&h=A&n=p&w=n

here is paper solution 

parameter-different.mw

`How to calculate u = `((∂)/(∂ t) - (∂)/(∂ x))^(-1)(z)? 

restart;

with(PDEtools):

alias(z=z(x,y,t), u=u(x,y,t))

z, u

(1)

z := 32*delta2^3*(exp((2*a*y*delta2^3 + 2*(x + y + t)^3*(B1 + 2*B2)*delta2^2 + (2*a*delta1^2*y + t)*delta2 + 2*delta1^2*(x + y + t)^3*(B1 + 2*B2))/(delta1^2 + delta2^2)) - exp((-2*a*y*delta2^3 + 4*(B1 + B2/2)*(x + y + t)^3*delta2^2 + (-2*a*delta1^2*y - t)*delta2 + 4*delta1^2*(B1 + B2/2)*(x + y + t)^3)/(delta1^2 + delta2^2)))*a/((delta1^2 + delta2^2)^2*(exp((2*(delta1^2 + delta2^2)*(x + y + t)^3*B2 + 2*delta2*(a*(delta1^2 + delta2^2)*y + t/2))/(delta1^2 + delta2^2)) + exp((2*(delta1^2 + delta2^2)*(x + y + t)^3*B1 - 2*delta2*(a*(delta1^2 + delta2^2)*y + t/2))/(delta1^2 + delta2^2)))^3);

32*delta2^3*(exp((2*a*y*delta2^3+2*(x+y+t)^3*(B1+2*B2)*delta2^2+(2*a*delta1^2*y+t)*delta2+2*delta1^2*(x+y+t)^3*(B1+2*B2))/(delta1^2+delta2^2))-exp((-2*a*y*delta2^3+4*(B1+(1/2)*B2)*(x+y+t)^3*delta2^2+(-2*a*delta1^2*y-t)*delta2+4*delta1^2*(B1+(1/2)*B2)*(x+y+t)^3)/(delta1^2+delta2^2)))*a/((delta1^2+delta2^2)^2*(exp((2*(delta1^2+delta2^2)*(x+y+t)^3*B2+2*delta2*(a*(delta1^2+delta2^2)*y+(1/2)*t))/(delta1^2+delta2^2))+exp((2*(delta1^2+delta2^2)*(x+y+t)^3*B1-2*delta2*(a*(delta1^2+delta2^2)*y+(1/2)*t))/(delta1^2+delta2^2)))^3)

(2)

NULL

NULL

Download integ.mw

I was trying to look for an easy way to plot the locations of the distance and midpoint on a graph. I found how to get the distance and midpoint functions but plotting them is hard.

Thanks in advance.

 

with(Student:-Precalculus)

with(Plot)

a := [1, 3]

b := [5, 6]

Distance(a, b)

5

(1)

Midpoint(a, b)

[3, 9/2]

(2)

Line(a, b)

y = (3/4)*x+9/4, 3/4, 9/4, -3

(3)

Line(a, b, output = plot)

 
 

 

Download How-to-plot-distance-midpoint.mw

i want to plot density i try to use code of [interactive] but didn't give me density 

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.

 

NULL

sol3 := (2*(2*k[2]^2*p[2]^2/p[1]^2+2*k[2]^2))/((-x*k[2]*p[2]/p[1]+y*p[1])^2+(x*k[2]+y*p[2])^2+a[0])-2*(-(2*(-x*k[2]*p[2]/p[1]+y*p[1]))*k[2]*p[2]/p[1]+(2*(x*k[2]+y*p[2]))*k[2])^2/((-x*k[2]*p[2]/p[1]+y*p[1])^2+(x*k[2]+y*p[2])^2+a[0])^2

NULL

lprint(indets(sol3, name))

{x, y, a[0], k[2], p[1], p[2]}

 

P :=   [  a[0]=1.2, k[2]=0.8, p[1]=-0.8, p[2]=0.4]

[a[0] = 1.2, k[2] = .8, p[1] = -.8, p[2] = .4]

(1)

latex(P)

[a_{0} =  1.2, k_{2} =  0.8, p_{1} = - 0.8, p_{2} =  0.4]

 

NULL

Assume some functional form for U(xi)

 

insert numerical values

solnum :=subs(P, sol3);

3.200000000/((.4000000000*x-.8*y)^2+(.8*x+.4*y)^2+1.2)-5.120000000*x^2/((.4000000000*x-.8*y)^2+(.8*x+.4*y)^2+1.2)^2

(2)

CodeGeneration['Matlab']('3.200000000/((.4000000000*x-.8*y)^2+(.8*x+.4*y)^2+1.2)-5.120000000*x^2/((.4000000000*x-.8*y)^2+(.8*x+.4*y)^2+1.2)^2')

cg0 = 0.3200000000e1 / ((0.4000000000e0 * x - 0.8e0 * y) ^ 2 + (0.8e0 * x + 0.4e0 * y) ^ 2 + 0.12e1) - 0.5120000000e1 * x ^ 2 / ((0.4000000000e0 * x - 0.8e0 * y) ^ 2 + (0.8e0 * x + 0.4e0 * y) ^ 2 + 0.12e1) ^ 2;

 

 

P := Array(1 .. 3); P[1] := plot3d(map(Re, solnum), x = -20 .. 20, y = -5 .. 5, title = Re); P[2] := plot3d(map(Im, solnum), x = -20 .. 20, y = -5 .. 5, title = Im); P[3] := plot3d(map(abs, solnum), x = -20 .. 20, y = -5 .. 5, title = abs); plots:-display(P)

 

 

 

 

 

 

``

 

 

Q := Array(1 .. 2); Q[1] := plot3d(map(density, solnum), x = -20 .. 20, y = -5 .. 5, title = den); Q[2] := plot3d(map(contour, solnum), x = -20 .. 20, y = -5 .. 5, title = contour); plots:-display(Q)

Warning, expecting only range variables [x, y] in expression density(3.200000000/((.4000000000*x-.8*y)^2+(.8*x+.4*y)^2+1.2))+density(-5.120000000*x^2/((.4000000000*x-.8*y)^2+(.8*x+.4*y)^2+1.2)^2) to be plotted but found name density

 

Warning, expecting only range variables [x, y] in expression contour(3.200000000/((.4000000000*x-.8*y)^2+(.8*x+.4*y)^2+1.2))+contour(-5.120000000*x^2/((.4000000000*x-.8*y)^2+(.8*x+.4*y)^2+1.2)^2) to be plotted but found name contour

 

 

 

 

 

 

 

 

Download graph-density-countour.mw

I am looking for a command that generates a rotation matrix with Euler angles.

Ideally a command that allows to specify the sequence of rotations about x,y,z axes and the corresponding angles.

The only command I found is ?Student,LinearAlgebra,RotationMatrix which only rotates about one axis.

Anything else that Maple offers in this context? (searching with the search term "Euler" is hopeless -> too many hits.)

I'm calcuating an endomorphism in 2d dimensions. It is contructed out of a tensor contraction, for example, in 6-dimensions, the endomorphism is

K[mu,~nu] = LeviCivita[~alpha,~beta,~gamma,~delta,~upsilon,~nu]*C[alpha,beta,gamma]*C[delta,upsilon,mu]

I appreciate that, in terms of computation, this gets big quickly: it's something like O(exp) in time to sum over repeated indices in each matrix entry. Therefore, I thought, instead of putting the above expression in Define, I could make a matrix with unsummed entries, and then do the sums in parallel using Threads[Map](SumOverRepeatedIndices,...) but looking at my CPU usage and comparing execution times, it doesn't appear that this is working.

Is there any way I can more efficiently calculate these matrix entries?

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)

NULL

T := f(x, t) = g(x, t)^2+h(x, t)^2+a[0]

T1 := g(x, t) = t*n[1]+x*k[1]

T2 := h(x, t) = t*n[2]+x*k[2]

L2 := subs({T1, T2}, T)

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

(14)

L3 := eval(pde2, L2)

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

(15)

L4 := collect(L3, [x, t], 'distributed')

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

(16)

eqs := {coeffs(L4, [x, t])}

Error, invalid arguments to coeffs

 

NULL

NULL

ans := solve(eqs, vars)

{a[2] = a[2], a[3] = a[3], a[4] = 0, a[5] = a[5], a[7] = a[7]}

(17)

NULL

eqI := ans

{a[2] = a[2], a[3] = a[3], a[4] = 0, a[5] = a[5], a[7] = a[7]}

(18)

eqpsi := eval(L2, eqI)

f(x, t) = (t*a[2]+a[3])^2+a[5]^2*t^2+a[7]

(19)

eqphi := eval(Y, eqpsi)

w(x, t) = 0

(20)

simplify(eval(pde, eqphi))

 

NULL

Download F-params.mw

Hello

I have a question regarding the input of a list that I would like to use for further calculations. 
Attached, you’ll find the maple file with some vector calculations and a 3D visualisation. Three numbers are used as input (F_D3, F_D4, F_S2). I would like to use a function over time for these inputs instead of plain numbers. The function consists of an Excel list with an input number for each time step. How do I do this? Can I also use PlotVector in visu2 to plot a vector at a certain time step? 

For further processing, I would like the p-norm (F_E2) of vector RF_E2 to be visualized/plotted as a function over time. How do I approach this? 

Thank you very much for your help in advance!

input_question.xlsx

Input_question.mw

I first tried Threads and found that Maple dsolve does not work in threads (see https://www.mapleprimes.com/questions/239602-Error-in-Dsolve-Type-System-Does)

It was suggested there to use Grid instead of Threads. 

Now I got time to try Grid. My first test shows that Grid does not work with dsolve also.

Here is an example where dsolve solves this system of odes,. But when using Grid, Maple gives an internal error 

         Error, (in evalapply) cannot apply non-operator differential equation

Does this means one can't use Threads and also can't use Grid with dsolve? Or Am I doing something wrong?

interface(version);

`Standard Worksheet Interface, Maple 2024.2, Windows 10, October 29 2024 Build ID 1872373`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1841 and is the same as the version installed in this computer, created 2025, January 3, 8:59 hours Pacific Time.`

restart;

P:=[diff(x(t),t)=t*x(t)-y(t)+exp(t)*z(t),diff(y(t),t)=2*x(t)+t^2*y(t)-z(t),diff(z(t),t)=exp(-t)*x(t)+3*t*y(t)+t^3*z(t)]:

dsolve(P); #no error, Long answer

{x(t) = (exp(t)*y(t)*t^5-(diff(y(t), t))*exp(t)*t^3-2*(exp(t))^2*y(t)*t^2-(diff(y(t), t))*exp(t)*t^2+2*(diff(y(t), t))*(exp(t))^2+t*y(t)*exp(t)+(diff(diff(y(t), t), t))*exp(t)+2*exp(t)*y(t))/(-2*t^3*exp(t)+4*(exp(t))^2+2*exp(t)*t-1), y(t) = DESol({diff(diff(diff(_Y(t), t), t), t)+(-4*(exp(t))^3/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))-2*(exp(t))^2/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))-exp(t)/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))-4*(exp(t))^3*t^2/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))-2*(exp(t))^2*t^3/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))-4*(exp(t))^3*t/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))+4*(exp(t))^2*t^2/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))+exp(t)*t^3/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))+2*(exp(t))^2*t^6/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))+2*(exp(t))^2*t^5/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))-4*(exp(t))^3*t^3/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))+exp(t)*t^2/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))+exp(t)*t/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t)))*(diff(diff(_Y(t), t), t))+(-4*(exp(t))^2/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))-exp(t)/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))-exp(t)*t^5/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))+4*(exp(t))^3*t^2/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))-6*(exp(t))^2*t^3/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))-exp(t)*t^4/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))-2*(exp(t))^2*t^8/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))-2*(exp(t))^2*t^7/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))+4*(exp(t))^3*t^5/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))+4*(exp(t))^3*t^4/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))+2*(exp(t))^2*t^5/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))+4*(exp(t))^3*t^3/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))-2*(exp(t))^2*t^4/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))+2*(exp(t))^2*t/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))+4*exp(t)*t^2/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))+exp(t)*t/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t)))*(diff(_Y(t), t))+(-4*(exp(t))^3/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))-8*(exp(t))^2/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))-3*exp(t)/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))+1/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))-exp(t)*t^5/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))-24*(exp(t))^4*t/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))-8*(exp(t))^3*t^2/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))+4*(exp(t))^2*t^3/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))-5*exp(t)*t^4/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))-4*(exp(t))^3*t/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))+16*(exp(t))^2*t^2/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))+4*exp(t)*t^3/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))+6*(exp(t))^2*t/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))+2*(exp(t))^2*t^9/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))-4*(exp(t))^3*t^6/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))-6*(exp(t))^2*t^7/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))+4*(exp(t))^2*t^6/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))+20*(exp(t))^3*t^4/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))+8*(exp(t))^2*t^5/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))+exp(t)*t^6/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))-12*(exp(t))^3*t^3/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))-4*(exp(t))^2*t^4/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))-3*exp(t)*t/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t)))*_Y(t)}, {_Y(t)}), z(t) = (2*exp(t)*y(t)*t^3-2*(diff(y(t), t))*exp(t)*t^2-2*(diff(y(t), t))*exp(t)*t+2*t*y(t)*exp(t)-t^2*y(t)+2*(diff(diff(y(t), t), t))*exp(t)+4*exp(t)*y(t)+diff(y(t), t))/(-2*t^3*exp(t)+4*(exp(t))^2+2*exp(t)*t-1)}

restart;

 

P:=[diff(x(t),t)=t*x(t)-y(t)+exp(t)*z(t),diff(y(t),t)=2*x(t)+t^2*y(t)-z(t),diff(z(t),t)=exp(-t)*x(t)+3*t*y(t)+t^3*z(t)]:

Grid:-Run(0,dsolve(P)); #gives internal error
Grid:-Wait();

Error, (in evalapply) cannot apply non-operator differential equation

 


This error happens on this specific ode. I tried 2-3 others and did not see an error. So it seems to depend to what the ode is.

Download dsolve_also_fail_in_grid.mw

in help for Grid:-Wait, it has an example where it says

And in help for Grid:-Setup it says

"The numnodes option allows you to specify the number of nodes to be used in subsequent computations.  This option is only available in "local" mode."

Is numnodes supposed to be the same as number of cores on my PC?  If so, then why numnodes=4 says this will insure it run run on 2 core machine?

Is this typo and it should be 4 core machine?

I have a solution to a physics free-fall problem:

times := -2.019619977*Unit('s'), 2.019619977*Unit('s')

I would like to extract the positive values.

After some tinkering, I came up with this solution:

sol:=[][]:
for i in times do:
    val := Split(i, output = coefficient):
    if 0 <= val then:
        sol := sol, val*Unit('s'):
    end if:
end do:
evalf(sol,3)

2.02 s

This works, but is inelegant and requires many expressions.

Is there a simpler way, possibly a single-line expression, to accomplish this?

I am quite puzzled by the fact that Maple occasionally returns incorrect results when calculating the real and imaginary parts. I have attached an example script below. As shown, the returned value is erroneous unless the condition that k is real is explicitly specified.

Do you have any thoughts on this?

question.mw

Download question.mw

In Peter Winkler's book "Mathematical Mind-Benders" the now famous problem of dividing an ice cream cake is posed. It asks: If, when cutting the circular cake with any central angle (whether rational or irrational), neighboring piece after neighboring piece is constantly cut off, the cake segment is rotated to the previous top side, and the cut surface is considered to be healed, then after a finite number of cuts the top side is back where it was at the beginning. I also fell for it at first and assumed that according to Weyl's theorem (uniform distribution modulo 1) this is not possible and therefore the central angle must be rational. I have since found a solution according to which the cutting process must stop after a finite number of steps. Weyl's theorem is obviously not applicable here. Why - I am still puzzling over that.

Now I am interested in whether Maple can be used to animate the uniform distribution modulo 1 on the unit circle and to display the associated statistics in the sense of a sample and calculate the sample value of the uniform distribution. As a Maple beginner, I am not yet able to do this and am asking for help.

How do add two or more variables to the save command ?

e.g.  the following works for one variable

number:=1;
A:=5;
fname:=sprintf("file(%a)",number);
save A, fname;

but how do you e.g. add another variable to the fname ?

Lets say I want  to add the contents of another variable say Var2
 

number:=1;
A:=5;
Var2:="b";
fname:=sprintf("file(%a)_Var2",number);

save A, fname

How do I do that ?

Could we create a plot with tau0 varying from 0.1 to 0.6 on the x-axis and profit on the y-axis displaying Rprof, Mprof, Tprof, T_Cprof all on the same graph?

Sheet attached : trial_question.mw

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