## How can I force Maple to rewrite expressions conta...

Hi,

Is it possible to force Maple to simplify these Sum(s) ?
SimplifySum.mw

 > s := Sum(a*X[n]+b, n=1..N); simplify(s); value(s);  # part of the job done  but... IWouldLikeToHave = a*Sum(X[n], n=1..N) + b*N; # or +N*b, it doesn't matter    (1)
 > s := Sum(X[n]+Y[n], n=1..N); (expand@value)(s); IWouldLikeToHave = Sum(X[n], n=1..N) + Sum(Y[n], n=1..N);   (2)
 >

## How do I put a label on my output of a for loop? ...

I performed an iteration of over 300 using for loop, how can I label each of the output? Please help...

## Animate implicitplot...

Hi ,

How to animate implicitplot?

Thanks    > >      > >          >      > >      > >          >  Download LoveMaple1Anim.mws.mw ## Maple won't solve system of linear equations if on...

Hello everyone.

I have a very simple question.  When I use maple to solve the following equations,  everything works as expected

solve({
a + b + c + d = 0,
d * (480-471.1) + b * (484.3-471.1) + c * (547.2-471.1) + m4 = 0,
a * (471.1-484.3) + d * (480-484.3) + c * (547.2-484.3)  + m4 = 0,
a * (471.1-547.2) + d * (480-547.2) + b * (484.3-547.2) + m4 = 0,
a * (471.1-477) + d * (480-477) + b * (484.3-477) + c * (547.2-477) + m4 = 0,
a * (471.1-494) + d * (480-494) + b * (484.3 - 494) + c * (547.2 - 494) + m4 = 0,
a * (471.1-540) + d * (480-540) + b * (484.3 - 540) + c * (547.2-540) + m4 = 0,
a * (471.1-477) + m1 = 0,
a * (471.1-494) + d * (480-494) + b * (484.3 - 494) + m2 = 0,
a * (471.1-540) + d * (480-540) + b * (484.3 - 540) + m3 = 0},{a,b,c,d,m4})

Now if I add one more equation to it then maple won't solve

solve({
a + b + c + d = 0,
d * (480-471.1) + b * (484.3-471.1) + c * (547.2-471.1) + m4 = 0,
a * (471.1-484.3) + d * (480-484.3) + c * (547.2-484.3)  + m4 = 0,
a * (471.1-547.2) + d * (480-547.2) + b * (484.3-547.2) + m4 = 0,
a * (471.1-477) + d * (480-477) + b * (484.3-477) + c * (547.2-477) + m4 = 0,
a * (471.1-494) + d * (480-494) + b * (484.3 - 494) + c * (547.2 - 494) + m4 = 0,
a * (471.1-540) + d * (480-540) + b * (484.3 - 540) + c * (547.2-540) + m4 = 0,
a * (471.1-477) + m1 = 0,
a * (471.1-494) + d * (480-494) + b * (484.3 - 494) + m2 = 0,
a * (471.1-540) + d * (480-540) + b * (484.3 - 540) + m3 = 0
a * (471.1-481) + d * (480-481) + mx = 0},{a,b,c,d,m4,mx})

Obviously,  using the first solve command,  I can solve for a and d.  I can substitude that into the last equation and solve for mx.  But for some reason, maple just won't do that for me directly from the second solve command.

Can someone help?  thanks

## Bug: Copy as MathML does not work...

When I tried to copy any of the expression among (1) and (4), the only MathML string appearing at the target application is this:

<math xmlns='http://www.w3.org/1998/Math/MathML'>[/itex]

 > restart:
 > n:= 2:
 > X:= Vector(n, symbol= x); (1)
 > W:= Matrix(3,2, symbol= w); (2)
 > V:= W.X; (3) (4)
 >

Can you tel me how to fix this error?

## Problem with 'alias'...

Refers to yMaple 2019.1

The command alias(X(s)=laplace(x(t),s,t)) will not be executed in the  code following it. It seems that the 'funny font' L used instead of the word 'laplace' ist not recognized. Maple 2018.2.1 works fine, since it doesn't use the 'L" but works with 'laplace'. Is there a fix ?

