MaplePrimes Questions

How can I substitute equation (5) into equation (4) to obtain the final form [see image in BE.mw]?

Additionally, how can I use subscript notation for derivatives, such as expressing diff(f(tau,sigma), tau)  as  f[tau]​?

By using the 'declare' command in Maple, one can utilize subscript notation. However, in this case, the function must be written in terms of τ and σ on each step.

In the final plot in this worksheet, the electric field is displayed using blue headless vectors.

Instead, how can the gradient of the dipole's potential field be displayed in field lines?

Dipole_fields.mw

Hi, I've been trying to get help from the Maple website, but for months now, the display hasn't worked properly. The examples section shows "comma" and "colon" texts in a way that makes it impossible to use the site effectively. Has anyone else reported this issue? It's quite frustrating.

What is the correct idiom in Maple to check that one number is greater than another or not?

For example if n=sqrt(3) and m=3 ?

Maple does not like to compare sqrt(3) with other number. It says 

   Error, cannot determine if this expression is true or false: 3 <= 3^(1/2)

I am doing this in code, so solution has to be such that it works for all cases of n and m, without the ability to look at screen and decide.

I found that using is works without the need to convert to float.  Should one then use is(n>=m) instead of evalb(n>=m) always?  

I can also always apply evalf() on each side before. But this seems like an overkill to me.

restart;

n:=sqrt(3);
m:=3;

3^(1/2)

3

if evalb(n>=m) then
   "yes";
else
   "no";
fi;

Error, cannot determine if this expression is true or false: 3 <= 3^(1/2)

if n>=m then
   "yes";
else
   "no";
fi;

Error, cannot determine if this expression is true or false: 3 <= 3^(1/2)

if evalb(evalf(n)>=m) then
   "yes";
else
   "no";
fi;

"no"

if is(n>=m) then
   "yes";
else
   "no";
fi;

"no"

 

 

Download checking_one_number_larger_than_another.mw

For reference, another software does compare these two numbers as is without the need to convert them to floating point;

But it looks the design of Maple in this aspect is different. Since the principal root of sqrt(3) is always the positive one, I did not think it will cause a problem.

how fixed this for ode test

restart

with(PDEtools)

with(Physics)

undeclare(prime)

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

(1)

``

pde := -I*(diff(U(xi), xi))*gamma*k*mu+I*gamma*(diff(U(xi), xi))*sigma*w+(diff(diff(U(xi), xi), xi))*gamma*k*w+U(xi)*gamma*mu*sigma+(2*I)*(diff(U(xi), xi))*k*sigma+2*alpha*U(xi)^3+(diff(diff(U(xi), xi), xi))*k^2-I*(diff(U(xi), xi))*w-U(xi)*sigma^2-U(xi)*mu

-I*gamma*(diff(U(xi), xi))*k*mu+I*gamma*(diff(U(xi), xi))*sigma*w+gamma*(diff(diff(U(xi), xi), xi))*k*w+gamma*U(xi)*mu*sigma+(2*I)*(diff(U(xi), xi))*k*sigma+2*alpha*U(xi)^3+(diff(diff(U(xi), xi), xi))*k^2-I*(diff(U(xi), xi))*w-U(xi)*sigma^2-U(xi)*mu

(2)

case1 := [mu = -(4*gamma*k*w+4*k^2-sigma^2)/(gamma*sigma-1), A[0] = 0, A[1] = -RootOf(_Z^2*alpha+gamma*k*w+k^2), B[1] = RootOf(_Z^2*alpha+gamma*k*w+k^2), w = (gamma*k*mu-2*k*sigma)/(gamma*sigma-1)]

[mu = -(4*gamma*k*w+4*k^2-sigma^2)/(gamma*sigma-1), A[0] = 0, A[1] = -RootOf(_Z^2*alpha+gamma*k*w+k^2), B[1] = RootOf(_Z^2*alpha+gamma*k*w+k^2), w = (gamma*k*mu-2*k*sigma)/(gamma*sigma-1)]

(3)

G1 := U(xi) = 2*RootOf(_Z^2*alpha+gamma*k*w+k^2)/sinh(2*xi)

U(xi) = 2*RootOf(_Z^2*alpha+gamma*k*w+k^2)/sinh(2*xi)

(4)

pde1 := subs(case1, pde)

I*gamma*(diff(U(xi), xi))*k*(4*gamma*k*w+4*k^2-sigma^2)/(gamma*sigma-1)+I*gamma*(diff(U(xi), xi))*sigma*(gamma*k*mu-2*k*sigma)/(gamma*sigma-1)+gamma*(diff(diff(U(xi), xi), xi))*k*(gamma*k*mu-2*k*sigma)/(gamma*sigma-1)-gamma*U(xi)*(4*gamma*k*w+4*k^2-sigma^2)*sigma/(gamma*sigma-1)+(2*I)*(diff(U(xi), xi))*k*sigma+2*alpha*U(xi)^3+(diff(diff(U(xi), xi), xi))*k^2-I*(diff(U(xi), xi))*(gamma*k*mu-2*k*sigma)/(gamma*sigma-1)-U(xi)*sigma^2+U(xi)*(4*gamma*k*w+4*k^2-sigma^2)/(gamma*sigma-1)

(5)

pde2 := subs(case1, pde1)

I*gamma*(diff(U(xi), xi))*k*(4*gamma*(gamma*k*mu-2*k*sigma)*k/(gamma*sigma-1)+4*k^2-sigma^2)/(gamma*sigma-1)+I*gamma*(diff(U(xi), xi))*sigma*(-gamma*k*(4*gamma*k*w+4*k^2-sigma^2)/(gamma*sigma-1)-2*k*sigma)/(gamma*sigma-1)+gamma*(diff(diff(U(xi), xi), xi))*k*(-gamma*k*(4*gamma*k*w+4*k^2-sigma^2)/(gamma*sigma-1)-2*k*sigma)/(gamma*sigma-1)-gamma*U(xi)*(4*gamma*(gamma*k*mu-2*k*sigma)*k/(gamma*sigma-1)+4*k^2-sigma^2)*sigma/(gamma*sigma-1)+(2*I)*(diff(U(xi), xi))*k*sigma+2*alpha*U(xi)^3+(diff(diff(U(xi), xi), xi))*k^2-I*(diff(U(xi), xi))*(-gamma*k*(4*gamma*k*w+4*k^2-sigma^2)/(gamma*sigma-1)-2*k*sigma)/(gamma*sigma-1)-U(xi)*sigma^2+U(xi)*(4*gamma*(gamma*k*mu-2*k*sigma)*k/(gamma*sigma-1)+4*k^2-sigma^2)/(gamma*sigma-1)

(6)

odetest(G1, pde2)

 

NULL

Download test_sol_for_PDE1.mw

A task that was famous at the time is worth remembering:

If for whole numbers x and y the number N = (x^2+y^2)/(1+x*y) is a positive whole number, then it is also a square number.

It can be proven that the converse is also true. Therefore, here is the task:

If N is a square number, then the Diophantine equation has solutions. Solutions must be calculated for N = 9, 49 and 729.

Hi,

I want to display the solutions in the form of intervals or empty sets, using mathematical symbols. Any suggestions?

ThanksQEnsembleAffichage.mw

Could anyone help me to convert a code written in Mathematica to a Maple worksheet? I have PDF only. Could any one have a look on Mpale sheet and PDF....

Mathematica__to_Maple.mw

Mathematica_file.pdf

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

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

First 65 66 67 68 69 70 71 Last Page 67 of 2426