7  L17: Variation of Parameters (5.7)

7.1 Variation of Parameters Method

Variation of Parameters Method

The method of variation of parameters is a technique used to find particular solutions of nonhomogeneous differential equations. This method is especially useful when the nonhomogeneous term does not lend itself easily to the methods of undetermined coefficients or when the equation involves functions that make the application of undetermined coefficients cumbersome or impossible. Here are some situations and clues that indicate when variation of parameters might be the best approach to solving a differential equation:

  1. Nonhomogeneous Term Complexity: If the nonhomogeneous part of the differential equation (the term on the right side of the equation) is a complex function that does not fit the standard forms (e.g., polynomials, exponentials, sines, cosines) for which undetermined coefficients is typically used, variation of parameters might be more appropriate.

  2. Inapplicability of Undetermined Coefficients: If the method of undetermined coefficients is not applicable because the nonhomogeneous term is similar to the complementary function’s solution, variation of parameters is a suitable alternative. This method does not require the nonhomogeneous term to be of any specific form.

  3. Solution to Homogeneous Equation: Variation of parameters requires the solution to the corresponding homogeneous equation. If you can solve the homogeneous part of the differential equation to find its general solution, you can then apply variation of parameters to find the particular solution of the nonhomogeneous equation.

  4. Linear Differential Equations: This method is primarily used for linear differential equations, especially second-order and higher-order equations. It is effective for equations where the coefficients are functions of the independent variable, not just constants.

  5. Presence of Logarithmic or Integral Forms: Sometimes, the particular solution obtained through variation of parameters might involve logarithmic or integral forms, which could be an indication that this method was necessary due to the complexity of the nonhomogeneous term.

To recognize when to use variation of parameters, look for the following clues in the differential equation:

  • The differential equation is linear and nonhomogeneous.
  • The nonhomogeneous term is such that applying the method of undetermined coefficients is not straightforward or possible.
  • You are dealing with coefficients that are functions of the independent variable or with a nonhomogeneous term that doesn’t easily fit the forms for which undetermined coefficients works well.

In practice, the choice between undetermined coefficients and variation of parameters can sometimes come down to personal preference or the specific details of the problem. However, variation of parameters is a more universally applicable method, albeit often resulting in more complex calculations.

Let \[a_2(x)y''+a_1(x)y'+a_0(x)y=g(x)\]

STEP 1: Find \[y_c=c_1y_1(x)+c_2y_2(x)\]

STEP 2: Assume a particular solution of the form: \[y_p=v_1(x)y_1(x)+v_2(x)y_2(x)\] where \(v_1(x),\, v_2(x)\) are to be determined.

STEP 3: Write the conditions on \(v_1\) and \(v_2\): \[y_p'=v_1'y_1+v_1y_1'+v_2'y_2+v_2y_2'\] \[\text{Assume: }\boxed{v_1'y_1+v_2'y_2=0}\qquad\text{(we impossed this...)} \tag{7.1}\] \[\Rightarrow y_p''=(v_1y_1')'+(v_2y_2')'\] \[\Rightarrow y_p''=(v_1'y_1'+v_1y_1'')+(v_2'y_2'+v_2y_2'')\] Plug into our diffyQ: \[a_2(v_1'y_1'+v_1y_1''+v_2'y_2'+v_2y_2'')+a_1(v_1y_1'+v_2y_2')+a_0(v_1y_1+v_2y_2)=g(x)\]

Factoring by each “parameter” function: \[v_1(a_2y_1''+a_1y_1'+a_0y_1)+\] \[+v_2(a_2y_2''+a_1y_2'+a_0y_2)+\] \[+a_2v_1'y_1'+a_2v_2'y_2'=g(x)\] \[\Rightarrow \boxed{v_1'y_1'+v_2'y_2'=\frac{g(x)}{a_2}}\qquad\text{(we arrive to this 2nd eq.)} \tag{7.2}\]

STEP 4: Solve for: \(v_1',\,v_2'\)

STEP 5: Solve for: \(v_1,\,v_2\)

STEP 6: Use \(v_1\) & \(v_2\) to write \(y_p\)

STEP 7: \[y=y_c+y_p\]

7.2 Example 1

Example

Solve \[y''+y=\sin x\cos x\]

STEP 1: \[r^2+1=0\rightarrow r_{1,2}=\pm i\] \[\Rightarrow \boxed{y_c=c_1\sin x +c_2\cos x}\]

STEP 2:

Assume: \[y_p=v_1(x)\sin x+v_2(x) \cos x\] STEP 3:

From Equation 7.1: \[v_1'\sin x+v_2'\cos x =0\] From Equation 7.2: \[v_1'(\sin x)'+v_2'(\cos x)'=\frac{\sin x \cos x}{1}\] \[v_1'(\cos x)-v_2'(\sin x)=\sin x \cos x\] Then my system of equations:

