MaplePrimes Questions

Dear all,

I'm a new maple user trying to solve a single PDE in maple using finite volume.

For simplicity I'm using three volumes. When I'm trying to apply a simple flux limiter, up-wind scheme, (relation between the wall and the node values u[j+0.5](t)=u[j](t)), I'm solver works well and produces accurate results.

However, when I try to a more complicated flux limiter, the solver doesn't initialize and I'm getting an error:
"Error, (in dsolve/numeric/DAE/make_proc) specified dependent variables [u[0](t), u[.5](t), u[1](t), u[1.5](t), u[2](t), u[2.5](t), u[3](t), u[3.5](t), u[4](t)] do not agree with input system {u[0], u[1], u[2], u[3], u[4], u[1/2], u[1.5], u[2.5], u[3.5]}, differences: {u[1/2]}, {u[.5]}".

I would greatly appreciate it if somebody helps me on in this issue.

error.mw

in a lot of my equation i have such problem and really i don't know how fix this also i try to put : in end and sometime is work and i keep contionues  but sometime not there is any way for solve this problem?

limit.mw

i don't know how generate this series and when i have a lot series which i can't make them automatically i don't know how write and replacing some structure like mu is zero or 1 as shown in picture can any one give me a hand?

both of them are same with little different

 

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.

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?

This isn't the first time that I've seen a question that doesn't seem to have received a comment or answer, but which, when I click on the question title, turns out to have received one.
Here's the opposite phenomenon: a question appears to have two comments or answers, but none of them exist (9:38 GMT+1)

Screen capture from the main page

Screen capture from the question page

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

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