## Method to approximate solution of ODE...

Consider the following problem.

I'm looking for an implementation of the following approximation-method. Thanks to @Carl Love I already have a code for the exact solution. (It might be that my example using the given A,b,c does not have a solution but then I would just have to use different A, b, c.)

num211.pdf

I uploaded the question as a pdf so that it is nicer to read.

I know there are probably better ways which are already part of some packages but I want to use this method.

Edit:

A procedure that does the following is all I need:

num211_2.pdf

## IC and BC problems with semiclassical coupled Burg...

see below.  I am getting IC and BC errors.  The code is below/attached.  Can anyone help?

Melvin

This is a corrected version of pdeProb2.mw, in which we examine the 1-D classical burgers equation, and find an asymptotic steady state in the solution fields u, v which is not reached by a solution via numerical simulation.

NOTE:  When generating and displaying PLOTS AT HIGH RESOLUTION, do not use p1 := plot(bla, etc);  i.e. do not end with a semicolon.   Instead, end with a colon viz  p1 := plot(bla, etc): which sends the result to p1 instead of  generating an excess memory use message.  Then create the plot by executing p1; i.e. end the assigned p1 with a semicolon to display the graphics result.

 > We load the MAPLE Physics package from the MapleCloud, in order to support solutions using pdsolve().

 >  (1)
 >  (2)

Start of definition of problem:

 >  (3)

Start of definition of problem:

 > with(PDETools); with(CodeTools);with(plots);   (4)
 > Two 1-D coupled Burgers equations - semiclassical case O(1), O( ) : retain O(1) only for u(x,t) and O(1), O( ) for v(x,t):

In the quantum case, there are two coupled quantum Burgers equations, which each include the quantum potential terms.  As in the classical case above, we apply constant external forces and .  Our aim is to display the profiles of and as strings on space.

 > #hBar := 'hBar': m := 'm':Fu := 'Fu': Fv := 'Fv': # define constants
 > hBar:= 1:m:= 1:Fu:= 0.2:Fv:= 0.1: # set constant values - same as above ...consider reducing

Notice that we set At O( ) the real quantum potential term is zero, leaving the classical expression:

 > pdeu := diff(u(x,t),t)+u(x,t)/m*(diff(u(x,t),x)) = Fu; (5)

As in the classical case above, the temporal and spatial derivative are each of order 1; so only one initial condition and one boundary condition are required for this part of the semiclassical equations.

On the otherhand, the imaginary quantum potential equation for v(x,t) has only O( )  terms so together the pair of equations for are semiclassical:

 > pdev := diff(v(x,t),t)+u(x,t)/m*(diff(v(x,t),x))-hBar*(diff(u(x,t),x\$2))/(2*m)+v(x,t)*(diff(u(x,t),x))/m = Fv; (6)

By inspection of the derivatives in above two equations we now set up the ICs and BCs for and Note that the above second order spatial derivative requires a 1st order derivative boundary condition as defined below.

The quantum initial and boundary conditions are similar to the classical case, but also comprise additional boundary condition terms for and for , notably a 1st derivative reflective BC term for .

 > ICu:={u(x,0) = 0.1*sin(2*Pi*x)};# initial conditions for PDE pdeu (7)
 > ICv:={v(x,0) = 0.2*sin(Pi*x)};# initial conditions for PDE pdev (8)
 > IC := ICu union ICv; (9)
 > BCu := {u(0,t) = 0.5*(1-cos(2*Pi*t)),D(u)(1,t) = 0}; # boundary conditions for PDE pdeu: note the reflective derivative term D(u) (10)
 > BCv := {v(0,t) = 0.5*sin(2*Pi*t), v(1,t)=-0.5*sin(2*Pi*t)}; # boundary conditions for PDE pdev (11)
 > BC := BCu union BCv; (12)

This set of equations and conditions can now be solved numerically.

