Message Boards Message Boards

1
|
12916 Views
|
4 Replies
|
2 Total Likes
View groups...
Share
Share this post:

Linearization of differential equations (2)

Posted 10 years ago

Hello,

Currently, I migrate my Maple Code to Mathematica code. On a part linked to linearization, I meet some difficulties. In fact, i try to linearize some differential equations around an equilibrium position. The linearization is made with Taylor expansion at the fist order. Unfortunately, i didn't manage to find with Mathematica the same resultats than with Maple. In fact, in my Mathematica code, the terms at the second orders are not neglected (simplifed) as regard to the terms at the first order.

Do you have some ideas to correct my code so as to linearize the differential equations presented here at the first order (without the second order terms) with Mathematica ?

The results I would like to obtain are given in the Maple code. I inserted a screen print of my two codes (maple and mathematica) and I have also joined the notebook file.

Maple code for linearization :

Maple code

Mathematica code for linearization (The second order terms are underlined in red) :

Mathematica code

Attachments:
POSTED BY: B B
4 Replies

(fyi, the discussion title is a reference to http://community.wolfram.com/groups/-/m/t/449605)

POSTED BY: Bruce Miller
Posted 10 years ago

Here my code, to help for troubleshouting

Equation Psi

eq? = 
  (A*cos[?[t]]^2 - C*cos[?[t]]^2 + C)*[???][t] + 
    (-2*A*sin[?[t]]*cos[?[t]] + 2*C*sin[?[t]]*cos[?[t]])*
       Derivative[1][?][t]* Derivative[1][?][t] + 
    C*cos[?[t]]*Derivative[1][?][t]*? == 
  Subscript[m, 3]*g*L*sin[?[t]]*cos[?[t]]

Equation Theta

eq? = 
  A*(?^??)[t] + 
    cos[?[t]]*(A*sin[?[t]] - C*sin[?[t]])*(Derivative[1][?][t])^2 - 
    C*?*cos[?[t]]* Derivative[1][?][t] == 
  Subscript[m, 3]*g*L*cos[?[t]]*sin[?[t]];

Equations at equilibrium point

eq?E = eq? /. {? -> (?e &), ? -> (?e &)};

eq?E = eq? /. {? -> (?e &), ? -> (?e &)};

Equations with small variations around the equilibrium

eq?Ae = eq? /. {? -> (?e + ??[#] &), ? -> (?e + ??[#] &)};

eq?Ae = eq? /. {? -> (?e + ??[#] &), ? -> (?e + ??[#] &)};

Change of variables

?eq? = Inner[Subtract, eq?Ae, eq?E, Equal];

?eq? = Inner[Subtract, eq?Ae, eq?E, Equal];

repl =

 {??''[t] -> ??pp, ??'[t] -> ??p, ??[t] -> ??, 
   ??''[t] -> ??pp, ??'[t] -> ??p, ??[t] -> ??};

eq?Li = (?eq?) /. repl

eq?Li = (?eq? ) /. repl

Linearization

eq?Li = Normal @ 
  Series[eq?Li, 
    {??pp, 0, 1}, {??p, 0, 1}, {??, 0, 1}, {??pp, 0, 1}, {??p, 0, 1}, {??, 0, 1}];

eq?Li = 
  Normal @ 
    Series[eq?Li, 
      {??pp, 0, 1}, {??p, 0, 1}, {??, 0, 1}, {??pp, 0, 1}, {??p, 0, 1}, {??, 0, 1}];

Change of variables

eq?Li = eq?Li /. Map[Reverse, repl]

--> result :

???(t)(??(t)???(t)(?2Asin(?e)cos?(?e)?2Acos(?e)sin?(?e)+2Csin(?e)cos?(?e)+2Ccos(?e)sin?(?e))+???(t)(2Csin(?e)cos(?e)?2Asin(?e)cos(?e)))+????(t)(??(t)(2Acos(?e)cos?(?e)?2Ccos(?e)cos?(?e))+Acos(?e)2?Ccos(?e)2+C)+C???(t)cos?(?e)???(t)+C?cos(?e)???(t)=??(t)(gLm3cos(?e)sin?(?e)+gLm3??(t)cos?(?e)sin?(?e))+gLm3??(t)sin(?e)cos?(?e)
eq?Li = eq?Li /. Map[Reverse, repl]

--> Result :

A????(t)+???(t)(?C?cos(?e)?C???(t)cos?(?e))=??(t)(gLm3sin(?e)cos?(?e)+gLm3??(t)sin?(?e)cos?(?e))+gLm3??(t)cos(?e)sin?(?e)
POSTED BY: B B
Posted 10 years ago

Thank you for your information.

1) I tried to apply the function lin[] described in your link but I didn't manage to obtain the good results. I probably don't use it correctly. May you specify me which quantities you enter for the variables noms ? I believed that it was ye (equilibrium position) + deltay[t] (the small variation around the equilibrium). I attached in this post the code I have tried.

2) In the code that I have initially sent, do you see why some second order terms are not simplified ?

Thank you for your help.

Attachments:
POSTED BY: B B

This article in the Wolfram Library describes solving nonlinear boundary value problems by linearization.

http://library.wolfram.com/infocenter/MathSource/8484/

POSTED BY: Frank Kampas
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract