MaplePrimes Questions

Search Questions:

Goal: to make a 3D parametric plot of a complex function u(x,t) obtained by pdsolve.  I tried to follow one example of a plot of a complex expression/function.  I was unable to get any plot.  I got some warning and error.  Please let me know what have I done wrong.

I follow this example so that I can get a 3D parametric plot of a complex function u(x,t) for a fix x:

with(plots);

complexplot(exp(t*I), t = 0 .. 2*Pi, scaling = constrained);

plot([cos(t), sin(t), t = 0 .. 2*Pi], scaling = constrained);

z := t -> exp(t*I);

spacecurve([Re(z(t)), Im(z(t)), t], t = 0 .. 4*Pi, axes = normal, labels = ["Re", "Im", "t"]);

It was successful.  With the following pde, I obtain an analytical solution using pdsolve.

a := 3;
L := 2*Pi;
d := 0.5;
T0 := 2*Pi;
PDE := diff(u(x, t), t, t) = a^2*diff(u(x, t), x, x) - d*diff(u(x, t), t);
IBC := u(x, 0) = cos(Pi*x/L), D[2](u)(x, 0) = 0, D[1](u)(0, t) = 0, D[1](u)(L, t) = 0;
pds := pdsolve({IBC, PDE}, u(x, t));

It fail 2D plotting using the following:

with(plots);
complexplot(u(0, t), t = 0 .. 6);

So I break down the pds with the following:

RP := Re(pds);
IP := Im(pds);
RP0 := eval(RP, x = 0);
RP0t := unapply(RP0, t);
IP0 := eval(IP, x = 0);
IP0t := unapply(IP0, t);

And I was hopeful as the following give me real numbers when I approximate them:

RP0t(1);
                             "(->)"


                     Re(u(0, 1)) = 0.20248

RP0t(2);
                             "(->)"


                     Re(u(0, 2)) = -0.57765

But it fails in both 2D and 3D plot:

plot([RP0t(t), t = 0 .. 6])

spacecurve([RP0t(t), IP0t(t), t], t = 0 .. 6, axes = normal)

Dear sir,

i want to draw velocity and temperature plots for fluid and dust phases. but getting error in that showing 12 BC need only 8 
i have tried with 8 Bc also but showing different error how to rectify it

dust_phase_work_error.mw 

I have two equations developed in different ways and I want to compare them.
The first is a development done using maple, while the second is an algebraic analysis.

I need to find out if both are identical and, therefore, if the subtraction would be equal to zero.

How should I proceed?

I had thought about simplifying the first and comparing it with the second; is that a good approach?

 

restart

with(plots)

H0 := -S1^2*eta1-S2^2*eta2-S1*gamma1-S2*gamma2

-S1^2*eta1-S2^2*eta2-S1*gamma1-S2*gamma2

(1)

NULL

Z0 := exp(-beta*H0)

exp(-beta*(-S1^2*eta1-S2^2*eta2-S1*gamma1-S2*gamma2))

(2)

Z0 := add(Z0, S1 = [-2, -1, 0, 1, 2])

Z0 := add(Z0, S2 = [-2, -1, 0, 1, 2])

G0 := -ln(Z0^((1/2)*N))/beta

G01 := -ln((2*exp(4*beta*eta1)*cosh(2*beta*gamma1)+2*exp(beta*eta1)*cosh(beta*gamma1)+1)^((1/2)*N)*(2*exp(4*beta*eta2)*cosh(2*beta*gamma2)+2*exp(beta*eta2)*cosh(beta*gamma2)+1)^((1/2)*N))/beta

-ln((2*exp(4*beta*eta1)*cosh(2*beta*gamma1)+2*exp(beta*eta1)*cosh(beta*gamma1)+1)^((1/2)*N)*(2*exp(4*beta*eta2)*cosh(2*beta*gamma2)+2*exp(beta*eta2)*cosh(beta*gamma2)+1)^((1/2)*N))/beta

(3)

Teste := G0-G01

NULL

Download TESTE_MAPLE.mw

my question is a little bit long but is not complicated, i want find thus  unkown but  realy i am don't know how apply on it by maple, i have two best paper which explain very well i just want to find thus dimensional Lie algebra which is be invariant or not satisfy condition or not which i have to used or which i have not to use it also the importan part how find them in paper 1 first , for equation fisher 
How find eq(29) which is i think is two -dimensional Lie algebra of equation, also the best part is reduction which by apply this we can change PDE to ode but i don't know how apply eq(31) or even find it yet  is related to eq(27-28)  and by replacing equation eq(34) we can get our ode i am just loking for the ode, for the eq(76) and eq(85) have same procedures,  i will mention the paper link too 

Lie.mw

paper-1

paper-2

given

ode:=x^2*diff(y(x),x)+cos(2*y(x)) = 1; 
ic:=y(infinity) = 5/4*Pi; 
mysol:=cot(y(x))=2/x+1;

the above solution is verified against the ode, but Maple do not give zero for the IC part. It gives 

                                 [0, -Pi*_Z6 + Pi]

But we can see the IC are verified also

limit(eval(mysol,y(x)=5/4*Pi),x=infinity)

Gives

                                    1 = 1