\[v_1'\sin x+v_2'\cos x =0 \tag{7.3}\] \[v_1'(\cos x)-v_2'(\sin x)=\sin x \cos x \tag{7.4}\]

Equation 7.3+\(\frac{\cos x}{\sin x}\)Equation 7.4:

\[\Rightarrow v_1'\sin x+v_1'\frac{\cos^2 x}{\sin x}=\cos^2 x\]

\[\Rightarrow v_1'\left(\sin x+\frac{\cos^2 x}{\sin x}\right)=\cos^2 x\] \[\Rightarrow v_1'\left(\frac{\sin^2 x +\cos^2 x}{\sin x}\right)=\cos^2 x\] \[\Rightarrow \boxed{v_1'=\sin x \cos^2 x} \tag{7.5}\]

Using Equation 7.3 and Equation 7.5 I can find \(v_2'\):

\[v_1'\sin x+v_2'\cos x =0\] \[\sin x \cos^2 x\sin x+v_2'\cos x =0\]

\[v_2'\cos x =-\sin^2 x\cos^2 x\] \[\boxed{v_2'=-\sin^2x\cos x} \tag{7.6}\]

STEP 5:

Integrating Equation 7.5 I can find \(v_1\):

\[\Rightarrow v_1=\int \sin x \cos^2 x\,dx\] simple substitution: \(u=\cos x\rightarrow du=-\sin x\,dx\)

\[\Rightarrow v_1=-\int u^2 \,du\]

\[\Rightarrow v_1=-\frac{u^3}{3}\] \[\Rightarrow \boxed{v_1=-\frac{\cos^3 x}{3}}\]

Integrating Equation 7.6 I can find \(v_2\):

\[v_2=-\int \sin^2x\cos x\,dx=-\int u^2\,du=-\frac{u^3}{3}=-\frac{\sin^3 x}{3}\] \[\Rightarrow \boxed{v_2=-\frac{\sin^3 x}{3}}\]

STEP 6:

\[y_p=v_1y_1+v_2y_2\]

\[y_p=-\frac{\cos^3 x}{3}\sin x-\frac{\sin^3 x}{3}\cos x\]

\[y_p=-\frac{1}{3}(\cos x \sin x (\cos^2 x + \sin^2 x))\]

\[\Rightarrow \boxed{y_p=-\frac{1}{3}(\cos x \sin x)}\]

STEP 7:

\[y=y_c+y_p\]

Finally:

\[\boxed{\boxed{y=c_1\sin x+c_2\cos x-\frac{1}{3}(\cos x \sin x)}}\]

7.3 Higher Order Equations

Conditions on \(v_1,\cdots,v_n\)

\[v_1'y_1+v_2'y_2+\cdots+v_n'y_n=0\] \[v_1'y_1'+v_2'y_2'+\cdots+v_n'y_n'=0\] \[v_1'y_1''+v_2'y_2''+\cdots+v_n'y_n''=0\] \[\cdots\] \[v_1'y_1^{(n-1)}+v_2'y_2^{(n-1)}+\cdots+v_n'y_n^{(n-1)}=\frac{g(x)}{a_n}\]

7.4 Example 2

Example

Solve \[y'''+y''=\sec^2 x\]

STEP 1:

\[r^3+r^2=0\rightarrow r^2(r+1)=0\rightarrow r_{1,2,3}=\{0,0,-1\}\]

\[\Rightarrow y_c = c_1+c_2x+c_3e^{-x}\]

STEP 2:

\[y_p=v_1+v_2x+v_3e^{-x}\]

STEP 3:

\[v_1'+v_2'x+v_3'e^{-x}=0\] \[v_1'\cdot 0+v_2'\cdot 1+v_3'(-e^{-x})=0\] \[v_3'e^{-x}=\sec^2 x\]

STEP 4:

\[\boxed{v_3'=e^x\sec^2 x}\] \[\Rightarrow v_2'=e^{-x}v_3'=e^{-x}\cdot e^x\sec^2 x= \sec^2 x\] \[\boxed{v_2'=\sec^2 x}\]

\[\Rightarrow v_1'=-v_2'x-v_3'e^{-x}=-x\sec^2 x-e^x\sec^2 xe^{-x}=-\sec^2 x(x+1)\]

\[\boxed{v_1'=-\sec^2 x(x+1)}\] STEP 5: (Find \(v_1,\,v_2,\,v_3\))

STEP 6: (Express \(y_p=\))

STEP 7: (Express \(y=y_c+y_p\))

7.5 References

  1. LibreTexts, 5.7: Variation of Parameters, from William F. Trench.
  2. Variation of Parameters. MIT OpenCourseWare.(video)
  3. Part II: Differential Equations, Lec 5: Variations of Parameters MIT (1971)