## Section4.3Sinusoidal Forcing

If we consider different forcing functions $$g(t)$$ for the equation

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

functions that are periodic are especially important. Recall that a function $$g(t)$$ is periodic if

\begin{equation*} g(t + T) = g(t) \end{equation*}

for all $$t$$ and some fixed constant $$T\text{.}$$ The most familiar periodic functions are

\begin{equation*} g(t) = \sin \omega t \mbox{ and } g(t) = \cos \omega t. \end{equation*}

The period for each of these two functions is $$2 \pi / \omega$$ and the frequency is $$\omega / 2 \pi\text{.}$$ These two functions share the additional property that their average value is zero. That is,

\begin{equation*} \frac{1}{T} \int_0^T g(t) \, dt = 0. \end{equation*}

We say that sinusoidal forcing occurs in the differential equation

\begin{equation*} x'' + px' + qx = A \cos \omega t + B \sin \omega t. \end{equation*}

### Subsection4.3.1Complexification

Given a second-order linear differential equation

\begin{equation*} a x'' + bx' + cx = A \cos \omega t + B \sin \omega t, \end{equation*}

we can use Euler's formula, $$e^{i \beta t} = \cos \beta t + i \sin \beta t$$ to derive a particular solution. That is, we will assume that our particular solution has the form

\begin{equation*} x_c = x_\text{Re} + i x_\text{Im} \end{equation*}

and use the properties of complex numbers. 1

Let us consider the equation

\begin{equation} x'' + 6 x' + 5x = \sin 2t.\tag{4.3.1} \end{equation}

The solution to the corresponding homogeneous equation, $$x'' + 6 x' + 5x = 0\text{,}$$ is

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

To find a particular solution, we can use the method of undetermined coefficients and assume that the solution has the form

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

If we carry out the appropriate calculations, we will obtain a particular solution

\begin{equation*} x_p = - \frac{12}{145} \cos 2t + \frac{1}{145} \sin 2t. \end{equation*}

Thus, the general solution is

\begin{equation*} x = x_h + x_p = c_1 e^{-5t} + c_2 e^{-t} - \frac{12}{145} \cos 2t + \frac{1}{145} \sin 2t. \end{equation*}

Notice that all solutions of (4.3.1) will approach the particular solution as $$t \to \infty\text{.}$$

Now let us solve (4.3.1) using complex numbers. If we assume that the equation has a complex solution of the form $$x_c = x_\text{Re} + i x_\text{Im}\text{,}$$ then

\begin{align*} \frac{d^2}{dt^2} x_c+ 6 \frac{d}{dt} x_c + 5 x_c & = \frac{d^2}{dt^2} (x_\text{Re} + i x_\text{Im}) + 6 \frac{d}{dt} (x_\text{Re} + i x_\text{Im}) + 5 (x_\text{Re} + i x_\text{Im})\\ & = e^{2it}\\ & = \cos 2t + i \sin 2t. \end{align*}

Equating the real and imaginary parts of this equation, we obtain

\begin{align*} x''_\text{Re} + 6 x'_\text{Re} + 5 x_\text{Re} & = \cos 2t\\ x''_\text{Im} + 6 x'_\text{Im} + 5 x_\text{Im} & = \sin 2t. \end{align*}

Thus, if we can find a complex solution, we can find a solution to

\begin{equation*} x'' + 6x' + 5x = \sin 2t \end{equation*}

simply by examining the imaginary part of the solution.

Now let us assume that our solution has the form $$x_c = A e^{2it}\text{.}$$ Then

\begin{align*} x_c''+ 6 x_c' + 5 x_c & = - 4 A e^{2it} + 12 A i e^{2it} + 5 A e^{2it}\\ & = (1 + 12i) A e^{2it}\\ & = (1 + 12i) A (\cos 2t + i \sin 2t). \end{align*}

Equating the real and imaginary parts of this equation, we obtain

