Second Order Differential Equations

3.5 Method of Variation of Parameters

A. Introduction

The method of variation of parameters is another technique used to find particular solutions to nonhomogeneous linear differential equations. It is especially useful for equations with both constant and variable coefficients and is applicable when the forcing function, [asciimath]f(x)[/asciimath], makes the method of undetermined coefficients impractical. This technique also extends well to higher-order equations.

Unlike the method of undetermined coefficients where the complementary solution aids in guessing the form of the particular solution, variation of parameters requires the complementary solution to determine the particular solution.

B. Variation of Parameters: Constant-coefficient Equations

We first focus on applying the method of variation of parameters to nonhomogeneous constant-coefficient equations. Consider the nonhomogeneous linear second-order equation

 [asciimath]a y'' + by' + cy = f(x)[/asciimath] (3.5.1)

Let [asciimath]{y_1,y_2}[/asciimath]  be a fundamental set of solutions to the associated complementary (homogenous) equation. The general solution to the complementary equation is [asciimath]y=c_1y_1+c_2y_2[/asciimath]. To find a particular solution, [asciimath]y_p[/asciimath], using the variation of parameters method, we replace the constants [asciimath]c_1[/asciimath] and [asciimath]c_2[/asciimath] with functions [asciimath]u_1(x)[/asciimath] and [asciimath]u_2(x)[/asciimath], respectively, resulting in

 [asciimath]y_p = u_1 y_1 + u_2 y_2[/asciimath]

We aim to substitute  [asciimath]y_p[/asciimath] and its derivatives into Equation 3.5.1 to determine functions [asciimath]u_1[/asciimath] and [asciimath]u_2[/asciimath]. The first derivative of [asciimath]y_p[/asciimath] is

 [asciimath]y_p' = u_1 y_1' + u_1' y_1 + u_2 y_2'+ u_2'y_2[/asciimath]

Since we have more parameters than we have equations, we impose that [asciimath]u_1' y_1 + u_2' y_2 = 0[/asciimath] (i) to simplify calculations. Therefore, [asciimath]y'_p[/asciimath] is simplified to the following.

 [asciimath]y'_p= u_1 y_1' + u_2 y_2'[/asciimath]

We then find [asciimath]y_p''[/asciimath].

 [asciimath]y_p'' = u_1' y_1' +u_1y_1''+u_2' y_2'+u_2y_2''[/asciimath]

After substituting [asciimath]y_p[/asciimath] and its derivatives into Equation 3.5.1 and collecting the terms, we obtain

 [asciimath]u_1 underbrace((ay_1''+by_1'+cy_1))_(=0) + u_2 underbrace((ay_2''+by_2'+cy_2 ))_(=0) +[/asciimath] [asciimath]a(u_1'y_1'+ u'_2y_2') = f(x)[/asciimath]

The expressions multiplied by [asciimath]u_1[/asciimath] and [asciimath]u_2[/asciimath] are zero, since [asciimath]y_1[/asciimath] and [asciimath]y_2[/asciimath] are solutions to the complementary equation, leading to

 [asciimath]u_1'y_1'+ u_2'y_2' = (f(x))/a[/asciimath]    (ii).

Combining (i) and (ii) yields a system of equations

 [asciimath]{(u_1' y_1 + u_2'y_2 = 0 ),(u_1'y_1'+ u_2'y_2' = (f(x))/a ):}[/asciimath]

Solving the system for [asciimath]u_1'[/asciimath]and [asciimath]u_2'[/asciimath] and then integrating yields the solutions for [asciimath]u_1[/asciimath] and [asciimath]u_2[/asciimath].

 [asciimath]u_1' = (-f(x) y_2)/(a(y_1 y_2'- y_1' y_2))[/asciimath]  and  [asciimath]u_2'= (f(x) y_1)/(a(y_1 y_2' - y_1' y_2))[/asciimath]

Notice that the term in the parenthesis in the denominator is the Wronskian ([asciimath]W[/asciimath]). Therefore, [asciimath]u_1'[/asciimath] and [asciimath]u_2'[/asciimath] can also be written as

 [asciimath]u_1'= (-f(x) y_2)/(a W(y_1,y_2))[/asciimath]  and  [asciimath]u_2' = (f(x) y_1)/(a W(y_1,y_2))[/asciimath]

 

