## how do I simulate optimal control in maple (direct...

How do we write code for optimal problem using Pontryagin's maximum principle for simulation.

## How can I make a procedure control the font of the...

I want to make the blue output my procedure spits out a another color, and align it to the right, is this even possible? Or something like it?

## Is it possible to have a procedure write to execut...

I basically want to make a Maple procedure that does certain calculations and writes the explanation for each calculation. I do however want Maple to write these explanations as a text field like in a normal Maple worksheet, instead of the blue output in the middle. Is this possible? Or is there any alternative ideas you have that I could try? Would really appreciate any kind of help, thanks.

## 3 degree of freedom transfer function (special roo...

I have included a transfer function of a 3 degree of freedom system.  There are special loci, aside from s = 0, where the numerator will equate to a REAL scalar value, and the denominator will reduce to a simple product of the individual z roots.  Does anyone know if there is some physical significance, interpretation, or analog to this condition and special loci?untitled.mw

## plotting problem...

hello, i just try to plot the relation between my outputs (u, and phat) with i from 0 to 10 , but i have aproblem any suggestions?

 (1)

 (2)

 (3)

 (4)

 (5)

 (6)

 (7)

 (8)

 (9)

 >
 > p:=Array(0..10):   p[0]:=0:   for i from 0 to 4 do       p[i+1]:=50*sin(3.14*(i+1)*(4)/0.6):       phat[i+1]:= p[i+1]+((7)*u[i])+((8)*u__dot[i])+((9)*u__doubledot[i]):       u[i+1]:= phat[i+1]/(5):       u__dot[i+1]:=(20*(u[i+1]-u[i]))-u__dot[i]:       u__doubledot[i+1]:= ((400*(u[i+1]-u[i]))-(40*u__dot[i])-(u__doubledot[i])): end do; for i from 5 to 9 do       p[i+1]:=0.0:       phat[i+1]:= p[i+1]+((7)*u[i])+((8)*u__dot[i])+((9)*u__doubledot[i]):       u[i+1]:= phat[i+1]/(5):       u__dot[i+1]:=(20*(u[i+1]-u[i]))-u__dot[i]:       u__doubledot[i+1]:= ((400*(u[i+1]-u[i]))-(40*u__dot[i])-(u__doubledot[i])):   end do;
 >
 >
 (10)

 > fd_table:=eval(seq[u(i),phat(i)],i=0..N);
 (11)

 >
 >
 >

## How do I solve a system with boundary conditions t...

Hello everyone,

I am having trouble trying to solve a system of differential equations. The modeling was made from the equilibrium equations of a pressure vessel. The set of equations is shown below:

As you see it is a set of two second-order partial differential equations. So, we need four boundary conditions. This one is the first. It means that the left end of the pressure vessel is fixed.

This one is the second boundary condition. It means that the right end of the pressure vessel is free.

This one is the third boundary condition. It means that the inner surface of the pressure vessel is subject to an external load:

At last, we have the fourth boundary condition. It means that the outer surface of the pressure vessel is free.

The first test I have been trying to do is the static case. In this case, the time terms (the right side of the two equations shown) is zero.

The maple commands that I am using are the following:

```restart; E := 200*10^9; nu := .33; G := E/(2*(1+nu)); RI := 0.254e-1; RO := 2*RI; p := proc (x) options operator, arrow; 50000000 end proc; sys := [E*(nu*(diff(v(x, r), x))/r+nu*(diff(diff(v(x, r), x), r))+(1-nu)*(diff(diff(u(x, r), x), x)))/(-2*nu^2-nu+1)+G*(diff(diff(u(x, r), r), r)+diff(diff(v(x, r), x), r)+(diff(u(x, r), r))/r+(diff(v(x, r), x))/r) = 0, E*((1-nu)*(diff(diff(v(x, r), r), r))+nu*(diff(diff(u(x, r), x), r))+(1-nu)*(diff(v(x, r), r))/r-(1-nu)*v(x, r)/r^2)/(-2*nu^2-nu+1)+G*(diff(diff(u(x, r), r), x)+diff(diff(v(x, r), x), x)) = 0]; BCs := {E*(nu*v(L, r)/r+nu*(D[2](v))(L, r)+(1-nu)*(D[1](u))(L, r))/(-2*nu^2-nu+1) = 0, E*(nu*v(x, RI)/RI+(1-nu)*(D[2](v))(x, RI)+nu*(D[1](u))(x, RI))/(-2*nu^2-nu+1) = -p(x), E*(nu*v(x, RO)/RO+(1-nu)*(D[2](v))(x, RO)+nu*(D[1](u))(x, RO))/(-2*nu^2-nu+1) = 0, u(0, r) = 0}

sol := pdsolve(sys, BCs, numeric)```

I am getting the following error:

