Math 240 Home,
Textbook Contents,
Online Homework Home

**Warning: MathJax
requires JavaScript to process the mathematics on this page.**

If your browser supports JavaScript, be sure it is enabled.**
****
**

### Second-Order Linear Inhomogeneous Equations

#### Additional Examples

Solve the initial value problem
$$
\begin{align}
\frac{d^2y}{dx^2} - 2\frac{dy}{dx} + 5y &= -2\sin(2x) \\
y(0) &= 4 \\
y'(0) &= 1
\end{align}
$$

*
If you have any problems with this page, please contact
bennett@math.ksu.edu.*

©2010, 2014 Andrew G. Bennett

If your browser supports JavaScript, be sure it is enabled.

This is a second-order linear constant-coefficient initial value problem.

**First, we find the general solution**

__Step 1: Find the homogeneous solution.__

*Substep 1: Write the equation in operator form.*
$$
(D^2 - 2D + 5)y = 0
$$
*Substep 2: Find the roots.*
We use the quadratic formula to compute the roots,
$
1\pm 2i$

*Substep 3: Write the homogeneous solutions.*
$$
y_h(x) = c_1\exp(x)\cos(2x) + c_2\exp(x)\sin(2x)
$$
__Step 2: Guess the form of the particular solutions__

Since the right-hand side is $-2\sin(2x),$ we guess $ y_p(x) = A\cos(2x) + B\sin(2x).$

__Step 3: Plug our guess into the equation and solve for the undetermined coefficients__

Plugging our guess for $ y_p(x)$ into the equation, we obtain $ (A - 4B)\cos(2x) + (4A + B)\sin(2x) = -2\sin(2x).$ This gives us the equations $A - 4B=0$ and $4A + B=-2.$ From these equations we get $A=-8/17$ and $B=-2/17.$ So we get
$$
y_p(x)=-(8/17)\cos(2x) - (2/17)\sin(2x).
$$
__Step 4: The general solution is the particular solution plus all the homogeneous solutions.__

So from the results of steps 1 and 3, we get the general solution is
$$
y(x) = -(8/17)\cos(2x) - (2/17)\sin(2x) + c_1\exp(x)\cos(2x) + c_2\exp(x)\sin(2x)
$$
**Second, we solve for the constants**

Now that we have the general solution, we plug in our initial values to find the solution to the initial value problem.
First we compute, $ y'(x) = -(4/17)\cos(2x) + (16/17)\sin(2x) + c_1\exp(x)\cos(2x) - 2c_1\exp(x)\sin(2x) + c_2\exp(x)\sin(2x) + 2c_2\exp(x)\cos(2x).$
Then we plug in $ x=0$ to get the following equations.
$$
\begin{align}
y(0) = -8/17 + c_1 &= 4 \\y'(0) = -4/17 + c_1 + 2c_2 &= 1
\end{align}
$$
We solve these equations to get $ c_1=76/17$ and $ c_2=-55/34.$
Finally, we plug our values for $ c_1$ and $ c_2$ into the general solution to find our solution to the initial value problem.
$$
y(x) = -(8/17)\cos(2x) - (2/17)\sin(2x) + (76/17)\exp(x)\cos(2x) - (55/34)\exp(x)\sin(2x).
$$
*You may reload this page to generate additional examples.
*

*
*

©2010, 2014 Andrew G. Bennett