###### Theorem4.5

Suppose that

has solutions \(x_1 = x_1(t)\) and \(x_2 = x_2(t)\text{.}\) Then \(x_1(t) - x_2(t)\) is a solution of the homogeneous linear differential equation

\(\newcommand{\trace}{\operatorname{tr}}
\newcommand{\real}{\operatorname{Re}}
\newcommand{\imaginary}{\operatorname{Im}}
\newcommand{\lt}{<}
\newcommand{\gt}{>}
\newcommand{\amp}{&}
\)

Harmonic oscillators such as a spring-mass system (Subsection 1.1.3) or an RLC circuit (Section 4.1) can be modeled with second-order linear differential equations. Indeed, we can model a spring-mass system with the equation

\begin{equation*}
mx''(t) + b x'(t) +k x(t) = g(t),
\end{equation*}

where \(m\) is the mass, \(b\) is the damping coefficient, \(k\) is the spring constant, and \(F(t) = g(t)\) represents some external force applied to our system. RLC circuits can also be modeled with provide another example of forcing. If \(I(t)\) is the rate at which a charge flows through a circuit (measured in amperes or amps), \(R\) is the resistance (measured in ohms), \(C\) is the capacitance (measured in farads), and the inductance, \(L\text{,}\) is (measured in henrys), then the derivative of the impressed voltage (measured in volts), \(E(t)\text{,}\) is the forcing term

\begin{equation*}
L I'' + RI' + \frac{1}{C} I = E'(t).
\end{equation*}

