MaplePrimes Questions

An animation only allows one time parameter.

I have an setup in which I have a time parameter + another parameter or more(e.g., offset, scale, whatever).

I would like some way to easily traverse phase space and see the result and animate with time at those specific parameters(ideally animate along any path in the phase space).

In my case what this means is that there is a 2D rectangle in which represents the phase space. E.g., time x offset. This effects the animation by setting the current parameters. If the animation is animated in time it moves across the vertical. Basically a "2d slider". Alternatively have actually 2(or more) independent sliders.

Currently I have to manually set the parameter then re-execute the animation to see the new animation.

e.g.,

  animation(plot, [f(t,offset)], t=0..1,offset=1..5)

aa1.mw      aa2.mw 

In my view, these two processes are similar, but they yield different outcomes. What accounts for this discrepancy?

I’m currently working on a Maple project involving the symbolic differentiation of a user-defined potential energy function, which I then use in a system of differential equations. To implement this, I've been using placeholders like 'Un' when taking derivatives to substitute later during numerical calculations.

While this approach using placeholders works, I find it cumbersome and would prefer a more straightforward way to handle this symbolic differentiation without having to rely on intermediate placeholders like 'Un'.

Does anyone know if there is a more elegant way in Maple to achieve this functionality?

Specific Requirements:

  • I want to symbolically differentiate the user-defined function W directly.
  • The goal is to use this derivative in a system of differential equations for numerical solving.

Any suggestions on simplifying this process would be much appreciated!

Thanks in advance.

restart

NULL
W := proc (Un) options operator, arrow; -(1/4)*(b*d-e*q)^2/(b^2*(e+b*Un^2))-(2*b*c*m^2+(1/4)*q^2)*Un^2/b+c*Un^4 end proc

proc (Un) options operator, arrow; -(1/4)*(b*d-e*q)^2/(b^2*(e+b*Un^2))-(2*b*c*m^2+(1/4)*q^2)*Un^2/b+c*Un^4 end proc

(1)

 

 

diff(W(Un), Un)

(1/2)*(b*d-e*q)^2*Un/(b*(Un^2*b+e)^2)-2*(2*b*c*m^2+(1/4)*q^2)*Un/b+4*c*Un^3

(2)

b := -0.3070816340e-3; c := .4461893869; d := 0.1142581922e-1; e := 0.7675000601e-3; q := -0.3704049149e-2; m := 1.423206983; plot(W(Un), Un = -10 .. 10, title = "Graph of Potential W for set 1", color = blue, axes = boxed)

 

with(plots); with(DEtools); delta := .5; b := -0.222159366e-3; c := 1.088046084; d := 0.1308858509e-2; e := 0.394423507e-3; q := -0.64844084e-3; m := 1.518466566; W := proc (Un) options operator, arrow; -(1/4)*(b*d-e*q)^2/(b^2*(e+b*Un^2))-(2*b*c*m^2+(1/4)*q^2)*Un^2/b+c*Un^4 end proc; Un_placeholder := 'Un'; Wprime := diff(W(Un_placeholder), Un_placeholder); sys := {diff(u(t), t) = v(t), diff(v(t), t) = -delta*v(t)+subs(Un_placeholder = u(t), Wprime)}; ics1 := {u(0) = 0.1e-1, v(0) = 0.1e-1}; sol := dsolve(`union`(sys, ics1), numeric, output = listprocedure); xrange := -0.10e-1 .. 0.11e-1; yrange := -0.3e-1 .. 0.3e-1; phase_plot := odeplot(sol, [u(t), v(t)], 0 .. 100, title = "Phase Plot (Velocity vs Displacement)", numpoints = 8000, color = red, labels = ["u(t)", "v(t)"], axes = boxed, labeldirections = [horizontal, vertical]); vectorfield_plot1 := fieldplot([v, -delta*v+subs(Un_placeholder = u, Wprime)], u = xrange, v = yrange, arrows = medium, color = blue, axes = boxed); display([vectorfield_plot1, phase_plot], title = "Combined Phase Plot and Vector Field", labels = ["u(t)", "v(t)"], axes = boxed)

 

NULL

Download proteins.mw

What on earth am I doing wrong here? I am trying to check if two vectors are equal for parallelism.Yes, thinking about it I could use CrossProduct but that is the same problem because I would be checking if that new vector =<0,0,0>

l1:=<a,b,c>:l2:=<a,b,c>:
if l1 = l2 then 
print("Equal Vectors");
end if;

Good morning, please, how do I graph the vector that you see in the image ( Addition and Subtraction)? I have seen that there is an option called VectorSumPlot but I don't care about the graph or the result.

 

While cleaning up old documents, I found the following Diophantine equation and its solution. I tried to solve it using Maple´s "isolve" but it didn't work. Please give me some advice.
Equation:
x^2 - 12*x*y + 6*y^2 + 4*x + 12*y - 3=0

Why can't this be solved? Why is it that trigonometric functions are really solving for such a large number? Trigonometric functions should have a range

question929.mw