\begin{align*} x''_\text{Re} + 6 x'_\text{Re} + 5 x_\text{Re} & = \cos 2t\\ x''_\text{Im} + 6 x'_\text{Im} + 5 x_\text{Im} & = \sin 2t \end{align*}

and we immediately see that

\begin{equation*} A = \frac{1}{1 + 12i} = \frac{1}{145} - \frac{12}{145} i. \end{equation*}

Therefore, the complex solution to

\begin{equation*} x'' + 6 x' + 5x = e^{2it} \end{equation*}

is

\begin{align*} x_c & = A e^{2it}\\ & = \left( \frac{1}{145} - \frac{12}{145} i\right) \cdot (\cos 2t + i \sin 2t)\\ & = \left( \frac{1}{145} \cos 2t + \frac{12}{145} \sin 2t \right) + i \left( -\frac{12}{145} \cos 2t + \frac{1}{145} \sin 2t \right). \end{align*}

The imaginary part of this function is

\begin{equation*} x_\text{Im} = -\frac{12}{145} \cos 2t + \frac{1}{145} \sin 2t, \end{equation*}

which is the particular solution that we have been seeking. Thus, our general solution agrees with what we found in Example 4.3.1.

#### Activity4.3.1.Second-Order Linear Differential Equations and Complexification.

Find (1) a particular solution and (2) a general solution for each of the following differential equations.

##### (a)

$$x'' + 4x' - 21x = 2 e^{4t}$$

##### (b)

$$x'' + 4x' - 21x = 3e^{3t}$$

##### (c)

$$x'' - 4x' + 20x = 3 \sin 3t$$

##### (d)

$$x'' - 4x' + 20x = 2 e^{2t} \cos 4t$$

##### (e)

$$x'' - 14 x' + 49 x = \sin 3t$$

### Subsection4.3.2Qualitative Analysis

We can use the complex solution of $$a x'' + bx' + cx = A \cos \omega t + B \sin \omega t$$ to analyze the qualitative behavior of solutions.

We discovered that the complex solution of

\begin{equation*} x'' + 6 x' + 5x = e^{2it} \end{equation*}

to be $$x_c = A e^{2it}\text{,}$$ where $$A = (1 - 12i)/145\text{.}$$ Let us rewrite $$A$$ in polar form. Since

\begin{equation*} |A| = \frac{1}{\sqrt{145}}, \end{equation*}

we know that

\begin{equation*} A = \frac{1}{\sqrt{145}} e^{i \theta}, \end{equation*}

where $$\theta = \arctan(-12) \approx -1.4877\text{.}$$ Therefore,

\begin{equation*} x_c = A e^{2it} = \frac{1}{\sqrt{145}} e^{i \theta} e^{2it} = \frac{1}{\sqrt{145}} e^{i (2t + \theta)}. \end{equation*}

Our particular solution is the imaginary part of $$x_c\text{,}$$

\begin{equation*} x_p(t) = \frac{1}{\sqrt{145}} \sin(2t + \theta) = \frac{1}{\sqrt{145}} \cos\left(2t + \theta - \frac{\pi}{2} \right) = \frac{1}{\sqrt{145} }\cos\left(2t - \phi \right), \end{equation*}

where $$\phi \approx 3.058451\text{.}$$ We say that $$\phi$$ is the phase angle of our solution. The amplitude of our solution is $$1/\sqrt{145}$$ and the period is $$\pi$$ (Figure 4.3.4). Figure 4.3.4. Steady state solution to $$x'' + 6 x' + 5x = \sin 2t$$

#### Activity4.3.2.Finding Particular Solutions of the Form $$y_p = A \cos(\omega t - \phi)$$.

Consider the differential equation

\begin{equation} y'' + 10 y' + 34 y = \sin 2t.\tag{4.3.2} \end{equation}
##### (a)

Find the general solution to the homogeneous equation $$y'' + 10 y' + 34 y = 0\text{.}$$

##### (b)

