Message Boards Message Boards

0
|
8688 Views
|
1 Reply
|
0 Total Likes
View groups...
Share
Share this post:

How to solve a series of linear differential equations

Posted 10 years ago

I have the following system of differential equations

$$\rho1(t) = {(c1-\lambda(t))\over 2k1} $$ $$\dot\lambda(t)={\beta \lambda(t)-{(c1-\lambda(t))^2\over 4k1}}$$ and $$\rho2(t) = {(c2-x(t))\over 2k2} $$ $$\dot x(t) ={\beta x(t)-\delta1 (\lambda(t)-x(t))-{(c2-x(t))^2\over 4k2}}$$

I use the following Dsolve function to find ?(t) and x(t) with the terminal condition $?(T)=x(T)=0$, which then I can obtain $?1(t)$ and $?2(t)$

 eq = \[Lambda]'[t] == \[Beta]*\[Lambda][t] - (c1 - \[Lambda][t])^2/(4*k1);
DSolve[{eq, \[Lambda][T] == 0}, \[Lambda][t], t]

and

eq = x'[t] == \[Beta]*x[t] - \[Delta]1 (\[Lambda][t] - x[t]) - (c2 - x[t])^2/(4*k2);
DSolve[{eq, x[T] == 0}, x[t], t]

Now having $\rho1 (t)$ and $x(t)$, I need to solve the following linear first order differential equations to obtain $y3(t)$ , $y2(t)$ and $y1(t)$ $$\dot y3=d(t)??2?y3(t)$$ $$\dot y2=?2?y3(t)?(?1+?2)y2(t)$$ $$\dot y1=?1y2(t)??1(t)y1(t)$$ where $$d(t)=a+b?sin (2?t /50)$$ and Beta = 0.1; c1 = 10; c2 = 30; k1 = 100; k2 = 150; T = 100; [Delta]1 = 0.2; [Delta]2 = 0.2; Subscript[y, 0] = 10000; a = 4000; \b = 1000; I can solve for y3(t) using the following Dsolve

eq = y3'[t] == d - \[Delta]2*y3[t];
DSolve[{eq, y3[0] == Subscript[y, 0]}, y3[t], t]

But when I use the same method for $y2(t)$ it doesn't work

eq = y2'[t] == \[Delta]2*y3[t] - (\[Delta]1 + \[Rho]2) y2[t];
DSolve[{eq, y2[0] == Subscript[y, 0]}, y2[t], t]

I need to find the function y2(t) to repeat this to solve for $y1(t)$. Any help would be highly appreciated. Also, I'm new to mathematica, I'm wondering if there is anyway to simplify the whole procedure (is there any more elegant way to write the codes). I also attached the file.

Thanks in advanced.

Attachments:
POSTED BY: afshar_saman
Posted 10 years ago

.

In[1]:= \[Delta]1 = 1/5; \[Delta]2 = 1/5; Subscript[y, 0] = 10000;
   eq = {y3'[t] == d - \[Delta]2*y3[t], y2'[t] == \[Delta]2*y3[t] - (\[Delta]1 + \[Rho]2) y2[t]};
   Simplify[DSolve[{eq, y3[0] == y2[0] == Subscript[y, 0]}, {y3[t], y2[t]}, t]]

Out[2]= {{y2[t] -> (E^(-t/5) (2000 E^(-t \[Rho]2) (1 + 5 \[Rho]2) (-1 + E^(t \[Rho]2) + 5 \[Rho]2) +
   d (-1 +E^(-t \[Rho]2) - 5 \[Rho]2 + 5 E^(t/5) \[Rho]2)))/(\[Rho]2 (1 + 5 \[Rho]2)),
   y3[t] -> 5 E^(-t/5) (2000 + d (-1 + E^(t/5)))}}
POSTED BY: Bill Simpson
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