## Minimization Process...

Hi all

I have the following segment of maple program which belongs to time delay systems dynamic. here C=X-X0-G.Z-X.Dtau.P+X.Dtau.Z-U.P, is a matrix(vector) which comes from reordering the system terms and my goal is to minimizing J:=X.E.Transpose(X)+U.E.Transpose(U), subject to constraint C=0, but i don't know how to do so.

I will be so grateful if anyone can guide me

best wishes

Ph.D Candidate

Applied Mathematics Department

 > restart: with(Optimization): with(LinearAlgebra): macro(LA= LinearAlgebra): L:=1:  r:=2:  tau:= 1: interface(rtablesize= 2*r+1): Z:= Matrix(      2*r+1, 2*r+1,      [tau,       seq(evalf((L/(2*(iz-1)*Pi))*sin(2*(iz-1)*Pi*tau/L)), iz= 2..r+1),       seq(evalf((L/(2*(iz-1-r)*Pi))*(1-cos(2*(iz-1-r)*Pi*tau/L))), iz= r+2..2*r+1)       ],      scan= columns,      datatype= float[8] );                          Dtau00:= < 1 >: Dtau01:= Vector[row](r): Dtau02:= Vector[row](r): Dtau10:= Vector(r): Dtau20:= Vector(r): Dtau1:= LA:-DiagonalMatrix([seq(evalf(cos(2*i*Pi*tau/L)), i= 1..r)]): Dtau2:= LA:-DiagonalMatrix([seq(evalf(sin(2*i*Pi*tau/L)), i= 1..r)]): Dtau3:= -Dtau2: Dtau4:= copy(Dtau1): Dtau:= < < Dtau00 | Dtau01 | Dtau02 >,          < Dtau10 | Dtau1  | Dtau2  >,          < Dtau20 | Dtau3  | Dtau4  > >;   P00:= < L/2 >: P01:= Vector[row](r): P02:= Vector[row](r, j-> evalf(-L/j/Pi), datatype= float[8]): P10:= Vector(r): P20:= Vector(r, i-> evalf(L/2/i/Pi)): P1:= Matrix(r,r): P2:= LA:-DiagonalMatrix(P20): P3:= LA:-DiagonalMatrix(-P20): P4:= Matrix(r,r): P:= < < P00 | P01 | P02 >,       < P10 | P1  | P2  >,       < P20 | P3  | P4  > >; interface(rtablesize=2*r+1):    # optionally J:=Vector([L, L/2 \$ 2*r]):      # Matrix([[...]]) would also work here E:=DiagonalMatrix(J); X:=  Vector[row](2*r+1,symbol=a); U:=Vector[row](2*r+1,symbol=b); X0:= Vector[row](2*r+1,[1]); G:=Vector[row](2*r+1,[1]); C:=simplify(X-X0-G.Z-X.Dtau.P+X.Dtau.Z-U.P);
 (1)
 > J:=X.E.Transpose(X)+U.E.Transpose(U);
 (2)
 > Minimize(J,{C=0});
 Error, (in Optimization:-NLPSolve) invalid arguments
 > #XP:=-.015+X[1]+add(X[l+1]*f1(l)+X[r+l+1]*f2(l), l= 1..r): #plot([XP,T1], t= 0..1);#,legend= "Solution Of x(t) with r=50"):
 >
 >
 >
 >

## How do I express a function as a variable in Maple...

I am new user of Maple. I have an expression like f(x,y)/g(x,y) and I want to have Maple name f(x,y) as something simple like "h" so that later equations write h/g(x,y) instead of the complete f(x,y)/g(x,y), and also to be able to simplify other equations in terms of h.

For example, a=(x+1)(y-5)^2/(x+y-3). Can I get Maple to let h=(x+1)(y-5)^2, so that I get h/(x+y-3) when I ask for a?

Sorry if this question is basic (and my math terminology incorrect), but I have been trying for a while.

## Generate Surface using PDE Method...

Does anyone has any maple worksheet that generate surface using the PDE method described in this article?  I am trying to learn this method but I am not familiar with the mathematics to do it although the paper gives some description of it.  I hope someone can demonstrate the procedure in Maple.  Thanks

http://www.researchgate.net/publication/259095177_Automatic_shape_optimisation_of_pharmaceutical_tablets_using_Partial_Differential_Equations/file/72e7e52a87ed129d4a.pdf

## Quick question about the solve function...

EDIT:EDIT: I found what I was looking for. Thanks!

