two detailed examples of variations of parameters

Solving two differential equations, y” – y = e^x and y” + 2y’ + y = cos(x), using Variation of Parameters. Step-by-step guide to find general solutions.

Solving the Differential Equation \(y” – y = e^x\) using Variation of Parameters

We are given the non-homogeneous second-order linear differential equation:

\[ y” – y = e^x \]

Our task is to find the general solution to this equation. Here’s how we’ll proceed:

Step 1: Solve the Homogeneous Equation

First, we need to find the general solution to the corresponding homogeneous equation:

\[ y” – y = 0 \]

The homogeneous equation provides the “complementary function” that forms the basis for the general solution. It’s called the complementary function because it complements the particular solution (which we’ll find later) to form the complete general solution.

To solve the homogeneous equation, we first form the characteristic equation associated with the differential equation:

\[ m^2 – 1 = 0 \]

This is a quadratic equation in \(m\), the roots of which will give us the solutions to the homogeneous equation. Solving this equation, we find that the roots are \( m = 1 \) and \( m = -1 \).

These roots tell us that the general solution to the homogeneous equation is a linear combination of \( e^x \) and \( e^{-x} \), so we can write:

\[ y_c = c_1 e^x + c_2 e^{-x} \]

Step 2: Choose a Particular Solution Form

Next, we choose a form for the particular solution to the non-homogeneous equation. We’ll use the same form as the complementary function, but with unknown functions \( u_1(x) \) and \( u_2(x) \) instead of constants:

\[ y_p = u_1(x) e^x + u_2(x) e^{-x} \]

The choice of this form ensures that the particular solution will satisfy the differential equation once we find appropriate functions \( u_1(x) \) and \( u_2(x) \). The method of variation of parameters is designed to work with this choice.

Step 3: Find \(u_1(x)\) and \(u_2(x)\)

We’ll use the variation of parameters formulas to find the functions \( u_1(x) \) and \( u_2(x) \):

\[ u_1′(x) = -\frac{y_2(x) f(x)}{W(x)} \]

\[ u_2′(x) = \frac{y_1(x) f(x)}{W(x)} \]

Here, \(y_1(x) = e^x\) and \(y_2(x) = e^{-x}\) are the solutions to the homogeneous equation, \(f(x) = e^x\) is the right-hand side of the original non-homogeneous equation, and \(W(x) = y_1(x) y_2′(x) – y_1′(x) y_2(x)\) is the Wronskian of \(y_1(x)\) and \(y_2(x)\). In this case, \(W(x) = 2\).

Substituting these values into the variation of parameters formulas, we get:

\[ u_1′(x) = -e^{-x} e^x / 2 = -1/2 \]

\[ u_2′(x) = e^x e^x / 2 = e^{2x}/2 \]

Step 4: Integrate to find \(u_1(x)\) and \(u_2(x)\)

We now need to integrate \(u_1′(x)\) and \(u_2′(x)\) to find \(u_1(x)\) and \(u_2(x)\).

Integrating these gives \(u_1(x) = -x/2\) and \(u_2(x) = e^{2x}/4\).

Step 5: Form the Particular Solution

Substituting \(u_1(x)\) and \(u_2(x)\) into the form for \(y_p\) gives:

\[ y_p = u_1(x) e^x + u_2(x) e^{-x} = -x/2 e^x + e^{2x}/4 e^{-x} = -x/2 e^x + e^x/4 \]

Step 6: Form the General Solution

The general solution is the sum of the complementary function and the particular solution:

\[ y = y_c + y_p = c_1 e^x + c_2 e^{-x} – x/2 e^x + e^x/4 \]

And that’s the solution to the differential equation.


 

——–

——–


 

Solving the Differential Equation \(y” + 2y’ + y = \cos(x)\) using Variation of Parameters

We are given the non-homogeneous second-order linear differential equation:

\[ y” + 2y’ + y = \cos(x) \]

Our task is to find the general solution to this equation. Here’s how we’ll proceed:

Step 1: Solve the Homogeneous Equation

First, we need to find the general solution to the corresponding homogeneous equation:

\[ y” + 2y’ + y = 0 \]

The homogeneous equation provides the “complementary function” that forms the basis for the general solution. It’s called the complementary function because it complements the particular solution (which we’ll find later) to form the complete general solution.

To solve the homogeneous equation, we first form the characteristic equation associated with the differential equation:

\[ m^2 + 2m + 1 = 0 \]

This is a quadratic equation in \(m\), the roots of which will give us the solutions to the homogeneous equation. Solving this equation, we find that the roots are \( m = -1 \), which is a repeated root. Therefore, the general solution to the homogeneous equation is:

\[ y_c = c_1 e^{-x} + c_2 xe^{-x} \]

Step 2: Choose a Particular Solution Form

Next, we choose a form for the particular solution to the non-homogeneous equation. Since the right-hand side of the equation is \( \cos(x) \), we’ll choose a form that includes sine and cosine functions:

\[ y_p = u_1(x) \cos(x) + u_2(x) \sin(x) \]

The choice of this form ensures that the particular solution will satisfy the differential equation once we find appropriate functions \( u_1(x) \) and \( u_2(x) \). The method of variation of parameters is designed to work with this choice.

Step 3: Find \(u_1(x)\) and \(u_2(x)\)

We’ll use the variation of parameters formulas to find the functions \( u_1(x) \) and \( u_2(x) \):

\[ u_1′(x) = -\frac{y_2(x) f(x)}{W(x)} \]

\[ u_2′(x) = \frac{y_1(x) f(x)}{W(x)} \]

Here, \(y_1(x) = \cos(x)\) and \(y_2(x) = \sin(x)\) are the solutions to the homogeneous equation, \(f(x) = \cos(x)\) is the right-hand side of the original non-homogeneous equation, and \(W(x) = y_1(x) y_2′(x) – y_1′(x) y_2(x)\) is the Wronskian of \(y_1(x)\) and \(y_2(x)\). In this case, \(W(x) = 1\).

Substituting these values into the variation of parameters formulas, we get:

\[ u_1′(x) = -\sin(x) \cos(x) = -\frac{1}{2}\sin(2x) \]

\[ u_2′(x) = \cos(x) \cos(x) = \cos^2(x) \]

Step 4: Integrate to find \(u_1(x)\) and \(u_2(x)\)

We now need to integrate \(u_1′(x)\) and \(u_2′(x)\) to find \(u_1(x)\) and \(u_2(x)\).

Integrating these gives \(u_1(x) = \frac{1}{4}\cos(2x)\) and \(u_2(x) = \frac{x}{2} + \frac{1}{4}\sin(2x)\).

Step 5: Form the Particular Solution

Substituting \(u_1(x)\) and \(u_2(x)\) into the form for \(y_p\) gives:

\[ y_p = u_1(x) \cos(x) + u_2(x) \sin(x) = \frac{1}{4}\cos(2x)\cos(x) + \left(\frac{x}{2} + \frac{1}{4}\sin(2x)\right)\sin(x) \]

Step 6: Form the General Solution

The general solution is the sum of the complementary function and the particular solution:

\[ y = y_c + y_p = c_1 e^{-x} + c_2 xe^{-x} + \frac{1}{4}\cos(2x)\cos(x) + \left(\frac{x}{2} + \frac{1}{4}\sin(2x)\right)\sin(x) \]

And that’s the solution to the differential equation.