Method of Variation of Parameters for Constant-coefficient Equations

To find a particular solution to Equation 3.5.1,

1. Find a Solution to the Homogeneous Equation: Determine a fundamental set of solutions [asciimath]{y_1,y_2}[/asciimath] to the corresponding homogeneous equation. Additionally, find the Wronskian of the solutions.

2. Determine [asciimath]u_1[/asciimath] and [asciimath]u_2[/asciimath]: Calculate [asciimath]u_1'[/asciimath] and [asciimath]u_2'[/asciimath] using the system derived from variation of parameters. Then integrate them to find [asciimath]u_1[/asciimath] and [asciimath]u_2[/asciimath], setting the constant of integration to zero:

 [asciimath]u_1=int (-f(x) y_2)/(a W(y_1,y_2)) dx[/asciimath]    and    [asciimath]u_2=int (f(x) y_1)/(a W(y_1,y_2)) dx[/asciimath]

3. Construct the Particular Solution: Combine [asciimath]u_1[/asciimath], [asciimath]u_2[/asciimath][asciimath]y_1[/asciimath], and [asciimath]y_2[/asciimath] to form the particular solution:

 [asciimath]y_p = u_1 y_1 + u_2 y_2[/asciimath]

 

Example 3.5.1: Find a Particular Solution for a Constant-Cofficient Equation

Find a particular solution to

 [asciimath]y''+6y'+9y=e^(-3x)arctan(x)[/asciimath]

Show/Hide Solution

 

To find a particular solution using the method of variation of parameters, we should first find a solution to the associated homogeneous equation:

1. The characteristic polynomial of the complementary equation [asciimath]y''+6y'+9y=0[/asciimath] is

 [asciimath]r^2+6r+9=0[/asciimath]

 [asciimath](r+3)^2=0[/asciimath]

So the solution is a repeated root [asciimath]r=-3[/asciimath]. Then, [asciimath]y_1=e^(-3x)[/asciimath] and [asciimath]y_2=xe^(-3x)[/asciimath] form a fundamental set of solutions.

The Wronskian of the fundamental set is

 [asciimath]W(y_1,y_2) = |(y_1,y_2),(y_1',y_2')|[/asciimath]

 [asciimath]W (x)= |(e^(-3x),xe^(-3x) ),(-3e^(-3x),e^(-3x)(1-3x )) |[/asciimath]

 [asciimath]=e^(-6x)(1-3x)+3xe^(-6x)[/asciimath]

 [asciimath]=e^(-6x)[/asciimath]

2. Next substituting [asciimath]y_1=e^(-3x)[/asciimath][asciimath]y_2=xe^(-3x)[/asciimath][asciimath]f(x)=e^(-3x)arctan(x)[/asciimath], and [asciimath]W(y_1,y_2)=e^(-6x)[/asciimath] into formulas for [asciimath]u_1[/asciimath] and  [asciimath]u_2[/asciimath] to determine them.

Finding [asciimath]u_1[/asciimath]:

 [asciimath]u_1=int (-f(x) y_2)/(a W(y_1,y_2)) dx[/asciimath]

 [asciimath]=int (-e^(-3x)arctan(x) (xe^(-3x)))/(e^(-6x)) dx[/asciimath]

 [asciimath]=-int xarctan(x) dx[/asciimath]

This integral can be evaluated using the technique of integration by parts.

 [asciimath]=-1/2x^2arctan(x)+1/2int(x^2)/(1+x^2)dx[/asciimath]

 [asciimath]=-1/2x^2arctan(x) +1/2(x-arctan(x))+C[/asciimath]

Finding [asciimath]u_2[/asciimath]:

 [asciimath]u_2=int (f(x) y_1)/(a W(y_1,y_2)) dx[/asciimath]

 [asciimath]=int (e^(-3x)arctan(x) (e^(-3x)))/(e^(-6x)) dx[/asciimath]

 [asciimath]=int arctan(x) dx[/asciimath]

This integral can be evaluated using the technique of integration by parts.

 [asciimath]=xarctan(x)-intx/(1+x^2)dx[/asciimath]

 [asciimath]=xarctan(x) -1/2ln(1+x^2)+C[/asciimath]