my  code checks if the entry in the result of odetest is zero or not. Hence for -Pi*_Z6 + Pi it thinks now the solution is wrong because it is not zero.   Ofcourse looking at it on the screen, we see that for _Z6=1 then it becomes zero.  

The question, why Maple odetest do not return zero for the IC part?

eq:=cot(y)=-A;
solve(eq,y)

eq:=cot(y)=A;
solve(eq,y)

I would expect solution to first to be arccot(-A) and for second to be arccot(A) but Maple likes to write the solution for the first one as Pi-arccot(A).

Of course Maple solution is correct. But why make it so complicated? Why not just give arccot(-A) as solution?  A is just a symbol.

I tried 4 different cas systems and they all give arccot(-A) for first one, except Maple gives Pi-arccot(A)

Is there some subtle reason why Maple gives solution like this instead of the simpler one? 

And is there a way to tell Maple not to do this? This seems to be something hardcoded internally in its automatic trig simplifications? I just do not see the point of writing it this way. May be someone knows why.

Count the number of paths from A to B in the following figure. 
The paths may not touch themselves and must pass through every square (horizontally or vertically).
one of the paths 
How many  paths  possible ?
Een paden probleem
Approach via graph theory?

I have tried to create a function "modelica style" that acts as a custom component.

The Modelica code editor recognizes it.  It correctly sees the language constructs "function, parameter, etc." and then the block has the {} symbology showing it is a function.  Also, the Syntax Template doesn't seem to work per chapter 07.  i.e., the reference of "function" plus CTL-SHIFT-SPACE does nothing. 

However, trying to call this does not work and errors that the function is being called from main as a public declaration and gving the named function "myfunction_1" instantiation within main which errors out.

    Modelica coide in Main:   public MyFunction myfunction_1 annotation(Placement(transformation(origin={120.0,160.0},extent={{-20.0,-20.0},{20.0,20.0}},rotation=0)));

MyFunction is declared below Main along with another custom component model class "UseMyFunction" that calls this function with the variables being used in the simulation.

Where can I find the modelica language references that MapleSim accepts in the modelica coding region?

This mini-attempt is to find the usage syntax and method to reach higher custom functions that act similar to "Math" code blocks in the library.

Bill

How can I display numerical values alongside a plot as shown in the sample below? What is the syntax?

Q_legend.mw

Hi,

I am trying to reproduce a polar curve, as shown in the attached picture.
I have tested several polar expressions and different plotting options in Maple, but I can’t manage to obtain an exact match

If you have any ideas about a possible polar equation, a combination of functions, or plotting parameters (sampling, domain, polarplot options, etc.), I would be very grateful.

Thanks in advance for your help!

Q_Polar.mw

Dear Power Users, I do hope someone is willing to help me out. I want to do the analysis of 3 cycles of an extension-load measurement. I would like to calculate:

- the slope of the upgoing part of the cycle between 1 and 4 N (loading stiffness)

- the slope of the unloading part of the cycle between 4 and 1 N

- the surface of each cycle.

- the extension at the minimum and maximum value of each cycle

I did this before using a special addin of mathcad 15 but as this is no longer available I hope to do this in maple. 

AnalysisCyclicData2.maple

Hi

I’m currently trying to animate a graph with about 50 vertices of this type, and I was thinking of using the GraphTheory package for that purpose.

If you have any suggestions or possible directions to explore, I’d be very happy to hear them.

Thanks again for all the helpful tips and support — they’re truly appreciated
 

I want to present my regional plot similar to the sample shown, using appropriate legends and labels. What syntax should I use to achieve this? Also, the axis labels need to be clear and bold, as they currently appear faded. What modifications should I make in the syntax?

Q1.mw

SAMPLE:

according to help under Explore, it says

I wanted to add title at top of the Explore window. But title do not show. 

Explore(plot(a*sin(b*t),t=0..10),
   parameters=[              
        [a=1..20],
        [b=1..20]
        ],
  initialvalues=[a=6,b=5],placement='right',width=300,'title'="My Explore");

I was expecting My Explore to show at top of frame above. What Am I doing wrong?

Maple 2025.2

Is this a bug?  Or one can not mix slider for one variable and textarea for second variable in Explore?

Or do I need to initialize the textarea is special way? Nothing in help shows an example with textarea and slider together.

interface(version);

`Standard Worksheet Interface, Maple 2025.2, Windows 10, November 11 2025 Build ID 1971053`

No textarea , works OK

 

restart;

Explore(plot(a*sin(b*t),t=0..10),
   parameters=[              
        [a=1..20],
        [b=1..20]
        ],
  initialvalues=[a=6,b=5],placement='right',width=300);

 

 

Change one slider to textarea, now error

 

restart;

Explore(plot(a*sin(b*t),t=0..10),
   parameters=[              
        [a=1..20],
        [b,'controller' = 'textarea','label'="b" ]
        ],
  initialvalues=[a=6,b=5],placement='right',width=300);

Warning, expecting only range variable t in expression 20*sin(b*t) to be plotted but found name b

Warning, expecting only range variable t in expression sin(b*t) to be plotted but found name b

 

 

Download explor_feb_19_2026.mw

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