eq:=(V^(1-r/(r-s))*V*k/(r-2*s)+_C1)*V^(r/(r-s))=0;

$\left&space;(&space;\frac{V^{1-\left&space;(&space;\frac{r}{r-s}&space;\right&space;)}*V*k}{r-2*s}+C1&space;\right&space;)&space;*V^{\frac{r}{r-s}}=0$

solve(eq,C1);

Can anyone tell me why nothing happens when I solve the above equation for C1.

I've been coming across this problem a few times lately, but sometimes when the equations are less complicated it does work from time to time.

Any help would be greatly appreciated.

EDIT:  Thanks Markiyan Hirnyk

But I'm still having some trouble.

f:=t->(-r*t+s*t+V)^(r/(r-s));

eq2:=diff(C*f(t),t)+C*f(t)*r/(V+s*t-r*t)=s*k*t;

solve(eq2,C);

When I try solving eq2 nothing happens.

This time C is just a variable I used and not one Maple generated.

So why doesn't it work with this particular equation?

## Minimizing sum of functions...

Hi. I'd like to find the solution closest to zero for sum(abs(f(k, m, n)+g(k, m, n)), n = i .. j) , when a < m, n < b .

Have trouble wrapping my head around how to do that and would appreciate any help.

Even better would be to find a solution where the maximum absolute value of f(k, m, n) + g(k, m, n) is minimized for n = i .. j) and when a < m, n < b , but I'm guessing the sum would be easier, and close enough.

Maybe I'm barking up the wrong tree getting this done with Maple, but I'm hopeful.

Thank you for looking

## why does combine(sin(x)^2) expands the expression?...

This is just a question on terminology. The name "combine" implies pulling terms together. Yet, when applied to something like sin(x)^2 it has the effect of expanding it:

r:=sin(x)^2;
combine(r);

Which seems counter-intutive to me. I tried first expand(r) but that did not expand it.

Fyi, in Mathematica the function to do the above is called

Sin[x]^2;
TrigReduce[%]

1/2 (1 - Cos[2 x])

As Mathematica does not have a Combine[] function.

So, I am just wondering about the naming, that is all. I would never have thought first that a command called combine() will expand sin(x)^2.

## how to make S transfer function to Z transfer func...

Hi, all

I want to get some formular by the maple. I have some S domain transfer function, want to transform to the Z domain, but I don't know the way to realize it, is there any library function like "c2d" as in the Matlab? but "c2d" can not deal with the expression.

Thanks for replay to me!!!

## How do I launch the clickable math interface in ma...

New user. How do I launch the clickable math interface as in the demo video in maple 17 student? I also need help with entering/ solving simultaneous equations step by step.

## I need to review probability...

Hi,

I'm preparing for GRE and i came across this question from 800score.com while reviewing concepts for probability.

In a deck of 52 standard playing cards, what is the probability that pulling a single card from the deck
will produce a black card?

http://www.800score.com/content/gre/guidec7dview1a.html

Please...

## bracket matching rectangular yellow box not appear...

I have bracket matching turned on but donot get the rectangular yellow box around matching brackets as shown in the attached picture. Can anyone help me how to turn this feature on for both input and output?

## How to solve an equation in three variables, in te...

I have the following equation, I want to solve it for b keeping a and c fixed.

5*b^5+(60-5a)*b^4+(125+50c-80a)*b^3+(594c-445a-775)*b^2+(2324c-1005a-3270)*b+3000c-750a-3000=0.

How to solve it in maple?

## How to integrate exponential integrals in Maple? (...

Hello,

I've been trying to force maple to find a solution of this differential equation:

ode := -((D@@2)(y))(r)-2*y(r)/r+y(r) = (2-V(r))*u[0](r)

dsolve(ode, y(r));

gives

y(r) = r exp(-r) _C2 + (exp(r) + 2 exp(-r) Ei(1, -2 r) r) _C1 - 4             /  /  /             |1 | |    exp(-3 r) |- | |              |2 | |              \  \/                                  /   2    \             \

## How do you create banked curves in MAPLE?...

For a math class, we have to create a roller coaster. Part of the coaster consists of two banked curves. I've tried looking it up but Maple isn't very clear on how to create the. So, how do you create banked curves in Maple?

## Polar plots for two differential equations...

Hi,

I have two differential equations describing a solar sail in 2D.

One is my radial direction and one is the tangential direction.

I have plotted r(t) and theta(t) but I want r(theta) so I have assigned my two differential equations and initial conditions, have my two plots for r and theta in terms of t and then I have used the following command to plot in polar coordinates: