When the right-hand side (forcing function) of the differential equation is not a “nice” simple polynomial, exponential, or trig function — what do we do?
We turn to the Variation of Parameters method.
This technique is more advanced than the Method of Undetermined Coefficients and is capable of finding a particular solution for nonhomogeneous linear differential equations with more complex forcing functions.
Steps of the Variation of Parameters Method
The method of variation of parameters, created by Joseph Lagrange, allows us to determine a particular solution for a nonhomogeneous linear ODE that, in theory, has no restrictions (i.e., finite or infinite number of linearly independent derivatives).
The technique is as follows:
Step 1. Solve the differential equation for the complementary (homogeneous) function
Step 2. Calculate the Wronskian determinant \(W\left(y_{1}, y_{2}\right)=\left|\begin{array}{ll}y_{1} & y_{2} \\ y_{1}^{\prime} & y_{2}^{\prime}\end{array}\right|\)
Step 3. Place the differential equation in standard form such that \(y^{\prime \prime}+P y^{\prime}+Q y=f(x)\) and now make a substitution
\begin{align*}
u_{1}^{\prime}=\frac{W_{1}}{W} \quad u_{2}^{\prime}=\frac{W_{2}}{W} \quad \text { if } W_{1}=\left|\begin{array}{cc}
0 & y_{2} \\
f(x) & y_{2}^{\prime}
\end{array}\right| \text { and } W_{2}=\left|\begin{array}{cc}
y_{1} & 0 \\
y_{1}^{\prime} & f(x)
\end{array}\right|
\end{align*}
Step 4. Integrate \(u_{1}^{\prime}, u_{2}^{\prime}\) and write the general solution such that \(y=y_{h}+y_{p}\), where
\begin{align*}
y_{p}=u_{1} y_{1}+u_{2} y_{2}
\end{align*}
Example: Solving a Differential Equation using Variation of Parameters
Let’s look at an example to see how these steps are used.
Solve \(y^{\prime \prime}+4 y^{\prime}+4 y=3 x e^{-2 x}\)
Finding the Complementary Function
First, we will transform our DE into its characteristic equation and find the complementary function (i.e., the homogeneous solution)
\begin{align*}
\begin{aligned}
& y^{\prime \prime}+4 y^{\prime}+4 y=0 \\
& r^{2}+4 r+4=30 \\
& (r+2)(r+2)=0 \\
& r=-2(\text { twice }) \\
& y_{h}=c_{1} e^{-2 x}+c_{2} x e^{-2 x}
\end{aligned}
\end{align*}
Identifying Independent Solutions and Calculating the Wronskian
Now, we identify the two independent solutions of the related homogeneous equation.
\begin{align*}
y_{h}=c_{1} e^{-2 x}+c_{1} x e^{-2 x} \Rightarrow y_{1}=e^{-2 x}, \quad y_{2}=x e^{-2 x}
\end{align*}
So, now it’s time to calculate the Wronskian using \(y_{1}\) and \(y_{2}\)
\begin{align*}
W\left(y_{1}, y_{2}\right)=\left|\begin{array}{cc}
e^{-2 x} & x e^{-2 x} \\
-2 e^{-2 x} & (1-2 x) e^{-2 x}
\end{array}\right|=e^{-4 x}
\end{align*}
Finding the Substitution Functions
Next, we will find \(W_{1}\) and \(W_{2}\)
\begin{align*}
\begin{aligned}
& W_{1}=\left|\begin{array}{cc}
0 & y_{2} \\
f(x) & y_{2}^{\prime}
\end{array}\right| \Rightarrow W_{1}=\left|\begin{array}{cc}
0 & x e^{-2 x} \\
3 x e^{-2 x} & (1-2 x) e^{-2 x}
\end{array}\right|=-3 x^{2} e^{-4 x} \\
& W_{2}=\left|\begin{array}{cc}
y_{1} & 0 \\
y_{1}^{\prime} & f(x)
\end{array}\right| \Rightarrow W_{1}=\left|\begin{array}{cc}
e^{-2 x} & 0 \\
-2 e^{-2 x} & 3 x e^{-2 x}
\end{array}\right|=3 x e^{-4 x}
\end{aligned}
\end{align*}
Now it’s time to find our \(u_{1}^{\prime}, u_{2}^{\prime}\)
\begin{align*}
\begin{aligned}
& u_{1}^{\prime}=\frac{W_{1}}{W} \Rightarrow u_{1}^{\prime}=\frac{-3 x^{2} e^{-4 x}}{e^{-4 x}}=-3 x^{2} \\
& u_{2}^{\prime}=\frac{W_{2}}{W} \Rightarrow u_{2}^{\prime}=\frac{3 x e^{-4 x}}{e^{-4 x}}=3 x
\end{aligned}
\end{align*}
Integrating Substitution Functions
Alright, so now we will integrate both \(u_{1}^{\prime}\) and \(u_{2}^{\prime}\) and
\begin{align*}
\begin{aligned}
& \int u_{1}^{\prime}=\int\left(-3 x^{2}\right) d x \Rightarrow u_{1}=-x^{3} \\
& \int u_{2}^{\prime}=\int(3 x) d x \Rightarrow u_{2}=\frac{3}{2} x^{2}
\end{aligned}
\end{align*}
Constructing the Particular Solution
Next, we will find our particular solution knowing that \(y_{p}=u_{1} y_{1}+u_{2} y_{2}\)
\begin{align*}
\begin{aligned}
& y_{p}=u_{1} y_{1}+u_{2} y_{2} \\
& y_{p}=\left(-x^{3}\right)\left(e^{-2 x}\right)+\left(\frac{3}{2} x^{2}\right)\left(x e^{-2 x}\right) \\
& y_{p}=-x^{3} e^{-2 x}+\frac{3}{2} x^{3} e^{-2 x} \\
& y_{p}=\frac{1}{2} x^{3} e^{-2 x}
\end{aligned}
\end{align*}
Writing the General Solution
Finally, we can write our general solution.
\begin{align*}
\begin{aligned}
& y=y_{h}+y_{p} \\
& y=\left(c_{1} e^{-2 x}+c_{2} x e^{-2 x}\right)+\left(\frac{1}{2} x^{3} e^{-2 x}\right) \\
& y=c_{1} e^{-2 x}+c_{2} x e^{-2 x}+\frac{1}{2} x^{3} e^{-2 x}
\end{aligned}
\end{align*}
Comparison with Undetermined Coefficients
What’s cool is that this is the same answer we would get if we had used undetermined coefficients.
Sweet!
Advantages of Variation of Parameters
It’s important to note that, according to Paul’s Online Notes, the method of Variation of Parameters has a distinct advantage over the method of Undetermined Coefficients. This is because it will always yield a particular solution, as long as the associated homogeneous equation can be solved.
Up Next
You’ll…
- Improve understanding: Grasp the concepts behind the Variation of Parameters method more effectively.
- Practice with examples: Watch step-by-step solutions using Variation of Parameters.
- Avoid common mistakes: Learn potential pitfalls and how to prevent them.
- Boost problem-solving skills: Develop your abilities to tackle nonhomogeneous linear DEs.
- Reinforce key concepts: Strengthen your knowledge of the Wronskian and general solutions.
It’s going to be fun, so let’s jump right in!
Video Tutorial w/ Full Lesson & Detailed Examples
Get access to all the courses and over 450 HD videos with your subscription
Monthly and Yearly Plans Available
Still wondering if CalcWorkshop is right for you?
Take a Tour and find out how a membership can take the struggle out of learning math.