The above IC and BC are both at and thus consistent.

 > pdu := pdsolve({pdeu,pdev},{IC,BC},numeric, time = t,range = 0..1,spacestep = 1/66,timestep = .1);

Here is the 3D plot of u(x,t):

 > T := 3; p1 := pdu:-plot3d(u,t=0..T,numpoints = 2000,x=0.0..2, shading = zhue,orientation=[-146,54,0],scaling = constrained, title = print("Figure 1",u(x, t), numeric)); > ## error in calculatting partial derivative...

I want to calculate (partialH/partialq). But I encountered an error when I evaluate it.

restart;
with(PDEtools);
with(linalg);
alias(q = q(x, t), p = p(x, t));
q, p
H := lambda*p*q+conjugate(lambda)*conjugate(p)*conjugate(q)+(1/2*(p^2+conjugate(q)^2))*(conjugate(p)^2+q^2);

diff(H, q(x, t));

maple shows error:

Error, invalid input: diff received q(x, t), which is not valid for its 2nd argument
How to fix this issue?

## Better maple 3D plotting....

Cl := x->max(-1,min(1, x)):

M := 25:
#-sqrt(1-x^2)..sqrt(1-x^2)
f := (x,y)->Re(sqrt(x+_i*y)):
P1 := plot3d([seq([x, y, k*f(x,y)], k=[-1,1])
], x=-1..1, y=-1..1, labels=[x,y,Rew],style=surface, grid=[200,200], thickness=2, colorscheme=["xyzcoloring", [(x,y,z)->y^2,(x,y,z)->x*y,(x,y,z)->x^2]]):
P2 := seq(spacecurve([seq([Cl(t*cos(2*Pi/M*j)), Cl(t*sin(2*Pi/M*j)), sign(k)*(abs(k) - 1.5)/140 + sign(k)*f(Cl(t*cos(2*Pi/M*j)),Cl(t*sin(2*Pi/M*j))),color=[RGB(1,t^2*sin(2*Pi/M*j)^2,1)]], k=[-2,-1,1,2])], t=0..13, thickness=4, transparency=0.7, numpoints=1500),j=1..M):

display(P1, P2);
display(P2);

The above draws a Riemann surface for sqrt(z).

The problem is that maple doesn't seem to make grid lines nicely project from the function. I added the lines myself but I cannot color them in a way that uses t. the parameter t is completely ignored in the graphing of the lines.

Also, the first graph cannot have transparency set and give meaningful results.

adding transparency=0.001 it looks like it is 10% transparent.... and going below that it just turns off all transparency. I want to barely see through the surface.

It's really hard to get a nice graph for maple. The lighting, lines, and coloring are always off to reduce the visual impact.

## How would a springy brachistochrone behave?...

Imagine a brachistochrone shaped path made of a frictionless flexible metal strip which reacts to the force of a weighty sliding object.

Depending on its flexibility and the object's mass, what would be the strip's initial shape for fastest descent between its top and bottom? How would its shape change during the object's descent?

Perhaps an aircraft emergency escape slide or the fastest path for a slalom skier exemplify this kind of situation.

## Solve x'=Ax with initial conditions using DEtools ...

I want to solve x'(t)=A(t)x(t)+b(t) for given A, b, and intital conditions x(0).

I want to use matrixDE from the package DEtools. (I know there are probably other ways but this would be the most convenient way for further tasks).

My question is: How can I specify the initial values using matrixDE?

A:=Matrix(2,2,[1,-2,4,-5])

b:=Matrix(2,1,[3,7])

sol:=matrixDE(A,b,t)

For dsolve we have

dsolve({ode,ics})

## How to solve DE with Maple?...

Hello, I have a problem with solving this DE:

y'' - y = -4sin^3x + 9sinx where y(0)=y(2pi). I have solved it but i dont know how to do it in Maple. Thanks in advace.

## Matrix differentiation 2...

Dear all,

I did these commands in Maple:

restart:
x:=Matrix([[x1],[x2]])

W:=<<w11 | w12>, <w21 | w22>>

v:= (W.x)

<seq(diff(v,t),t=W)>;