PAGE 1

3.6 (Continued)

Variation of Parameters

Given the second-order linear differential equation:

\[ y'' + p(t)y' + q(t)y = g(t) \]

The general solution is of the form:

\[ y = c_1 y_1 + c_2 y_2 + Y \]

where \( y_1, y_2 \) are fundamental solutions. We assume a particular solution of the form:

\[ y = u_1 y_1 + u_2 y_2 \]

System of equations for \( u_1' \) and \( u_2' \):

\[ \begin{cases} u_1' y_1 + u_2' y_2 = 0 \\ u_1' y_1' + u_2' y_2' = g(t) \end{cases} \]

This system can be written in matrix form:

\[ \begin{bmatrix} y_1 & y_2 \\ y_1' & y_2' \end{bmatrix} \begin{bmatrix} u_1' \\ u_2' \end{bmatrix} = \begin{bmatrix} 0 \\ g \end{bmatrix} \]

Solving for the derivatives:

\[ \begin{bmatrix} u_1' \\ u_2' \end{bmatrix} = \begin{bmatrix} y_1 & y_2 \\ y_1' & y_2' \end{bmatrix}^{-1} \begin{bmatrix} 0 \\ g \end{bmatrix} \]
\[ = \frac{1}{W} \begin{bmatrix} y_2' & -y_2 \\ -y_1' & y_1 \end{bmatrix} \begin{bmatrix} 0 \\ g \end{bmatrix} \]
\[ u_1' = -\frac{y_2 g}{W} \]
\[ u_2' = \frac{y_1 g}{W} \]
PAGE 2

example

\[ y'' - y = e^t + e^{-t} \]

Characteristic equation:

\[ r^2 - 1 = 0 \implies r = \pm 1 \]

Fundamental solutions:

\[ y_1 = e^t, \quad y_2 = e^{-t} \]

General solution form:

\[ y = c_1 e^t + c_2 e^{-t} + Y \]

If we used undetermined coefficients:

\[ Y = Ae^t + Be^{-t} \quad \text{but it copies } y_1 \text{ and } y_2 \]

Fix:

\[ Y = Ate^t + Bte^{-t} \]

But if we use Variation, the method takes care of the copying issue. We just simply solve the system:

\[ \begin{cases} u_1' y_1 + u_2' y_2 = 0 \\ u_1' y_1' + u_2' y_2' = g \end{cases} \]
PAGE 3

Solving for Variation of Parameters

\[ \begin{aligned} u_1' e^t + u_2' e^{-t} &= 0 \\ u_1' e^t - u_2' e^{-t} &= e^t + e^{-t} \end{aligned} \]

Add them:

\[ \begin{aligned} 2 u_1' e^t &= e^t + e^{-t} \\ u_1' &= \frac{1}{2} + \frac{1}{2} e^{-2t} \end{aligned} \]
\[ u_1 = \frac{1}{2} t - \frac{1}{4} e^{-2t} + c_1 \]
\[ \begin{aligned} u_1' e^t + u_2' e^{-t} &= 0 \\ u_2' e^{-t} &= -u_1' e^t = -\left( \frac{1}{2} + \frac{1}{2} e^{-2t} \right) e^t \\ &= -\frac{1}{2} e^t - \frac{1}{2} e^{-t} \\ u_2' &= -\frac{1}{2} e^{2t} - \frac{1}{2} \end{aligned} \]
\[ u_2 = -\frac{1}{4} e^{2t} - \frac{1}{2} t + c_2 \]

General Solution

\[ y = u_1 y_1 + u_2 y_2 \]
PAGE 4
\[ \begin{aligned} y &= \left( \frac{1}{2} t - \frac{1}{4} e^{-2t} + c_1 \right) e^t + \left( -\frac{1}{4} e^{2t} - \frac{1}{2} t + c_2 \right) e^{-t} \\ &= c_1 e^t + c_2 e^{-t} - \frac{1}{4} e^{-t} - \frac{1}{4} e^t + \frac{1}{2} t e^t - \frac{1}{2} t e^{-t} \end{aligned} \]

Absorb because:

\[ c_1 e^t - \frac{1}{4} e^t = (c_1 - \frac{1}{4}) e^t = C_1 e^t \]

The \( t \)'s we would need to supply in undet. coeff.

\[ y = \underbrace{C_1 e^t + C_2 e^{-t}}_{\text{complementary}} + \underbrace{\frac{1}{2} t e^t - \frac{1}{2} t e^{-t}}_{\text{particular}} \]
PAGE 5

Example: Second-Order Non-Homogeneous Differential Equation

\[ y'' - 4y' + 4y = e^{2t} \]

The characteristic equation is:

\[ r^2 - 4r + 4 = 0 \implies (r-2)^2 = 0 \implies r = 2, 2 \]

Fundamental solutions:

\[ y_1 = e^{2t}, \quad y_2 = te^{2t} \]

this we need to supply

Using the method of variation of parameters, we set up the system:

\[ u_1' y_1 + u_2' y_2 = 0 \]\[ u_1' y_1' + u_2' y_2' = g \]

This time, let's use the formulas:

\[ u_1' = -\frac{y_2 g}{W}, \quad u_2' = \frac{y_1 g}{W} \]

Calculate the Wronskian \( W \):

\[ W = \begin{vmatrix} y_1 & y_2 \\ y_1' & y_2' \end{vmatrix} = \begin{vmatrix} e^{2t} & te^{2t} \\ 2e^{2t} & 2te^{2t} + e^{2t} \end{vmatrix} \]\[ = 2te^{4t} + e^{4t} - 2te^{4t} = e^{4t} \]
PAGE 6

Substitute the values into the formulas for \( u_1' \) and \( u_2' \):

\[ u_1' = -\frac{y_2 g}{W} = -\frac{te^{2t} \cdot e^{2t}}{e^{4t}} = -t \implies u_1 = -\frac{1}{2}t^2 + c_1 \]\[ u_2' = \frac{y_1 g}{W} = \frac{e^{2t} \cdot e^{2t}}{e^{4t}} = 1 \implies u_2 = t + c_2 \]

The general solution is given by:

\[ y = u_1 y_1 + u_2 y_2 \]\[ = \left( -\frac{1}{2}t^2 + c_1 \right) e^{2t} + (t + c_2) te^{2t} \]\[ = c_1 e^{2t} + c_2 te^{2t} - \frac{1}{2}t^2 e^{2t} + t^2 e^{2t} \]
\[ y = c_1 e^{2t} + c_2 te^{2t} + \frac{1}{2}t^2 e^{2t} \]
PAGE 7

Variation can handle non constant coefficients, provided we have \( y_1 \) and \( y_2 \) (somehow).

Example

\[ t^2 y'' - 3t y' + 4y = t^2 \ln(t) \quad (t > 0) \]

Euler's equation or Euler-Cauchy eq.

Solutions are \( y = t^r \) instead of \( e^{rt} \)

here,
\( y_1 = t^2 \)
\( y_2 = t^2 \ln(t) \)

for Euler's eq. we throw \( \ln(t) \) at solution if things are copying each other

solve

\[ u_1' y_1 + u_2' y_2 = 0 \]\[ u_1' y_1' + u_2' y_2' = g \]
PAGE 8
\[ u_1' t^2 + u_2' t^2 \ln(t) = 0 \]\[ 2u_1' t + u_2' (t + 2t \ln(t)) = t^2 \ln(t) \]

\( u_1' = -u_2' \ln(t) \)

\( -2u_2' t \ln(t) + t u_2' + 2u_2' t \ln(t) = t^2 \ln(t) \)

\( u_2' = t \ln(t) \)

\[ u_2 = \frac{1}{2} t^2 \ln(t) - \frac{1}{4} + c_2 \]

\( u_1' = -t [\ln(t)]^2 \)

\[ u_1 = \frac{1}{4} t^2 - \frac{1}{2} t^2 \ln(t) + \frac{1}{2} t^2 (\ln(t))^2 + c_1 \]

\( y = u_1 y_1 + u_2 y_2 \)

PAGE 9

Variation of Parameters for First-Order Equations

Variation can be used for higher-order eqs. and even 1st-order.

\[ t y' + 2y = \frac{\cos(t)}{t} \]
\[ y' + \frac{2}{t} y = \frac{\cos(t)}{t^2} \]
normally done w/ integrating factor

but variation works too

first, solve:

\[ y' + \frac{2}{t} y = 0 \]
(separable)
\[ y = c \cdot \frac{1}{t^2} \]
fundamental / complementary

replace \( c \) w/ \( u \):

\[ y = u(t) \cdot \frac{1}{t^2} \] \[ = u t^{-2} \] \[ y' = -2u t^{-3} + u' t^{-2} \]
plug into diff. eq.
\[ -2u t^{-2} + u' t^{-1} + 2u t^{-2} = \frac{\cos(t)}{t} \]
PAGE 10
\[ u' = \cos(t) \quad \implies \quad u = \sin(t) + C \]

Solution:

\[ y = u \cdot \frac{1}{t^2} = (\sin(t) + c) \frac{1}{t^2} \]
\[ y = \frac{\sin(t)}{t^2} + \frac{c}{t^2} \]
same as if done w/ integrating factor