Error, (in pdsolve/numeric/process_IBCs) initial/boundary conditions must depend upon exactly one of the independent variables: 0.1459531181e12*v(L, r)/r+0.1459531181e12*(D[2](v))(L, r)+0.2963290579e12*(D[1](u))(L, r) = 0

In this case, my boundary conditions do depend on more than one independent variable. How do I proceed?

Pedro Guaraldi

## Maple 2017: What to expect?...

Is there anyone who has seen maple 2017 provide some details about what new features are being introduced. Is there a platform where we can suggest what features we would like to be added or enhanced?

## Declare a multilinear operator as real valued...

I'm trying to define some multilinear forms to study differential geometry. What I need is only symbolic. My intention is symplify computations involving multilinear forms.

For example, to create an symbolic inner product "g" I used the command "define" like in this post:

http://www.mapleprimes.com/questions/203480-Define-And-Use-Abstract-Linear-Operator

So I tipped:

define(g, orderless, multilinear);

My doubt is: how can I declare that g(x,y) is always scalar?

With it I would simplify things like g(g(z,w)*x,y) = g(z,w)*g(x,y)

In my case, specifically, I type:

v:=(X,Y,Z)->g(Y,Z)*X-g(X,Z)*Y;

r:=(X,Y,Z,W)->g(v(X,Y,Z),W)-g(Y,T)*g(v(X,T,Z),W)+g(X,T)*g(v(Y,T,Z),W);

expand(r(X,Y,Z,W));

and the result is:

g(W,g(Y,Z)*X)-g(W,g(X,Z)*Y)-g(T,Y)*g(W,g(T,Z)*X)+g(T,Y)*g(W,g(X,Z)*T)+g(T,X)*g(W,g(T,Z)*Y)-g(T,X)*g(W,g(Y,Z)*T)

But I would enjoy that it were:

g(Y,Z)*g(W,X)-g(X,Z)*g(W,Y)-g(T,Z)*g(T,Y)*g(W,X)+g(X,Z)*g(T,Y)*g(W,T)+g(T,Z)*g(T,X)*g(W,Y)-g(Y,Z)*g(T,X)*g(W,T)

Is there a way to declare that g(x,y) is always scalar?

Thanks.

## Problem aplying the chain rule with dchange...

I have a problem using dchange when my variable depend on two (or more variables) and I would like to apply the chain rule.

For example, when I use the command

I would expect something like

But I get an error saying that the number of new variables and transformation equations must be the same.

Any idea how I could solve it?

Thanls a lot for your help.

## stuck in finite difference method...

i need to solve for u[i+1] as i attached i wrote the equations but i cant get any answers for it, the delta t is 0.1 and i need to go for ten steps, thank you

 (1)

 (2)

 (3)

 (4)

 (5)

 (6)

 (7)

 (8)

 (9)

 (10)

 (11)

 (12)

 (13)

 >
 (14)
 >
 (15)
 >
 (16)

 >
 (17)

 (18)

## Plotting the movement of 4 planets...

Greetings,

currently im working on a project in which i basically have to calcuate and plot a little solar system, using newton mechanic. The work is done, but as it appears, the solution simply cannot be true. In the given example you can see that the planets move in more or less straight lines. I presume that the error is somewhere in the solution of the system of differential equations, but i can't see where it is.

I am grateful for every advice.

PlanetenSpacecurve.mw

## Multiple plot for different values of M...

I m using the follwing commands for ploting the five differnt values of M

```with(plots):
SDfd1 := odeplot(dsol[1], [eta, diff(f(eta), eta)], -1 .. 1, color = green, axes = box);
SDfd2 := odeplot(dsol[2], [eta, diff(f(eta), eta)], -1 .. 1, color = red, axes = box);
SDfd3 := odeplot(dsol[3], [eta, diff(f(eta), eta)], -1 .. 1, color = blue, axes = box);
SDfd4 := odeplot(dsol[4], [eta, diff(f(eta), eta)], -1 .. 1, color = black, axes = box);
SDfd5 := odeplot(dsol[5], [eta, diff(f(eta), eta)], -1 .. 1, color = pink, axes = box);
display([SDfd1, SDfd2, SDfd3, SDfd4, SDfd5], labels = ["η", "f ' (η)"],
labeldirections = [horizontal, vertical], labelfont = [italic, 16], axes = boxed,
axesfont = [times, 14], thickness = 3);```

But i do not want in colors.....i need graph without colors in different styles. how can ? Moreover i need legend which must be in centre of graph or within the box. It must not on left, right ,up or below. can some one help ?

Find the least number of moves and how many different ways that is achieved to win snakes and ladders with 1 die, with 2 dice, and how about 3 dice.  How to realize this with Maple?

## local attractor ode ...

Hi,

I need your help to classify the follwing set {0}, {1} and [0,1] are local attractor or not and in the case of local attractor how can we determine the bassin of attraction.

ode:=diff(x(t),t)=sqrt(x(t));

how can we prove using maple which of {0}, {1} and [0,1] are local attarctor or not.

Many thanks