Since we only need one particular solution, we set the constant of integrations to zero in [asciimath]u_1[/asciimath] and [asciimath]u_2[/asciimath] for simplicity.

3. We substitute [asciimath]u_1[/asciimath] and [asciimath]u_2[/asciimath] together with [asciimath]{y_1,y_2}[/asciimath] into the expression for [asciimath]y_p[/asciimath] to obtain a particular solution:

 [asciimath]y_p = u_1 y_1 + u_2 y_2[/asciimath]

 [asciimath]=(-1/2x^2arctan(x) +1/2(x-arctan(x)) )e^(-3x)+[/asciimath] [asciimath](xarctan(x) -1/2ln(1+x^2))xe^(-3x)[/asciimath]

 [asciimath]y_p=1/2e^(-3x)(x^2arctan(x)+x-arctan(x)-xln(1+x^2))[/asciimath]

 

Try an Example

 

 

Example 3.5.2: Find a General Solution for a Constant-Cofficient Equation

Find (a) a particular and then (b) a general solution to

[asciimath]y''+3y'+2y=1/(1+e^x)[/asciimath]

Show/Hide Solution

a) To find a general solution, we first need to find a particular solution. To find a particular solution using the variation of parameters method, we should first find a set of fundamental solutions to the associated homogenous equation:

1. The characteristic polynomial of the complementary equation [asciimath]y''+3y'+2y=0[/asciimath]  is

[asciimath]r^2+3r+2=0[/asciimath]

[asciimath](r+1)(r+2)=0[/asciimath]

So the solutions are [asciimath]r_1=-1[/asciimath] and [asciimath]r_2=-2[/asciimath] and thus [asciimath]y_1=e^(-x)[/asciimath] and [asciimath]y_2=e^(-2x)[/asciimath] form a fundamental set of solutions.