Find the complex solution particular solution, $$y_c$$ to $$y'' + 10 y' + 34 y = e^{2it}\text{.}$$ That is, find $$a$$ for $$y_p = a e^{2it}\text{.}$$

##### (c)

Determine $$A$$ and $$B\text{,}$$ so that $$y_p = A \cos 2t + B \sin 2t$$ is a particular solution to (4.3.2)

##### (d)

Write $$a$$ from Task 4.3.2.b in polar form, $$|a| e^{i \theta}$$ to obtain the solution $$y_c = |a| e^{2t + \theta}\text{.}$$

##### (e)

Find a real particular solution in the form $$y_p = A \cos(\omega t - \phi)\text{.}$$

##### (f)

Plot the solution you found in Task 4.3.2.e, labeling the amplitude, period, and frequency of your solution.

The corresponding first order system for the differential equation

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

is

\begin{align*} x' & = y\\ y' & = -qx -py +g(t). \end{align*}

This is a nonautonomous system, and the tangent vector of a solution curve in the phase plane depends not only on the position $$(x, y)\text{,}$$ but also on the time $$t\text{.}$$ In other words, the direction field changes with time. Since the direction field changes with time, two solutions with the same $$(x,y)$$ value at different times can follow different paths. Consequently, solutions can cross each other in the $$xy$$-plane without violating the Existence and Uniqueness Theorem.

Consider the harmonic oscillator that is modeled by the differential equation

\begin{equation} x'' + 2x' + 17x = - 2 \sin 3t.\tag{4.3.3} \end{equation}

The solution to the homogeneous equation $$x'' + 2x' + 17x = 0$$ is

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

The complex version of this equation is

\begin{equation*} x'' + 2x' + 17x = -2 e^{3it}, \end{equation*}

and we will use the Method of Undetermined Coefficients and assume that we can find a particular solution of the form $$x_c = A e^{3it}\text{.}$$ Substituting $$x_c$$ into equation (4.3.3), we find that

\begin{equation*} (8 + 6i) A e^{3it} = -2 e^{3it}. \end{equation*}

Thus, $$x_c$$ is a solution if

\begin{equation*} A = \frac{-2}{8 + 6i} = - \frac{4}{25} + \frac{3}{25} i \end{equation*}

We have

\begin{align*} x_c(t) & = \left(- \frac{4}{25} + \frac{3}{25} i \right) (\cos 3t + i \sin 3t)\\ & = \left( - \frac{4}{25} \cos 3t - \frac{3}{25} \sin 3t \right) + i \left( \frac{3}{25} \cos 3t - \frac{4}{25} \sin 3t \right). \end{align*}

The imaginary part of this function is the solution that we seek,

\begin{equation*} x_p = \frac{3}{25} \cos 3t - \frac{4}{25} \sin 3t. \end{equation*}

Thus, the general solution to (4.3.3) is

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

Now suppose that $$x(0) = 0$$ and $$x'(0) = 0\text{.}$$ We can quickly determine that

\begin{equation*} x'(t) = c_1 e^{-t}(- \cos 4t - 4 \sin 4t) + c_2 e^{-t}( 4\cos 4t - \sin 4t) - \frac{12}{25} \cos 3t - \frac{9}{25} \sin 3t \end{equation*}

To solve this initial value problem, we must solve the linear system

\begin{align*} c_1 + \frac{3}{25} \amp = 0\\ - c_1 + 4 c_2 - \frac{12}{25} \amp = 0. \end{align*}

We obtain $$c_1 = -3/25$$ and $$c_2 = 9/100\text{,}$$ and the solution to our initial value problem is

\begin{align*} x(t) & = -\frac{3}{25} e^{-t}(- \cos 4t - 4 \sin 4t) + \frac{3}{20} e^{-t}( 4\cos 4t - \sin 4t) - \frac{12}{25} \cos 3t - \frac{9}{25} \sin 3t\\ & = -\frac{3}{100} (4 \cos 4t - 3 \sin 4t)) e^{-t} - \frac{12}{25} \cos 3t - \frac{9}{25} \sin 3t \end{align*}