What is different about these two equations are the terms on the righthand side, \(g(t)\) and \(E'(t)\text{.}\) Such a term is called a forcing term.

A nonhomogeneous second-order linear differential equation is an equation of the form

\begin{equation*}
x'' +p(t) x' + q(t) x = g(t).
\end{equation*}

We have already seen how examples of such equations arise when examining models of harmonic oscillators with forcing terms. Our goal is to be able to solve such equations. In general, these equations can be difficult to solve for an arbitrary function \(g(t)\text{.}\) Before we attempt to find solutions for some of the more common functions that might occur for \(g(t)\text{,}\) let us derive some fundamental facts about second-order linear differential equations.

Suppose that

\begin{equation}
x'' +p(t) x' + q(t) x = g(t)\label{equation-secondorder02-nonhomogeneous-difference}\tag{4.8}
\end{equation}

has solutions \(x_1 = x_1(t)\) and \(x_2 = x_2(t)\text{.}\) Then \(x_1(t) - x_2(t)\) is a solution of the homogeneous linear differential equation

\begin{equation*}
x'' +p(t) x' + q(t) x = 0.
\end{equation*}

Since \(x_1\) and \(x_2\) are solutions of (4.8), we know that

\begin{align*}
x_1'' +p(t) x_1' + q(t) x_1 & = g(t)\\
x_2'' +p(t) x_2' + q(t) x_2 & = g(t).
\end{align*}

Thus,

\begin{gather*}
\frac{d^2}{dt^2} (x_1 - x_2) + p(t) \frac{d}{dt} (x_1 - x_2) + q(t) (x_1 - x_2)\\
= \left( \frac{d^2 x_1}{dt^2} + p(t) \frac{dx_1}{dt} + q(t) x_1 \right) - \left( \frac{d^2 x_2}{dt^2} + p(t) \frac{dx_2}{dt} + q(t) x_2 \right)\\
= g(t) - g(t) = 0.
\end{gather*}

We can use Theorem Theorem 4.5 to derive the fact that the general solution to

\begin{equation}
x'' +p(t) x' + q(t) x = g(t).\label{equation-secondorder02-nonhomogeneous}\tag{4.9}
\end{equation}

can be written in the form

\begin{equation*}
x = x_h + x_p,
\end{equation*}

where \(y_h\) is the general solution of the homogeneous equation

\begin{equation*}
x'' +p(t) x' + q(t) x = 0,
\end{equation*}

and \(x_p\) is any solution of (4.9). Indeed, suppose that \(x_q\) is another solution to (4.9). Then \(x_q - x_p\) is a solution to the homogeneous equation

\begin{equation*}
x'' +p(t) x' + q(t) x = 0.
\end{equation*}

Therefore,

\begin{equation*}
x_q - x_p =x_h
\end{equation*}

or

\begin{equation*}
x_q =x_h + x_p.
\end{equation*}

We state this fact in the following theorem.

Let \(x_p\) be a particular solution of the equation

\begin{equation*}
x'' +p(t) x' + q(t) x = g(t),
\end{equation*}

and \(x_h\) be the general solution of the corresponding homogeneous equation

\begin{equation*}
x'' +p(t) x' + q(t) x = 0.
\end{equation*}

Then the general solution to \(x'' +p(t) x' + q(t) x = g(t)\) is \(x = x_h + x_p\text{.}\)

The equation

\begin{equation*}
m x'' + bx' + kx = g(t)
\end{equation*}

can be used to model a harmonic oscillator where forcing occurs. In general, we will not be able to solve this equation explicitly for a given \(g(t)\text{;}\) however, certain forcing functions often occur in practice. Some of the more important forcing functions are \(g(t) = e^{-at}\text{,}\) where the external force decreases exponentially over time; \(g(t) = k\text{,}\) where a constant force is applied; and \(g(t) = \cos \omega t\) or \(g(t) = \sin \omega t\text{,}\) where a force is applied periodically.

In the case of the unforced damped harmonic oscillator,

\begin{equation*}
m x'' + b x' + kx =0,
\end{equation*}

we know that \(m \gt 0\text{,}\) \(b \gt 0\text{,}\) and \(k \gt 0\text{.}\) Thus, we can rewrite this equation as

\begin{equation*}
x'' + px' + q x = 0,
\end{equation*}

where \(p = b/m\) and \(q = k/m\) are both positive. As a first-order linear system, the harmonic oscillator is

\begin{align*}
x' & = y\\
y' & = - qx -py.
\end{align*}

The matrix corresponding to this system,

\begin{equation*}
A
=
\begin{pmatrix}
0 & 1 \\
-q & -p
\end{pmatrix},
\end{equation*}

has trace of \(-p\) and determinant \(q\text{.}\) Since \(\trace(A) \lt 0\) and \(\det(A) \gt 0\text{,}\) we know that any solution of the unforced equation tends toward the origin as \(t \to \infty\text{.}\) That is, the solution is a sink. This leads us to the following conclusion.

Suppose

\begin{equation*}
x'' + px' + q x = g(t)
\end{equation*}

has solution \(x = x_h + x_p\text{,}\) where \(p \gt 0\) and \(q \gt 0\text{.}\) If

\begin{equation*}
x = x_h + x_p
\end{equation*}

is the general solution to the equation, then

\begin{equation*}
x = x_h + x_p \to x_p
\end{equation*}

as \(t \to \infty\text{.}\)

In other words, all solutions of a damped harmonic oscillator with nonzero damping are essentially the same for large values of \(t\text{.}\)

Let us solve the differential equation

\begin{equation}
x'' + 5x' + 4x = 1,\label{equation-secondorder02-damped-oscillator}\tag{4.10}
\end{equation}

a harmonic oscillator with a constant forcing function. It is easy to check that the general solution to the homogeneous equation

\begin{equation*}
x'' + 5x' + 4x = 0
\end{equation*}

is

\begin{equation*}
x_h = c_1 e^{-t} + c_2 e^{-4t}.
\end{equation*}

A particular solution to (4.10) is given by \(x_p = 1/4\text{.}\) Thus, the general solution is

\begin{equation*}
x(t) = c_1 e^{-t} + c_2 e^{-4t} + \frac{1}{4}.
\end{equation*}

As \(t \to \infty\text{,}\) all solutions approach the constant solution \(x = 1/4\) (Figure 4.9).

Now let us consider a more complicated example. Suppose that we wish to solve

\begin{equation}
x'' + 5x' + 4x = e^{-2t}.\label{equation-secondorder02-exponential-forcing-1}\tag{4.11}
\end{equation}

This is the equation of a harmonic oscillator with a forcing function that decreases exponentially with time. We already know the solution to the homogeneous equation. We will use the method of undetermined coefficients to find a particular solution to (4.11). It is reasonable to guess that a particular solution will have the form

\begin{equation*}
x_p = Ae^{-2t}.
\end{equation*}

Substituting this expression into (4.11), we find that

\begin{equation*}
e^{-2t}= x_p'' + 5 x_p' + 4x_p = 4 A e^{-2t} - 10 A e^{-2t} + 4 Ae^{-2t} = -2 A e^{-2t}.
\end{equation*}

Hence, \(A = -1/2\text{.}\) Therefore, the solution that we seek is

\begin{equation*}
x = c_1 e^{-t} + c_2 e^{-4t} - \frac{1}{2} e^{-2t}.
\end{equation*}

Again, all solutions approach zero as \(t \to \infty\) (Figure 4.11).

Now let us examine what happens if we have a periodic forcing function. Let us assume that the particular solution to the equation

\begin{equation*}
x'' + 5x' + 4x = 2 \cos t.
\end{equation*}

takes the form

\begin{equation*}
x_p = A \cos t + B \sin t.
\end{equation*}

Then

\begin{align*}
x_p' & = -A \sin t + B \cos t\\
x_p'' & = -A \cos t - B \sin t.
\end{align*}

Substituting these expressions into the differential equation, we see that

\begin{align*}
2 \cos t & = x_p'' + 5 x_p' + 4 x_p\\
& = (-A \cos t - B \sin t) + 5(-A \sin t + B \cos t) + 4(A \cos t + B \sin t)\\
& = (3A + 5B) \cos t +(-5A + 3B) \sin t.
\end{align*}

We must solve the following system of equations to find a particular solution:

\begin{align*}
3A + 5B & = 2\\
-5A + 3B & = 0.
\end{align*}

The solution of this system is \(A = 3/17\) and \(B = 5/17\text{.}\) Consequently,

\begin{equation*}
x_p = \frac{3}{17} \cos t + \frac{5}{17} \sin t
\end{equation*}

is a particular solution to \(x'' +5x' + 4x = 2 \cos t\text{.}\) The general solution to our equation is

\begin{equation*}
x = c_1 e^{-t} + c_2 e^{-4t} + \frac{3}{17} \cos t + \frac{5}{17} \sin t.
\end{equation*}

The solutions to this equation are given in Figure 4.13.

As a final example, consider the

\begin{equation*}
x'' + 5x' + 4x = e^{-t}.
\end{equation*}

Recall that the solution to the homogeneous equation \(x'' + 5x' + 4x = 0\) is

\begin{equation*}
x_h = c_1 e^{-t} + c_2 e^{-4t}.
\end{equation*}

Our guess of \(x_p(t) = A e^{-t}\) for a particular solution will no longer work since \(e^{-t}\) is a solution to the homogeneous equation. We must therefore consider a function of a different form. Such a function must yield a multiple of \(e^{-t}\) when differentiated. The simplest such function is of the form

\begin{equation*}
x_p = A t e^{-t}.
\end{equation*}

Using this guess,

\begin{align*}
e^{-t} & = \frac{d^2}{dt^2} Ate^{-t} + 5 \frac{d}{dt} Ate^{-t} + 4A te^{-t}\\
& = A(- e^{-t} - e^{-t} + t e^{-t}) + 5A(e^{-t} - t e^{-t} ) + 4 A te^{-t}\\
& = 3A e^{-t}.
\end{align*}

Thus, \(A = 1/3\) and our general solution is

\begin{equation*}
x = c_1 e^{-t} + c_2 e^{-4t} + \frac{1}{3} t e^{-t}.
\end{equation*}

Solutions to the differential equation \(x'' + 5x' + 4x = e^{-t}\) are given in Figure 4.15.

We outline a general strategy for choosing \(x_p\) for the Method of Undetermined Coefficients in Table 4.16. Here \(s = 0, 1, 2\) is the smallest integer that will ensure that no term in \(x_p\) is a solution of the corresponding homogeneous equation.

\(g(t)\) | \(x_p\) |

\(P_n(t) = a_nt^n + \cdots + a_1 t + a_0\) | \(t^s(A_nt^n + \cdots + A_1 t + A_0)\) |

\(P_n(t) e^{\alpha t}\) | \(t^s(A_nt^n + \cdots + A_1 t + A_0) e^{\alpha t}\) |

\(\displaystyle P_n(t) e^{\alpha t} \left\{\begin{array}{c} \sin \beta t \\ \cos \beta t \end{array}\right.\) | \(t^se^{\alpha t}[(A_nt^n + \cdots + A_1 t + A_0) \cos \beta t \) |

\(+ (B_n t^n + \cdots + B_1 t + B_0) \sin \beta t]\) |

- A nonhomogeneous second-order linear differential equation is an equation of the form\begin{equation*} x'' + p(t) x' + q(t) x = g(t). \end{equation*}Forced harmonic oscillators and RLC circuits provide good examples of nonhomogeneous second-order linear differential equations.
- Suppose that\begin{equation*} x'' +p(t) x' + q(t) x = g(t) \end{equation*}has solutions \(x_1 = x_1(t)\) and \(x_2 = x_2(t)\text{.}\) Then \(x_1(t) - x_2(t)\) is a solution of the homogeneous linear differential equation\begin{equation*} x'' +p(t) x' + q(t) x = 0. \end{equation*}
- Let \(x_p\) be a particular solution of the equation\begin{equation*} x'' +p(t) x' + q(t) x = g(t), \end{equation*}and \(x_h\) be the general solution of the corresponding homogeneous equation\begin{equation*} x'' +p(t) x' + q(t) x = 0. \end{equation*}Then the general solution to \(x'' +p(t) x' + q(t) x = g(t)\) is \(x = x_h + x_p\text{.}\) In particular, if the solution to \(x'' +p(t) x' + q(t) x = 0\) has a sink at the origin, all solutions of the equation \(x'' +p(t) x' + q(t) x = g(t)\) approach \(x_p(t)\) as \(t \to \infty\text{.}\)
- The Method of Undetermined Coefficients is useful for solving the equation \(x'' +p(t) x' + q(t) x = g(t)\text{,}\) when \(g\) is of the form\begin{equation*} g(t) = P_n(t) e^{\alpha t} \left\{\begin{array}{c} \sin \beta t \\ \cos \beta t \end{array}\right. \end{equation*}

Find the solution of the initial-value problem

\begin{align*}
y'' + 6y' + 8y & = \cos 3t\\
y(0) & = 0\\
y'(0) & = 0.
\end{align*}

Hint

The solution to the homogeneous equation \(y'' + 7y' + 10 y = 0\) is

\begin{equation*}
y_h = c_1 e^{-4t} + c_2 e^{-2t}.
\end{equation*}

Using the method of undetermined coefficients, we can find a particular solution

\begin{equation*}
y_p = \frac{2}{235}(18 \sin 3t- \cos 3t ).
\end{equation*}

Thus, the general solution is

\begin{equation*}
y = y_h + y_p = c_1 e^{-4t} + c_2 e^{-2t} + \frac{2}{235}(18 \sin 3t- \cos 3t ).
\end{equation*}

Applying the initial conditions \(y(0) = 0\) and \(y'(0) = 0\text{,}\) we have

\begin{equation*}
y = - \frac{16}{235} e^{-4t} + \frac{18}{235} e^{-2t} + \frac{2}{235}(18 \sin 3t- \cos 3t ).
\end{equation*}

Compute the solution of the initial value problem

\begin{gather*}
y'' + 4y = 3 \cos 2t\\
y(0) = y'(0) = 0.
\end{gather*}

Hint

The solution to the homogeneous equation, \(y'' + 4y = 0\) is

\begin{equation*}
y_h = c_1 \cos 2t + c_2 \sin 2t.
\end{equation*}

The complex version of the equation is

\begin{equation*}
y'' + 4y = 3e^{2it}.
\end{equation*}

Assume that the particular solution to this equation is \(y_c = a t e^{2it}\text{.}\) We include a factor of \(t\text{,}\) since \(e^{2it}\) is a solution to the homogeneous equation. Substituting \(y_c\) and \(y_c''\) into the differential equation, we have

\begin{equation*}
y_c'' + 4y_c = 4a(i - t)e^{2it} + 4 a t e^{2it} = 4 a i e^{2it} = 3e^{2it}.
\end{equation*}

Thus, \(a = 3/(4i) = -3i/4\text{.}\) Taking the real part of

\begin{equation*}
y_c = -\frac{3}{4} it (\cos 2t + i \sin 2t),
\end{equation*}

we have

\begin{equation*}
y_p = \frac{3}{4} t \sin 2t.
\end{equation*}

Therefore the general solution is

\begin{equation*}
y = y_h + y_p = c_1 \cos 2t + c_2 \sin 2t + \frac{3}{4} t \sin 2t.
\end{equation*}

Applying the initial conditions \(y(0) = y'(0) = 0\text{,}\) we find that \(c_1 = c_2 = 0\) and

\begin{equation*}
y = \frac{3}{4} t \sin 2t.
\end{equation*}

Use the complex method to find a particular solution to

\begin{equation*}
y'' + 7y' + 10 y = - 4 \sin 3t.
\end{equation*}

Write your solution as a function of cosine. What is the amplitude, the period, and the frequency of your solution?

Hint

If we assume that the complex solution has form \(y_c = A e^{3it}\text{,}\) then

\begin{equation*}
y_c'' + 7y_c' + 10 y_c = A(1 + 21i) e^{3it} = -4 e^{3it},
\end{equation*}

and

\begin{equation*}
A = \frac{-4}{1 + 21i} = \frac{-2 + 42 i}{221}.
\end{equation*}

In polar form,

\begin{equation*}
A = |A| e^{i \phi} = \frac{4}{\sqrt{442}} e^{i \phi},
\end{equation*}

where \(\phi = \pi + \arctan(-21)\text{.}\) Thus, \(y_c = A e^{3it} = 4 e^{i(3t + \phi)}/\sqrt{442}\text{.}\) Using the imaginary part of this solution, we obtain

\begin{equation*}
y = \frac{4}{\sqrt{442}} \sin{ 3t + \phi} = \frac{4}{\sqrt{442}} \cos(3t - \theta),
\end{equation*}

where \(\theta = \phi - \pi/2 = \pi/2 + \arctan(-21)\text{.}\) The amplitude is \(4/\sqrt{442}\text{,}\) the period is \(2 \pi/3\text{,}\) and the frequency is \(3 / 2 \pi\text{.}\)

We define two functions, \(f(t)\) and \(g(t)\text{,}\) to be *linearly independent* on an open interval \(I = (a, b)\) if there do not exist nonzero constants \(c_1\) and \(c_2\) such that

\begin{equation*}
c_1 f(t) + c_2 g(t) = 0
\end{equation*}

for all \(t \in I\text{.}\) Otherwise, \(f(t)\) and \(f(t)\) are *linearly dependent*. Suppose that \(f(t)\) and \(g(t)\) are solutions to the homogeneous linear equation

\begin{equation*}
y'' + p y' + q y = 0.
\end{equation*}

Show that \(f(t)\) and \(g(t)\) are linearly dependent on an interval \(I = (a, b)\) if and only if \(W[f, g](t) \equiv 0\text{.}\)

Hint

Suppose that that \(f(t)\) and \(g(t)\) are linearly dependent on an interval \(I = (a, b)\text{.}\) Then one function is a multiple of the other, say \(f(t) = c g(t)\text{.}\) Thus, \(f'(t) = cg'(t)\text{.}\)

\begin{equation*}
W(f, g)(t)
=
\det
\begin{pmatrix}
f(t) & g(t) \\
f'(t) & g'(t)
\end{pmatrix}
= f(t) g'(t) - f'(t) g(t)
= c g(t) g'(t) - cg'(t) g(t)
=
0.
\end{equation*}

Conversely, suppose that

\begin{equation*}
W(f, g)(t)
=
\det
\begin{pmatrix}
f(t) & g(t) \\
f'(t) & g'(t)
\end{pmatrix}
= 0,
\end{equation*}

for all \(t\) in \((a, b)\text{.}\) If \(g = 0\text{,}\) then \(0 f = g\) and the two functions are linearly dependent. Assume that \(g(t_0) \neq 0\) for some \(t_0\) in \((a, b)\text{.}\) Since \(g\) is differentiable, it must also be continuous and there is some interval \((c, d)\) contained in \((a, b)\) such that \(t_0 \in (c, d)\) and \(g\) does not vanish on this interval. Therefore,

\begin{equation*}
\frac{d}{dt} \left( \frac{f}{g} \right) = \frac{f' g - f g'}{g^2} = - \frac{W(f,g)}{g^2} = 0,
\end{equation*}

and \(f/g\) is constant on the interval \((c, d)\text{.}\) Thus, \(f(t_0) = c g(t_0)\) and \(f(t'_0) = c g'(t_0)\text{.}\) Since \(f\) and \(cg\) are both solutions to the differential equation \(y'' + p y' + q y = 0\) and have the same initial condition, \(f(t) = cg(t)\) for all \(t \in (a, b)\) by the existence and uniqueness theorem. Consequently, \(f\) and \(g\) are linearly dependent.

*Abel's Theorem*. If \(y_1\) and \(y_2\) are solutions of the homogeneous equation

\begin{equation*}
y'' + p(t) y' + q(t) y = 0,
\end{equation*}

where \(p\) and \(q\) are continuous on an open interval \(I = (a, b)\text{,}\) show that

\begin{equation*}
W[y_1, y_2](t) = c \exp\left( - \int p(t) \, dt \right),
\end{equation*}

for some constant \(c\) that depends on \(y_1\) and \(y_2\) but not on \(t\text{.}\)

- Use Abel's Theorem to find the Wronskian of \(2 t^2 y'' + 3ty' - y = 0\) up to a constant multiple, where \(t \gt 0\text{.}\)
- Prove Abel's Theorem.

Hint

- We can rewrite \(2 t^2 y'' + 3ty' - y = 0\) as\begin{equation*} y'' + \frac{3}{2t} y' - \frac{1}{2t^2} y = 0. \end{equation*}Since \(p(t) = 1/2t\text{,}\) Abel's Theorem tells us that\begin{equation*} W[y_1, y_2](t) = c \exp\left( - \int \frac{3}{2t} \, dt \right) = c \exp\left( - \frac{3}{2} \ln t \right) = ct^{-3/2}. \end{equation*}
- Since \(y_1\) and \(y_2\) are solutions to our differential equation, we know that\begin{gather*} y_1'' + p(t) y_1' + q(t) y_1 = 0\\ y_2'' + p(t) y_2' + q(t) y_2 = 0. \end{gather*}Multiplying the first equation by \(y_2\) and the second equation by \(y_1\) and subtracting, we obtain\begin{equation} (y_1 y_2'' - y_1'' y_2) + p(t) (y_1 y_2' - y_1' y_2) = 0.\label{equation-exercise-secondorder02-abel-hint}\tag{4.12} \end{equation}If\begin{equation*} W(t) = W(y_1, y_2)(t) = y_1 y_2' - y_1' y_2, \end{equation*}then\begin{equation*} W' = y_1 y_2'' - y_1'' y_2, \end{equation*}and equation (4.12) becomes\begin{equation*} W'' + p(t) W = 0. \end{equation*}This equation is separable with solution\begin{equation*} W(t) = c \exp\left( - \int p(t) \, dt \right), \end{equation*}

*The Method of Variation of Parameters*. In this problem we will describe another method of finding a particular solution to a nonhomogeneous equation,

\begin{equation}
y'' + p(t) y' + q(t) y = f(t),\label{equation-exercise-secondorder02-variation-of-parameters}\tag{4.13}
\end{equation}

if we know know that the general solution to the homogeneous equation \(y'' + p(t) y' + q(t) y = 0\) is

\begin{equation*}
y_h = c_1 y_1 + c_2 y_2.
\end{equation*}

- Assume that a particular solution of (4.13) has the form\begin{equation*} y_p(t) = u_1(t) y_1(t) + u_2(t) y_2(t), \end{equation*}where\begin{equation*} u_1'(t) y_1(t) + u_2'(t) y_2(t)=0. \end{equation*}Substitute \(y_p\) into the left-hand side of (4.13) to show that\begin{equation*} u_1'(t) y_1'(t) + u_2'(t) y_2'(t) = f(t). \end{equation*}
- Show that\begin{align*} u_1'(t) & = \frac{- y_2(t) f(t)}{W[y_1, y_2](t)}\\ u_2'(t) & = \frac{y_1(t) f(t)}{W[y_1, y_2](t)}, \end{align*}where \(W[y_1, y_2](t) = y_1(t) y_2'(t) - y_2(t) y_1'(t)\) is the
*Wronskian*of \(y_1\) and \(y_2\text{.}\) - If \(p\text{,}\) \(q\text{,}\) and \(f\) are continuous on an interval \(I\text{,}\) show that\begin{align*} u_1(t) & = - \int_{t_0}^t \frac{y_2(s) f(s)}{W[y_1, y_2](s)} \, ds\\ u_2(t) & = \int_{t_0}^t \frac{ y_1(s) f(s)}{W[y_1, y_2](s)} \, ds \end{align*}for any point \(t_0\) in \(I\text{.}\) Consequently, a particular solution to (4.13) is\begin{equation*} y_p = -y_1(t) \int_{t_0}^t \frac{ y_2(s) f(s)}{W[y_1, y_2](s)} \, ds + y_2(t) \int_{t_0}^t \frac{ y_1(s) f(s)}{W[y_1, y_2](s)} \, ds. \end{equation*}
- Find the general solution of the differential equation\begin{equation*} y'' + 4y = 3 \csc t. \end{equation*}

Hint

- If \(y_p = u_1y_1 + u_2 y_2\text{,}\) then\begin{gather*} y_p' = u_1' y_1 + u_1 y_1' + u_2' y_2 + u_2 y_2' = u_1 y_1' + u_2 y_2'\\ y_p'' = u_1' y_1' + u_1 y_1'' + u_2' y_2' + u_2 y_2''. \end{gather*}Substituting these expressions into equation (4.13), we have\begin{align*} y_p'' + p y_p' + q y_p & = ( u_1' y_1' + u_1 y_1'' + u_2' y_2' + u_2 y_2'') + p(u_1 y_1' + u_2 y_2')\\ & + q(u_1y_1 + u_2 y_2)\\ & = u_1[y_1'' + p y_1' +q y_1] + u_2[y_2'' + p y_2' +q y_2] + u_1' y_1' + u_2' y_2'\\ & = u_1' y_1' + u_2' y_2'\\ & = f(t). \end{align*}
- If we solve the system\begin{align*} u_1'(t) y_1(t) + u_2'(t) y_2(t) & = 0\\ u_1'(t) y_1' (t)+ u_2'(t) y_2'(t) & = f(t). \end{align*}for \(u_1'\) and \(u_2'\text{,}\) we obtain\begin{align*} u_1'(t) & = \frac{- y_2(t) f(t)}{W[y_1, y_2](t)}\\ u_2'(t) & = \frac{y_1(t) f(t)}{W[y_1, y_2](t)}. \end{align*}
- Integrate the two equations from part (2).
- The general solution to the homogeneous equation \(y'' + 4y = 0\) is\begin{equation*} y_h = c_1 \cos 2t + c_2 \sin 2t. \end{equation*}To find a particular solution, assume that the solution has the form\begin{equation*} y_p = u_1(t) \cos 2t + u_2(t) \sin 2t. \end{equation*}By part (2)\begin{align*} u_1'(t) & = -3 \cos t\\ u_2'(t) & = \frac{3}{2} \csc t - 3 \sin t. \end{align*}Integrating, we obtain\begin{align*} u_1(t) & = -3 \sin t\\ u_2(t) & = \frac{3}{2} \ln| \csc t - \cot t| + 3 \cos t. \end{align*}Therefore,\begin{align*} y_p(t) & = u_1(t) y_1(t) + u_2(t) y_2(t)\\ & = -3 \sin t \cos 2t + \left[\frac{3}{2} \ln| \csc t - \cot t| + 3 \cos t\right] \sin 2t, \end{align*}and the general solution is\begin{align*} y & = y_h + y_p\\ & = c_1 \cos 2t + c_2 \sin 2t -3 \sin t \cos 2t + \left[\frac{3}{2} \ln| \csc t - \cot t| + 3 \cos t\right] \sin 2t. \end{align*}