The Method of Variation of Parameters is a special method used to solve second-order linear differential equations with constant coefficients. The particular integral is obtained by replacing the arbitrary constants in the complementary function (C.F.) with variable functions.
Working Rule
To solve the differential equation: \[ \frac{d^2 y}{dx^2} + P \frac{dy}{dx} + Q y = Q(x) \quad \text{(1)} \] follow these steps:
Step 1: Find the Complementary Function (C.F.)
Obtain the complementary function of (1) as: \[ \text{C.F.} = c_1 y_1(x) + c_2 y_2(x) \] where \(y_1(x)\) and \(y_2(x)\) are linearly independent solutions of the homogeneous equation: \[ \frac{d^2 y}{dx^2} + P \frac{dy}{dx} + Q y = 0. \]
Step 2: Compute the Wronskian
Find the Wronskian \(W(x)\) of \(y_1(x)\) and \(y_2(x)\): \[ W(x) = \left| \begin{array}{cc} y_1 & y_2 \\ y_1' & y_2' \end{array} \right| = y_1 y_2' - y_2 y_1'. \]
Step 3: Find the Particular Integral (P.I.)
The particular integral is given by: \[ \text{P.I.} = -y_1(x) \int \frac{y_2(x) Q(x)}{W(x)} \, dx + y_2(x) \int \frac{y_1(x) Q(x)}{W(x)} \, dx. \]
Step 4: Write the Complete Solution
The complete solution of the differential equation is the sum of the complementary function and the particular integral: \[ y = \text{C.F.} + \text{P.I.} \]
1. Solve the differential equation \[ \left( D^2 - 3D + 2 \right) y = \frac{1}{1 + e^{-x}} \] using the method of variation of parameters.
The auxiliary equation is: \[ m^2 - 3m + 2 = 0 \implies m = 1, 2 \] Therefore, the complementary function is: \[ \text{C.F.} = c_1 e^x + c_2 e^{2x} \]
Let: \[ y_1 = e^x, \quad y_2 = e^{2x} \]
The Wronskian \(W(x)\) is: \[ W = \left| \begin{array}{cc} y_1 & y_2 \\ y_1' & y_2' \end{array} \right| = \left| \begin{array}{cc} e^x & e^{2x} \\ e^x & 2e^{2x} \end{array} \right| = 2e^{3x} - e^{3x} = e^{3x} \neq 0 \]
The particular integral is given by: \[ \text{P.I.} = -y_1(x) \int \frac{y_2(x) Q(x)}{W(x)} \, dx + y_2(x) \int \frac{y_1(x) Q(x)}{W(x)} \, dx \] Substituting \(Q(x) = \frac{1}{1 + e^{-x}}\), \(y_1 = e^x\), \(y_2 = e^{2x}\), and \(W(x) = e^{3x}\): \[ \text{P.I.} = -e^x \int \frac{e^{2x} \cdot \frac{1}{1 + e^{-x}}}{e^{3x}} \, dx + e^{2x} \int \frac{e^x \cdot \frac{1}{1 + e^{-x}}}{e^{3x}} \, dx \] Simplify the integrals: \[ \text{P.I.} = -e^x \int \frac{e^{-x}}{1 + e^{-x}} \, dx + e^{2x} \int \frac{e^{-2x}}{1 + e^{-x}} \, dx \] Evaluate the first integral: \[ \int \frac{e^{-x}}{1 + e^{-x}} \, dx = \log(1 + e^{-x}) \] Evaluate the second integral using substitution \(t = e^{-x}\), \(dt = -e^{-x} dx\): \[ \int \frac{e^{-2x}}{1 + e^{-x}} \, dx = \int \frac{t}{1 + t} \, dt = \int \left(1 - \frac{1}{1 + t}\right) dt = t - \log(1 + t) \] Substituting back \(t = e^{-x}\): \[ \text{P.I.} = -e^x \log(1 + e^{-x}) + e^{2x} \left(e^{-x} - \log(1 + e^{-x})\right) \] Simplify: \[ \text{P.I.} = \left(e^x + e^{2x}\right) \log(1 + e^{-x}) - e^x \]
The complete solution is: \[ y = \text{C.F.} + \text{P.I.} = c_1 e^x + c_2 e^{2x} + \left(e^x + e^{2x}\right) \log(1 + e^{-x}) - e^x \] This can be rewritten as: \[ y = C_1 e^x + c_2 e^{2x} + \left(e^x + e^{2x}\right) \log(1 + e^{-x}) \] where \(C_1 = c_1 - 1\).
2. Solve the differential equation: \( y'' + y = \frac{1}{1 + \sin x} \) by the method of variation of parameters.
Solution Here, the differential operator is: \[ f(D) = D^2 + 1 \quad \text{and} \quad Q(x) = \frac{1}{1 + \sin x}. \] The auxiliary equation is: \[ m^2 + 1 = 0 \implies m = \pm i. \] Therefore, the complementary function (C.F.) is: \[ \text{C.F.} = c_1 \cos x + c_2 \sin x. \]
Let: \[ y_1 = \cos x, \quad y_2 = \sin x. \] The Wronskian \( W \) is: \[ W = \left| \begin{array}{cc} y_1 & y_2 \\ y_1' & y_2' \end{array} \right| = \left| \begin{array}{cc} \cos x & \sin x \\ -\sin x & \cos x \end{array} \right| = \cos^2 x + \sin^2 x = 1 \neq 0. \]
The particular integral (P.I.) is given by: \[ \text{P.I.} = -y_1(x) \int \frac{y_2(x) Q(x)}{W(x)} dx + y_2(x) \int \frac{y_1(x) Q(x)}{W(x)} dx. \] Substituting the values: \[ \text{P.I.} = -\cos x \int \frac{\sin x}{1 + \sin x} dx + \sin x \int \frac{\cos x}{1 + \sin x} dx. \]
Simplify the integrals: \[ \text{P.I.} = -\cos x \int \frac{\sin x (1 - \sin x)}{1 - \sin^2 x} dx + \sin x \log(1 + \sin x). \] Further simplification: \[ \text{P.I.} = -\cos x \int \frac{\sin x - \sin^2 x}{\cos^2 x} dx + \sin x \log(1 + \sin x). \] Break the integral: \[ \text{P.I.} = -\cos x \int (\sec x \tan x - \tan^2 x) dx + \sin x \log(1 + \sin x). \] Evaluate the integrals: \[ \text{P.I.} = -\cos x \left( \int \sec x \tan x \, dx - \int (\sec^2 x - 1) dx \right) + \sin x \log(1 + \sin x). \] Finalize: \[ \text{P.I.} = -\cos x (\sec x - \tan x + x) + \sin x \log(1 + \sin x). \]
The complete solution is: \[ y = \text{C.F.} + \text{P.I.} \] Substituting the values: \[ y = c_1 \cos x + c_2 \sin x - 1 + \sin x - x \cos x + \sin x \log(1 + \sin x). \] Alternatively: \[ y = c_1 \cos x + C_2 \sin x - 1 - x \cos x + \sin x \log(1 + \sin x), \] where \( C_2 = c_2 + 1 \).
3. Solve the differential equation: \( y'' - 2y' + y = e^x \log x \) by the method of variation of parameters.
Solution The auxiliary equation is: \[ m^2 - 2m + 1 = 0 \implies (m - 1)^2 = 0 \implies m = 1, 1. \] Therefore, the complementary function (C.F.) is: \[ \text{C.F.} = (c_1 + c_2 x) e^x. \]
Let: \[ y_1 = e^x, \quad y_2 = x e^x, \quad R = e^x \log x. \] The Wronskian \( W \) is: \[ W = \left| \begin{array}{cc} y_1 & y_2 \\ y_1' & y_2' \end{array} \right| = \left| \begin{array}{cc} e^x & x e^x \\ e^x & (1 + x) e^x \end{array} \right| = e^{2x} \neq 0. \]
The particular integral (P.I.) is given by: \[ \text{P.I.} = -y_1(x) \int \frac{y_2(x) R(x)}{W(x)} dx + y_2(x) \int \frac{y_1(x) R(x)}{W(x)} dx. \] Substituting the values: \[ \text{P.I.} = -e^x \int \frac{x e^x \cdot e^x \log x}{e^{2x}} dx + x e^x \int \frac{e^x \cdot e^x \log x}{e^{2x}} dx. \] Simplify the integrals: \[ \text{P.I.} = -e^x \int x \log x \, dx + x e^x \int \log x \, dx. \]
Evaluate the integrals: \[ \int x \log x \, dx = \frac{x^2}{2} \log x - \int \frac{1}{x} \cdot \frac{x^2}{2} dx = \frac{x^2}{2} \log x - \frac{x^2}{4}, \] and \[ \int \log x \, dx = x \log x - x. \] Substitute back: \[ \text{P.I.} = -e^x \left( \frac{x^2}{2} \log x - \frac{x^2}{4} \right) + x e^x \left( x \log x - x \right). \] Simplify: \[ \text{P.I.} = \frac{1}{4} x^2 e^x (2 \log x - 3). \]
The complete solution is: \[ y = \text{C.F.} + \text{P.I.} \] Substituting the values: \[ y = (c_1 + c_2 x) e^x + \frac{1}{4} x^2 e^x (2 \log x - 3). \]
Model Problems
Solve the following differential equations:
-
Solve: \(\frac{d^2y}{dx^2} + y = \sec x\)
Answer: \(y = c_1 \cos x + c_2 \sin x - \left( \cos x \log (\sec x) - x \sin x \right)\) -
Solve: \((D^2 + 4)y = \tan 2x\)
Answer: \(y = c_1 \cos 2x + c_2 \sin 2x - \frac{1}{4} \cos 2x \log (\sec 2x + \tan 2x)\) -
Solve: \(\frac{d^2y}{dx^2} + a^2 y = \csc ax\)
Answer: \(y = c_1 \cos ax + c_2 \sin ax - \frac{1}{a^2} \left( x \cos ax + \sin ax \log (\sin ax) \right)\) -
Solve: \(y'' - 6y' + 9y = \frac{e^{3x}}{x^2}\)
Answer: \(y = (c_1 + c_2 x) e^{3x} - e^{3x} (1 + \log x)\) -
Solve: \(\frac{d^2y}{dx^2} - 2\frac{dy}{dx} + y = \frac{e^x}{x}\)
Answer: \(y = (c_1 + c_2 x) e^x + x e^x \log x\) -
Solve: \(y'' + 3y' + 2y = e^{e^x}\)
Answer: \(y = c_1 e^{-x} + c_2 e^{-2x} + e^{e^x} e^{-2x}\) -
Solve: \((D^2 + 2D + 1)y = e^{-x} \log x\)
Answer: \(y = (c_1 + c_2 x) e^{-x} + \frac{x^2 e^{-x}}{4} (2 \log x - 3)\) -
Solve: \(y'' - 2y' + 2y = e^x \tan x\)
Answer: \(y = e^x \left( c_1 \cos x + c_2 \sin x \right) - e^{-x} \cos x \log (\sec x + \tan x)\)