In this problem,how to plot various values of Nc. That is,

 Sh = 0.5, R[d] = 0.7, alpha = (1/2)*Pi, Nc = 0.5, H = 0.4, `&epsilon;` =0.4;

 Sh = 0.5, R[d] = 0.7, alpha = (1/2)*Pi, Nc = 1, H = 0.4, `&epsilon;` = 0.4;

 Sh = 0.5, R[d] = 0.7, alpha = (1/2)*Pi, Nc = 1.5, H = 0.4, `&epsilon;` = 0.4;

 Sh = 0.5, R[d] = 0.7, alpha = (1/2)*Pi, Nc = 2, H = 0.4, `&epsilon;` = 0.4

MSNL.mw

How to use maple to compute the solution of two coupling equations that both have higher order derivatives? I used dsolve and couldn't solve it.

question928.mw

I must approximate the coefficients a, b, c, and d in an exponential equation. Is it possible to plot?

Please help!

Ea := 0.00762014687*t + a*t^2 + b*t^3 + c*t^4 + d*t^5;
E1 := diff(Ea, t);
E2 := subs(t = 435, Ea);
E3 := subs(t = 528, Ea);
E4 := subs(t = 33168, Ea);

E1 = 5.012764943*10^(-24)*Ea/(exp(Ea/(4.100527530*10^(-21))) - 1)

Aph1.mw

the programs calculates the gcd of 2x2 matrices using procedures. I created a MLA file and loadad this in another work sheet. To my surprise I received an error altghough the original version runs fine.

240926_gcd.mw

given :

Zin := ((Rsp + (omega*L2 - omega02^2*L2/omega)*I)*(Rpp + (omega*L1 - omega01^2*L1/omega)*I) + 0.01*omega^2*L1*L2)/(Rsp + (omega*L2 - omega02^2*L2/omega)*I)

how do I get Maple to cancel out the common term, and simplify this equation into:

Zin := Rpp + (omega*L1 - omega01^2*L1/omega)*I + (0.01*omega^2*L1*L2)/(Rsp + 
(omega*L2 - omega02^2*L2/omega)*I)

Why doesn't Maple do this automatically with something like simplify or some other command?

Thank you!

How to find KKT conditions using maple for maximization function with constraint?

Decision variable are k1 and k2.

Attaching sheet:Q_KKT.mw

Hi

I want to count in a list L with many sublists the number of sublists, that contain m elements and only primes. How can I do that?

Example:

L:=[[2,3,5,7],[7,13,29],[2,3,4],[5,31,53]], m=3

The result should be 2, because only [7,13,29] and [5,31,53] satiesfy both criteria.

Thank you for an answer!

Why Maple gives

           improper op or subscript selector

On this ode? I was not expecting to see steps for this, but was just trying to see what it will show.

restart;

interface(version);

`Standard Worksheet Interface, Maple 2024.1, Windows 10, June 25 2024 Build ID 1835466`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1810 and is the same as the version installed in this computer, created 2024, September 18, 18:16 hours Pacific Time.`

libname;

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

restart;

ode:=sin(x)*diff(y(x),x$2)+cos(x)*diff(y(x),x)+(sin(x)-cos(x))*y(x)=0;

sin(x)*(diff(diff(y(x), x), x))+cos(x)*(diff(y(x), x))+(sin(x)-cos(x))*y(x) = 0

dsolve(ode);

y(x) = c__1*(tan((1/2)*x)+I)^(1/2+(1/2)*(5-4*I)^(1/2))*(tan((1/2)*x)-I)^((1/2)*(5+4*I+(5+4*I)^(1/2))/(5+4*I)^(1/2))*HeunG(2, 2*(((3/4)*(5-4*I)^(1/2)+7/4-I)*(5+4*I)^(1/2)+5/4+I+(5/4+I)*(5-4*I)^(1/2))/(5+4*I)^(1/2), 1+(1/2)*(10+2*41^(1/2))^(1/2), (1/2)*((5+4*I)^(1/2)*(5-4*I)^(1/2)+5+4*I+2*(5+4*I)^(1/2))/(5+4*I)^(1/2), 1+(5-4*I)^(1/2), 1, 1-I*tan((1/2)*x))+c__2*(tan((1/2)*x)+I)^(1/2-(1/2)*(5-4*I)^(1/2))*(tan((1/2)*x)-I)^((1/2)*(5+4*I+(5+4*I)^(1/2))/(5+4*I)^(1/2))*HeunG(2, -2*(((3/4)*(5-4*I)^(1/2)+(-7/4+I))*(5+4*I)^(1/2)+(-5/4-I)+(5/4+I)*(5-4*I)^(1/2))/(5+4*I)^(1/2), -(1/2)*(5-4*I)^(1/2)+1+(1/2)*(5+4*I)^(1/2), (1/2)*(-(5+4*I)^(1/2)*(5-4*I)^(1/2)+5+4*I+2*(5+4*I)^(1/2))/(5+4*I)^(1/2), 1-(5-4*I)^(1/2), 1, 1-I*tan((1/2)*x))

Student:-ODEs:-ODESteps(ode)

Error, (in Student:-ODEs:-OdeSolveOrder2) improper op or subscript selector

 


 

Download internal_error_ODEsteps_sept_26_2024.mw

1 2 3 4 5 6 7 Last Page 3 of 2362