Variation of parameters ODE what am i doing wrong?

bmxicle
Messages
51
Reaction score
0

Homework Statement


\mathbb{x'}= \begin{bmatrix} 1 & 1 \\ 4 & 1 \end{bmatrix} \mathbf{x} \ + \ \begin{bmatrix} 2e^{t} \\ -e^{t} \end{bmatrix}

Find the general solution.



Homework Equations





The Attempt at a Solution


Well i found the eigenvalues of the matrix That i'll call A, to get the solution to the homogenous equation:

\mathbf{x_h} = c_1\begin{bmatrix} 1 \\ 2 \end{bmatrix} e^{3t} + c_2 \begin{bmatrix} -1 \\ 2 \end{bmatrix} e^{-t}

Let F be the fundamental matrix such that
F = \begin{bmatrix} e^{3t} & -e^{-t} \\ 2e^{3t} & 2e^{-t}\end{bmatrix}
\mathbf{x'} = A\mathbf{x} + \mathbf{g}

If we assume a solution \mathbf{x_{p}} = F\mathbf{u}
Then after a few calculations we get
\mathbf{u'} = F^{-1}\mathbf{g}
\mathbf{u&#039;} = \frac{1}{4e^{4t}} \begin{bmatrix} 2e^{-t} &amp; e^{-t} \\ -2e^{3t} &amp; e^{3t} \end{bmatrix}* \begin{bmatrix} 2e^t \\ -e^t \end{bmatrix} <br /> \mathbf{u&#039;} = \begin{bmatrix} 16e^{-4t} -4e^{-4t} \\-16 - 4 \end{bmatrix} = \begin{bmatrix} 12e^{-4t} \\ -20 \end{bmatrix}
u_{1} = \int 12e^{-4t} dt = -3e^-4t + c
u_{2} = \int -20 dt = -20t + c
\mathbf{x_{p}} = F\mathbf{u} = \begin{bmatrix} e^{3t} &amp; -e^{-t} \\ 2e^{3t} &amp; 2e^{-t}\end{bmatrix} * \begin{bmatrix} -3e^{-4t} \\ -20t \end{bmatrix}

\mathbf{x_{p}} =\begin{bmatrix} -3e^{-t} + 20e^{-t} \\ - 6 e^{-t} -40te^{-t} \end{bmatrix}

So then to get the final answer you just add the particular solution X_p to the homogeneous solution.

I've been working on a bunch of these different non-homogeneous equations, and i keep getting the wrong answer basically every time, so If someone sees where i might be going wrong it would be much appreciated.
 
Physics news on Phys.org
You basic error is that your F^{-1} is wrong.
\begin{bmatrix}e^{3t} &amp; - e^{-t} \\ 2e^{3t} &amp; 2 e^{-t}\end{bmatrix}\begin{bmatrix}2e^{-t} &amp; e^{-t} \\ -2e^{3t} &amp; e^{3t}\end{bmatrix}= \begin{bmatrix}4e^{2t} &amp; 0 \\ 0 &amp; 4e^{2t}\end{bmatrix}
so your
\frac{1}{4e^{4t}}
should be
\frac{1}{4e^{2t}}

However, here is a whole general method I prefer to what you are doing. You have already determined that the eigenvalues for the A matrix are 3 and -1 and that corresponding eigenvectors are \begin{bmatrix}1 \\ 2 \end{bmatrix} and \begin{bmatrix}-1 \\ 2\end{bmatrix} respectively. That means that A can be diagonalized- specifically that if
P= \begin{bmatrix}1 &amp; -1 \\ 2 &amp; 2\end{bmatrix}
so that
P^{-1}= \begin{bmatrix}\frac{1}{2} &amp; \frac{1}{4} \\ -\frac{1}{2} &amp; \frac{1}{4}\end{bmatrix}

then P^{-1}AP is diagonal:
\begin{bmatrix}\frac{1}{2} &amp; \frac{1}{4} \\ -\frac{1}{2} &amp; \frac{1}{4}\end{bmatrix}\begin{bmatrix}1 &amp; 1 \\ 4 &amp; 1\end{bmatrix}\begin{bmatrix}1 &amp; -1 \\ 2 &amp; 2\end{bmatrix}= \begin{bmatrix}3 &amp; 0 \\ 0 &amp; -1\end{bmatrix}

Now, writing the original equation
\frac{dX}{dt}= AX+ q
and multiplying on both sides by P^{-1},
\frac{P^{-1}X}{dt}= P^{-1}AX+ P^{-1}q= P^{-1}(APP^{-1}X)+ P^{-1}q
\frac{P^{-1}X}{dt}= D(P^{-1}X)+ P^{-1}q
where D is the diagonal matrix.

If we let Y= P^{-1}x, then the equation is
\frac{dY}{dt}= DY+ P^{-1}q
which, because D is diagonal is "completely uncoupled". That is, the two equations are completely separate and can be solved separately.

Here,
P^{-1}q= \begin{bmatrix}\frac{1}{2} &amp; \frac{1}{4} \\ -\frac{1}{2} &amp; \frac{1}{4}\end{bmatrix}\begin{bmatrix}2e^t \\ -e^t\end{bmatrix}= \begin{bmatrix}\frac{3}{4}e^t \\ -\frac{5}{4}e^t \end{bmatrix}

That is, writing
Y(t)= \begin{bmatrix}y_1(t) \\ y_2(t)\end{bmatrix}
the equation becomes
\frac{d\begin{bmatrix}y_1(t) \\ y_2(t)\end{bmatrix}}{dx}= \begin{bmatrix}3 &amp; 0 \\ 0 &amp; -1\end{bmatrix}\begin{bmatrix}y_1(t) \\ y_2(t)\end{bmatrix}+ \begin{bmatrix}\frac{3}{4}e^t \\ -\frac{5}{4}e^t\end{bmatrix}
which is simply the two "uncoupled" equations
\frac{dy_1(t)}{dt}= 3y_1(t)+ \frac{3}{4}e^t
and
\frac{dy_2(t)}{dt}= -y_1(t)- \frac{5}{4}e^t

You can solve for y_1(t) and y_2(t) separately and then
X(t)= PY(t)= \begin{bmatrix}1 &amp; -1 \\ 2 &amp; 2\end{bmatrix}\begin{bmatrix}y_1(t) \\ y_2(t) \end{bmatrix}.

That only requires finding the inverse of P, a constant matrix.
 
ahh yep that would be wrong. I did the after correcting that mistake and got the correct answer. I guess i just keep making computational mistakes somewhere along the way.

Thanks for the derivation of Diagonalization, that was much clearer than the one in my textbook, and it definitely seems easier when the matrix is diagonalizable. When you're solving for Y1 and Y2 is it fine to just set the integration constants to zero because you just need to find a particular solution of the non-homogenous portion of the equation?
 
There are two things I don't understand about this problem. First, when finding the nth root of a number, there should in theory be n solutions. However, the formula produces n+1 roots. Here is how. The first root is simply ##\left(r\right)^{\left(\frac{1}{n}\right)}##. Then you multiply this first root by n additional expressions given by the formula, as you go through k=0,1,...n-1. So you end up with n+1 roots, which cannot be correct. Let me illustrate what I mean. For this...
Back
Top