Variation of parameters ODE what am i doing wrong?

• bmxicle
In summary, the given equation can be simplified by diagonalizing the matrix and solving two separate, uncoupled equations. This method can be used to find the general solution by finding the inverse of the diagonalizing matrix. It is important to be careful with calculations to avoid errors.
bmxicle

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.

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'} = \frac{1}{4e^{4t}} \begin{bmatrix} 2e^{-t} & e^{-t} \\ -2e^{3t} & e^{3t} \end{bmatrix}* \begin{bmatrix} 2e^t \\ -e^t \end{bmatrix}$$ $$\mathbf{u'} = \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} & -e^{-t} \\ 2e^{3t} & 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.

You basic error is that your $F^{-1}$ is wrong.
$$\begin{bmatrix}e^{3t} & - e^{-t} \\ 2e^{3t} & 2 e^{-t}\end{bmatrix}\begin{bmatrix}2e^{-t} & e^{-t} \\ -2e^{3t} & e^{3t}\end{bmatrix}= \begin{bmatrix}4e^{2t} & 0 \\ 0 & 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 & -1 \\ 2 & 2\end{bmatrix}$$
so that
$$P^{-1}= \begin{bmatrix}\frac{1}{2} & \frac{1}{4} \\ -\frac{1}{2} & \frac{1}{4}\end{bmatrix}$$

then $P^{-1}AP$ is diagonal:
$$\begin{bmatrix}\frac{1}{2} & \frac{1}{4} \\ -\frac{1}{2} & \frac{1}{4}\end{bmatrix}\begin{bmatrix}1 & 1 \\ 4 & 1\end{bmatrix}\begin{bmatrix}1 & -1 \\ 2 & 2\end{bmatrix}= \begin{bmatrix}3 & 0 \\ 0 & -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} & \frac{1}{4} \\ -\frac{1}{2} & \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 & 0 \\ 0 & -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 & -1 \\ 2 & 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?

1. What is the variation of parameters method for solving ODEs?

The variation of parameters method is a technique used to solve nonhomogeneous linear ordinary differential equations (ODEs). It involves finding a particular solution by using a set of functions known as the fundamental set of solutions, which are linearly independent solutions to the corresponding homogeneous ODE. These functions are then multiplied by unknown coefficients and substituted into the ODE, allowing for the determination of the particular solution.

2. What is the difference between variation of parameters and the method of undetermined coefficients?

The method of undetermined coefficients is a technique used to solve particular types of nonhomogeneous linear ODEs, while the variation of parameters method can be applied to a wider range of nonhomogeneous linear ODEs. The method of undetermined coefficients involves making an educated guess for the form of the particular solution, while the variation of parameters method uses a set of functions to construct the particular solution.

3. What are the steps for using the variation of parameters method?

The steps for using the variation of parameters method are as follows:
1. Find the general solution to the corresponding homogeneous ODE
2. Determine the fundamental set of solutions by solving the homogeneous ODE
3. Multiply the fundamental set of solutions by unknown coefficients
4. Substitute the solutions into the nonhomogeneous ODE and solve for the coefficients
5. Use the particular solution and the general solution to obtain the complete solution to the nonhomogeneous ODE.

4. What are some common mistakes made while using the variation of parameters method?

Some common mistakes made while using the variation of parameters method include:
- Not finding the general solution to the corresponding homogeneous ODE
- Using a linearly dependent set of fundamental solutions
- Making errors while multiplying the fundamental solutions by the unknown coefficients
- Forgetting to add the complementary solution to the particular solution to obtain the complete solution.

5. How can I check if my solution using the variation of parameters method is correct?

To check if your solution using the variation of parameters method is correct, you can substitute the particular solution back into the original nonhomogeneous ODE and see if it satisfies the equation. Additionally, you can also check if the general solution obtained by adding the particular solution to the complementary solution satisfies the initial conditions given in the problem.

Replies
3
Views
835
Replies
5
Views
1K
Replies
7
Views
1K
Replies
4
Views
2K
Replies
3
Views
1K
Replies
2
Views
2K
Replies
5
Views
1K
Replies
12
Views
2K
Replies
3
Views
2K
Replies
4
Views
1K