2
$\begingroup$

Using the following code in Mathematica:

{X, Y} = {x, y} /. 
    DSolve[{x'[t] == -1/10 x[t] + 3/40 y[t], 
      y'[t] == 1/10 x[t] - 1/5 y[t]}, {x, y}, t] // FullSimplify // 
  First; {X[t], Y[t]} // Expand

I get the following solution:

{1/4 E^(-t/4) C[1] + 3/4 E^(-t/20) C[1] - 3/8 E^(-t/4) C[2] + 
  3/8 E^(-t/20) C[2], -(1/2) E^(-t/4) C[1] + 1/2 E^(-t/20) C[1] + 
  3/4 E^(-t/4) C[2] + 1/4 E^(-t/20) C[2]}

But if I do it by hand, I get: $ \begin{bmatrix}x\\y\end{bmatrix}=c_1 e^{-\dfrac{t}{4}} \begin{bmatrix}-1\\2\end{bmatrix}+c_2 e^{-\dfrac{t}{20}} \begin{bmatrix}3\\2\end{bmatrix} $

So, $ x(t)=-c_1e^{-\dfrac{t}{4}}+3c_2e^{-\dfrac{t}{20}} \text{ and } y(t)=2c_1e^{-\dfrac{t}{4}}+2c_2e^{-\dfrac{t}{20}} $

Why is there a discrepancy? How do I simplify Mathematica answer to mine?

$\endgroup$
2
$\begingroup$
sol = DSolve[
  {x'[t] == -1/10 x[t] + 3/40 y[t],
   y'[t] == 1/10 x[t] - 1/5 y[t]
   }, {x[t], y[t]}, t]

\begin{align*} x(t) =& \frac{1}{4} c_1 e^{-t/4} \left(3 e^{t/5}+1\right)+\frac{3}{8} c_2 e^{-t/4} \left(e^{t/5}-1\right)\\ y(t) =& \frac{1}{2} c_1 e^{-t/4} \left(e^{t/5}-1\right)+\frac{1}{4} c_2 e^{-t/4} \left(e^{t/5}+3\right) \end{align*}

is the same as your solution.

Proof:

\begin{align*} x\left( t\right) & =\frac{1}{4}e^{-\frac{t}{4}}\left( 1+3e^{\frac{t}{5} }\right) c_{1}+\frac{3}{8}e^{-\frac{t}{4}}\left( -1+e^{\frac{t}{5}}\right) c_{2}\\ y\left( t\right) & =\frac{1}{2}e^{-\frac{t}{4}}\left( -1+e^{\frac{t}{5} }\right) c_{1}+\frac{1}{4}e^{-\frac{t}{4}}\left( 3+e^{\frac{t}{5}}\right) c_{2} \end{align*} Hence \begin{align*} x\left( t\right) & =\frac{1}{4}\left( e^{-\frac{t}{4}}+3e^{\frac{-t}{20} }\right) c_{1}+\frac{3}{8}\left( -e^{-\frac{t}{4}}+e^{\frac{-t}{20}}\right) c_{2}\\ y\left( t\right) & =\frac{1}{2}\left( -e^{-\frac{t}{4}}+e^{\frac{-t}{20} }\right) c_{1}+\frac{1}{4}\left( 3e^{-\frac{t}{4}}+e^{\frac{-t}{20}}\right) c_{2} \end{align*} Or \begin{align*} x\left( t\right) & =e^{-\frac{t}{4}}\left( \frac{1}{4}c_{1}-\frac{3} {8}c_{2}\right) +e^{\frac{-t}{20}}\left( \frac{3}{4}c_{1}+\frac{3}{8} c_{2}\right) \\ y\left( t\right) & =e^{-\frac{t}{4}}\left( -\frac{1}{2}c_{1}+\frac{3} {4}c_{2}\right) +e^{\frac{-t}{20}}\left( \frac{1}{2}c_{1}+\frac{1}{4} c_{2}\right) \end{align*} Let $\frac{1}{4}c_{1}-\frac{3}{8}c_{2}=-A$ and let $\frac{3}{4}c_{1}+\frac {3}{8}c_{2}=3B$ where $A,B$ are new constants. Hence $-\frac{1}{2}c_{1} +\frac{3}{4}c_{2}=2A$ and $\frac{1}{4}c_{1}+\frac{1}{8}c_{2}=B$ or $\frac {1}{2}c_{1}+\frac{1}{4}c_{2}=2B$ Hence the above becomes \begin{align*} x\left( t\right) & =-Ae^{-\frac{t}{4}}+3Be^{\frac{-t}{20}}\\ y\left( t\right) & =2Ae^{-\frac{t}{4}}+2Be^{\frac{-t}{20}} \end{align*} But $A,B$ are constants. We can call them anything we want. Let $A=c_{1}$ and $B=c_{2}$. The above becomes \begin{align*} x\left( t\right) & =-c_{1}e^{-\frac{t}{4}}+3c_{2}e^{\frac{-t}{20}}\\ y\left( t\right) & =2c_{1}e^{-\frac{t}{4}}+2c_{2}e^{\frac{-t}{20}} \end{align*}

Which is your solution

| improve this answer | |
$\endgroup$
  • $\begingroup$ Thanks! Nasser. Appreciate the explanation. $\endgroup$ – Ashish Apr 30 at 17:55
1
$\begingroup$

How to find the transformation from Mathematica's solution to the OP's soluytion:

mmaSol =  (* DSolve[]'s solution *)
   {1/4 E^(-t/4) C[1] + 3/4 E^(-t/20) C[1] - 
    3/8 E^(-t/4) C[2] + 3/8 E^(-t/20) C[2], -(1/2) E^(-t/4) C[1] + 
    1/2 E^(-t/20) C[1] + 3/4 E^(-t/4) C[2] + 1/4 E^(-t/20) C[2]};
opSol =  (* OP's solution *)
  {-C[3] E^(-t/4) + 3 C[4] E^(-t/20), 
   2 C[3] E^(-t/4) + 2 C[4] E^(-t/20)};

mma2op = First@Solve[mmaSol == opSol, {C[1], C[2]}]
(*  {C[1] -> -C[3] + 3 C[4], C[2] -> 2 (C[3] + C[4])}  *)

The transformation is applied with /. (ReplaceAll):

mmaSol /. mma2op

Check:

(mmaSol /. mma2op) == opSol // Simplify
(*  True  *)
| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.