The graph of our solution is given in Figure 4.3.6. Figure 4.3.6. Solution to $$x'' + 2x' + 17x = - 2 \sin 3t\text{,}$$ $$x(0) = 0\text{,}$$ $$x'(0) = 0$$

Since $$y = x'(t)\text{,}$$ we can now graph the solution curve in the phase plane (Figure 4.3.7). Notice how the solution curve can intersect itself. The restoring force and damping are proportional to $$x$$ and $$y = x'\text{,}$$ respectively. When $$x$$ and $$y$$ are close to the origin, the external force is as large or larger than the restoring and damping forces. In this part of the $$xy$$-plane, the external force overcomes the damping and pushes the solution away from the origin. Figure 4.3.7. Phase Plane for $$x'' + 2x' + 17x = - 2 \sin 3t\text{,}$$ $$x(0) = 0\text{,}$$ $$x'(0) = 0$$

On the other hand, suppose we have initial conditions $$x(0) = 2$$ and $$x'(0) = 2\text{,}$$ we can solve the linear system

\begin{align*} c_1 + \frac{3}{25} \amp = 2\\ -4 c_1 - c_2 - \frac{9}{25} \amp = 2. \end{align*}

to obtain $$c_1 = 47/25$$ and $$c_2 = 109/100\text{.}$$ Thus, solution to our initial value problem is

\begin{equation*} x(t) = \frac{47}{25} e^{-t} \cos 4t + \frac{109}{100} e^{-t} \sin 4t + \frac{3}{40} \cos 2t - \frac{3}{20} \sin 2t. \end{equation*}

The graph of our solution is given in Figure 4.3.8. Figure 4.3.8. Solution to $$x'' + 2x' + 17x = - 2 \sin 3t\text{,}$$ $$x(0) = 2\text{,}$$ $$x'(0) = 2$$

If we examine the phase plane for this solution (Figure 4.3.9), we see that the initial damping and restoring forces are much larger than the external force. Thus, if we are far from the origin, the solutions in the $$xy$$-plane tend to spiral towards the origin and are similar to the solutions of the unforced equation. Figure 4.3.9. Phase Plane for $$x'' + 2x' + 17x = - 2 \sin 3t\text{,}$$ $$x(0) = 2\text{,}$$ $$x'(0) = 2$$

### Subsection4.3.3Important Lessons

• The functions $$\sin \omega t$$ and $$\cos \omega t$$ are periodic with period $$2 \pi / \omega$$ and frequency $$\omega / 2 \pi\text{.}$$ These average value of each of these functions is zero.

• We can use Euler's formula and complexification to solve the equation

\begin{equation*} x'' + px' + qx = g(t), \end{equation*}
where the forcing function $$g(t)$$ is $$\sin \omega t$$ or $$\cos \omega t\text{.}$$ Furthermore, we can use complex numbers to express our solution in the form
\begin{equation*} x(t) = A \cos(\omega t - \phi), \end{equation*}
where $$A$$ is the amplitude of the solution, $$\omega / 2 \pi$$ is the frequency of the solution, and $$\phi$$ is the phase angle.

• If we write the equation

\begin{equation*} x'' + px' + qx = g(t), \end{equation*}
as a first-order system,
\begin{align*} x' & = y\\ y' & = -qx -py +g(t), \end{align*}
we obtain a nonautonomous system. In this case the direction field changes with time, and two solutions with the same $$(x,y)$$ value at different times can follow different paths. Therefore, solutions can cross each other without violating the Existence and Uniqueness Theorem.

• If we are far from the origin, the solutions in the $$xy$$-plane tend to spiral towards the origin and are similar to the solutions of the unforced equation. When $$x$$ and $$y$$ are close to the origin, the external force is as large or larger than the restoring and damping forces. In this part of the $$xy$$-plane, the external force overcomes the damping and pushes the solution away from the origin.

