Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Let us suppose I open Maple, write a worksheet, save it in a folder A and then quit Maple.

Now I run a new session by double clicking on some mw file located in folder B, let us say //B/test_1.mw.
Once opened I do some modifications and decide to save this worksheet into a new file, let us say test_2.mw in the same folder B test_1.mw belongs to (which means I use Save As from the menu bar)

I'm regularly fooled by the fact that the default folder is not B, but the folder A I used in the previous session.

I find this very unpleasant.
Is this a Maple (2015) issue or something related to my operating system (Mac OSX Catalina)?
In case it is a Maple issue which is still present in more recent Maple versions, Would it be possible to set the default backup folder to be the folder to which the active worksheet belongs?

Thanks in advance

i need find parameter in explicite way without Rootof() so i need use code of explicite but i get error but when i use all parameter without explicite all parameter come out so why i get this error?

 
 

 

  (13)

vars := indets(eqs); ans := solve(eqs, {p, q, a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], k[1], k[2], k[3], m[1], m[2], m[3]}, explicit)

{p, q, a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], k[1], k[2], k[3], m[1], m[2], m[3]}

 

Error, (in Utilities:-RecognizeCyclotomic) numeric exception: division by zero

 
 

``

zero.mw

It's 2024 and this is still something that doesn't exist? I'd just like to swap the Enter/Shfit+Enter behaviors since I find myself writing a lot of multi-line and custom procs and boy howdy it'd be nice if I could make Maple behave at least the littllest bit like, I dunno, every other product I own and use.

Just around a month after the first release I am glad to announce the second public release of this project.

Changes from last release:

  • added angled cuts to beam ends
  • fixed bug for bolt connections with thick steel plates
  • rewrite check if fasteners are placed within beams
  • removed some obsolete procedures in NODEFunctions
  • minor changes in XML file headers

For more information see https://github.com/Anthrazit68/NODEMaple.

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?

First 15 16 17 18 19 20 21 Last Page 17 of 2193