2. Next we find [asciimath]u_1[/asciimath] and  [asciimath]u_2[/asciimath] by substituting [asciimath]y_1=e^(-x)[/asciimath][asciimath]y_2=e^(-2x)[/asciimath][asciimath]f(x)=1/(e^x+1)[/asciimath] , and [asciimath]W(y_1,y_2)=-e^(-3x)[/asciimath] into

 [asciimath]u_1=int (-f(x) y_2)/(a W(y_1,y_2)) dx[/asciimath]

 [asciimath]=int (-1//(e^x+1) e^(-2x))/(-e^(-3x)) dx[/asciimath] [asciimath]=int e^x/(1+e^x) dx[/asciimath] [asciimath]=ln(1+e^x)+C[/asciimath]

and

 [asciimath]u_2=int (f(x) y_1)/(a W(y_1,y_2)) dx[/asciimath]

 [asciimath]=int (1//(e^x+1) e^(-x))/(-e^(-3x)) dx[/asciimath] [asciimath]=int e^(2x)/(1+e^x) dx[/asciimath] [asciimath]=ln(1+e^x)-e^x+C[/asciimath]

Since we only need one particular solution, we take both constants of integration as zero for simplicity.

3. We substitute [asciimath]u_1[/asciimath] and [asciimath]u_2[/asciimath] together with [asciimath]{y_1,y_2}[/asciimath] into the expression for [asciimath]y_p[/asciimath] to obtain a particular solution:

 [asciimath]y_p = u_1 y_1 + u_2 y_2[/asciimath]

 [asciimath]=ln(1+e^x)e^(-x)+(ln(1+e^x)-e^x )e^(-2x)[/asciimath]

 [asciimath]=(e^(-x)+e^(-2x))ln(1+e^x)-e^(-x)[/asciimath]

b) To find a general solution we add the general solution to the homogeneous equation and a particular solution:

[asciimath]y(x)=c_1y_1+c_2y_2+y_p[/asciimath]

 [asciimath]=c_1e^(-x)+c_2e^(-2x)+[/asciimath] [asciimath](e^(-x)+e^(-2x))ln(1+e^x)-e^(-x)[/asciimath]

  Notice that the terms [asciimath]c_1e^(-x)[/asciimath] and [asciimath]-e^(-x)[/asciimath] are like terms and can be combined to [asciimath](c_1-1)e^(-x)[/asciimath] . Letting [asciimath]c_1-1=c_3[/asciimath] yields

 [asciimath]y(x)=c_3e^(-x)+c_2e^(-2x)[/asciimath] [asciimath]+(e^(-x)+e^(-2x))ln(1+e^x)[/asciimath]

 

Try an Example

 

 

Try an Example

 

C. Variation of Parameters: Variable-Coefficient Equations

Having discussed solving homogeneous and nonhomogeneous second-order differential equations with constant coefficients, we now turn our attention to equations where the coefficients are functions of the independent variable. The method of variation of parameters is suitable for such equations.

Considerations for Variable-Coefficient Equations

For a differential equation of the form

 [asciimath]a_2(x)y''+a_1(x)y'+a_0(x)y=g(x)[/asciimath]

valid solutions are expected on an open interval where all four governing functions, [asciimath]a_2(x), \ a_1(x),\ a_0(x)[/asciimath], and [asciimath]g(x)[/asciimath] are continuous and [asciimath]a_2(x)[/asciimath] is nonzero. Standardizing the equation by dividing by [asciimath]a_2(x)[/asciimath] yields

 [asciimath]y''+p(x)y'+q(x)y=f(x)[/asciimath]

Existence and Uniqueness Theorem: If [asciimath]p(x)[/asciimath] , [asciimath]q(x)[/asciimath], and [asciimath]f(x)[/asciimath] are continuous on an interval [asciimath](a,b)[/asciimath] containing point [asciimath]x_0[/asciimath], for any initial values [asciimath]Y_0[/asciimath] and [asciimath]Y_1[/asciimath], there exists a unique solution [asciimath]y(x)[/asciimath] on the same interval to the initial value problem.

 [asciimath]y''+p(x)y'+q(x)y=f(x),[/asciimath] [asciimath]\ \ \ \ \ y(x_0)=Y_0, \ y'(x_o)=Y_1[/asciimath]

The methodological steps for variable-coefficient equations mirror those for constant coefficients except the equation should be in the standard form.

 

Method of Variation of Parameters for Variable-Coefficient Equations

1. Standardize the equation: Divide the equation by the coefficient of [asciimath]y''[/asciimath] to make the coefficient one. The equation should be in the following format:

 [asciimath]y''+p(x)y'+q(x)y=f(x)[/asciimath]

2. Linearly Independent Solutions: Find two linearly independent solutions, [asciimath]{y_1,y_2}[/asciimath], to the corresponding homogeneous equation. Additionally, find the Wronskian of the solutions.

3. Determine [asciimath]u_1[/asciimath] and [asciimath]u_2[/asciimath]: Calculate [asciimath]u'_1[/asciimath] and [asciimath]u'_2[/asciimath] using the system derived from variation of parameters. Then integrate them to find [asciimath]u_1[/asciimath] and [asciimath]u_2[/asciimath], setting the constant of integration to zero:

 [asciimath]u_1=int (-f(x) y_2)/(W(y_1,y_2)) dx[/asciimath]    and    [asciimath]u_2=int (f(x) y_1)/(W(y_1,y_2)) dx[/asciimath]

4. Construct the Particular Solution: Combine [asciimath]u_1[/asciimath], [asciimath]u_2[/asciimath][asciimath]y_1[/asciimath], and [asciimath]y_2[/asciimath] to form the particular solution:

 [asciimath]y_p = u_1 y_1 + u_2 y_2[/asciimath]

 

Example 3.5.3: Find a Particular Solution for a Variable-Cofficient Equation

Find a particular solution to the following differential equation given [asciimath]y_1(x) = x^2[/asciimath]  and [asciimath]y_2(x) = x^-1[/asciimath] satisfy the corresponding homogeneous equation.

 [asciimath]x^2 y'' - 2 y = x+3 x^3, \ \(xgt0)[/asciimath]

Show/Hide Solution

 

1. First, divide the equation by the coefficient of [asciimath]y''[/asciimath], to put it in the standard form.

 [asciimath]y'' - 2x^-2 y = x^-1(1+3 x^2), \ \(xgt0)[/asciimath] 

2. To find a particular solution using the method of variation of parameters, we need a fundamental set of solutions to the associated homogeneous equation. the provided solutions [asciimath]y_1[/asciimath] and [asciimath]y_2[/asciimath] will form the fundamental set if their Wronskian is nonzero over an open interval.

The Wronskian of the solution set is

 [asciimath]W(y_1,y_2) = |(y_1,y_2),(y_1',y_2')|[/asciimath]

 [asciimath]W (x)= |(x^2,x^-1 ),(2x,-x^-2) |[/asciimath]

 [asciimath]=-3[/asciimath]

The Wronskian is never zero. Therefore, the solution set is the fundamental solution set.

3. Next substituting [asciimath]y_1=x^2[/asciimath][asciimath]y_2=x^-1[/asciimath][asciimath]f(x)=x^-1(1+3x^2)[/asciimath], and [asciimath]W(y_1,y_2)=-3[/asciimath] into formulas for [asciimath]u_1[/asciimath] and  [asciimath]u_2[/asciimath] to determine them.

Finding [asciimath]u_1[/asciimath]:

 [asciimath]u_1=int (-f(x) y_2)/( W(y_1,y_2)) dx[/asciimath]

 [asciimath]=int (-x^-1(1+3x^2) x^-1)/-3 dx[/asciimath]

 [asciimath]=1/3int (x^-2+3) dx[/asciimath]

 [asciimath]=1/3(-x^-1+3x)+C[/asciimath]

Letting [asciimath]C=0[/asciimath] gives

 [asciimath]u_1=-1/3x^-1+x[/asciimath]

Finding [asciimath]u_2[/asciimath]:

 [asciimath]u_2=int (f(x) y_1)/(W(y_1,y_2)) dx[/asciimath]

 [asciimath]=int (x^-1(1+3x^2) x^2)/-3 dx[/asciimath]

 [asciimath]=-1/3int (x+3x^3) dx[/asciimath]

 [asciimath]=-1/3(1/2x^2+3/4x^4)+C[/asciimath]

Letting [asciimath]C=0[/asciimath] yields

 [asciimath]u_2=-1/6x^2-1/4x^4[/asciimath]

4. Substitute [asciimath]u_1[/asciimath] and [asciimath]u_2[/asciimath] together with [asciimath]{y_1,y_2}[/asciimath] into the expression for [asciimath]y_p[/asciimath] to obtain a particular solution:

 [asciimath]y_p = u_1 y_1 + u_2 y_2[/asciimath]

 [asciimath]y_p=(-1/3x^-1+x)x^2+(-1/6x^2-1/4x^4 )x^-1[/asciimath]

 [asciimath]=-1/2x+3/4x^3[/asciimath]

 

Try an Example

 

D. Summary

  • Use the undetermined coefficients method for constant-coefficient equations with recognizable forcing functions [asciimath]f(x)[/asciimath].
  • Use the variation of parameters method for constant-coefficient equations with less typical [asciimath]f(x)[/asciimath] or for variable-coefficient equations.
  • In general, if a fundamental set of solutions is known, variation of parameters is a viable and often preferable method.

Section 3.5 Exercises

  1. Find a particular solution to the equation

     [asciimath]y''-8y'+16y = 4 e^(4x)lnx[/asciimath]

    Show/Hide Answer

    [asciimath]y_p(x)=2x^2 e^(4x)ln(x)-3x^2 e^(4x)[/asciimath]

  2. Find the particular solution to the equation

     [asciimath]y''+y = sec(x)[/asciimath]

    Show/Hide Answer

     [asciimath]y_p(x)=cos(x)ln|cos(x)|+xsin(x)[/asciimath]

  3. Find a particular solution to the following differential equation given [asciimath]y_1(x) = x^2[/asciimath]  and [asciimath]y_2(x) = x^-1[/asciimath] satisfy the corresponding homogeneous equation.

     [asciimath]x^2 y'' - 2 y = 3x-2 x^4, \ \(xgt0)[/asciimath]

    Show/Hide Answer

    [asciimath]y_p(x)=-3/2x-1/5x^4[/asciimath]

License

Icon for the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License

Differential Equations Copyright © 2024 by Amir Tavangar is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License, except where otherwise noted.

Share This Book