#### 1.

What does complexification mean?

#### 2.

Is it possible for solution curves to intersect in the phase plane of a nonautonomous system? Why or why not?

### Exercises4.3.5Exercises

#### Finding Particular Solutions.

Find a particular solution for each equation in Exercise Group 4.3.5.1–10 using complexification.

##### 1.

$$y'' + 4y = 3 \cos 2t$$

##### 2.

$$y'' + 7y' + 10 y = - 4 \sin 3t$$

Hint.

Assume the complex solution has form $$y_c = A e^{3it}\text{.}$$

##### 3.

$$\dfrac{d^2x}{dx^2} + 2 \dfrac{dx}{dt} + 2 x = 2 \cos 2t$$

##### 4.

$$x'' -2x' + 5x = 3 \cos t$$

##### 5.

$$y'' + 6y' + 7y= 3 \sin 2t$$

##### 6.

$$y'' + 4y' + 13y = 3 \cos 2t$$

##### 7.

$$y'' + 6y' + 8y = \cos 3t$$

##### 8.

$$\dfrac{d^2x}{dx^2} + 2 \dfrac{dx}{dt} + 3 x = 2 \sin 2t$$

##### 9.

$$u'' + 4 u' + 20 u = -3\sin 3t$$

##### 10.

$$u'' + 4 u' + 20 u = -\cos 5t$$

#### Finding Frequencies, Amplitudes, and Phase Angles.

Find a particular solution of the form $$y_p = A \cos(\omega t - \phi)$$ for each equation in Exercise Group 4.3.5.11–17 and determine the frequency $$\omega\text{,}$$ amplitude $$A\text{,}$$ and phase angle $$\phi$$ of the solution.

##### 11.

$$y'' + 4y = 3 \cos 2t$$

##### 12.

$$y'' + 7y' + 10 y = - 4 \sin 3t$$

Hint.

Assume the complex solution has form $$y_c = A e^{3it}\text{.}$$

##### 13.

$$\dfrac{d^2x}{dx^2} + 2 \dfrac{dx}{dt} + 2 x = 2 \cos 2t$$

##### 14.

$$x'' -2x' + 5x = 3 \cos t$$

##### 15.

$$y'' + 6y' + 7y= 3 \sin 2t$$

##### 16.

$$y'' + 4y' + 13y = 3 \cos 2t$$

##### 17.

$$y'' + 6y' + 8y = \cos 3t$$

#### Solving Initial Value Problems.

Solve the initial problems in Exercise Group 4.3.5.18–24 and discuss the long-term behavior of the solution.

##### 18.

$$y'' + 4y = 3 \cos 2t\text{,}$$ $$y(0) = 0\text{,}$$ $$y'(0) = 0$$

##### 19.

$$y'' + 7y' + 10 y = - 4 \sin 3t\text{,}$$ $$y(0) = 0\text{,}$$ $$y'(0) = 0$$

##### 20.

$$\dfrac{d^2x}{dx^2} + 2 \dfrac{dx}{dt} + 2 x = 2 \cos 2t\text{,}$$ $$x(0) = 0\text{,}$$ $$x'(0) = 0$$

##### 21.

$$x'' -2x' + 5x = 3 \cos t\text{,}$$ $$x(0) = 0\text{,}$$ $$x'(0) = 0$$

##### 22.

$$y'' + 6y' + 7y= 3 \sin 2t\text{,}$$ $$y(0) = 0\text{,}$$ $$y'(0) = 0$$

##### 23.

$$y'' + 4y' + 13y = 3 \cos 2t\text{,}$$ $$y(0) = 0\text{,}$$ $$y'(0) = 0$$

##### 24.

$$y'' + 6y' + 8y = \cos 3t\text{,}$$ $$y(0) = 0\text{,}$$ $$y'(0) = 0$$

You have attempted of activities on this page.
If complex numbers make you uncomfortable, the alternative is to become an expert in trigonometric identities