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} - 7\frac{dy}{dx} &= -2x \\ y(0) &= 3 \\ y'(0) &= -4 \end{align} $$

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 - 7D)y = 0 $$ Substep 2: Find the roots. The equation factors into $ D(D - 7)y = 0.$ So our roots are 0 and 7.

Substep 3: Write the homogeneous solutions. $$ y_h(x) = c_1 + c_2\exp(7x) $$ Step 2: Guess the form of the particular solutions

Since the right-hand side is $-2x,$ we guess $ y_p(x) = Ax^2 + Bx.$

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 $ -14Ax - 7B + 2A = -2x.$ This gives us the equations $-14A=-2$ and $ - 7B + 2A=0.$ From these equations we get $A=1/7$ and $B=2/49.$ So we get $$ y_p(x)=(1/7)x^2 + (2/49)x. $$ 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) = (1/7)x^2 + (2/49)x + c_1 + c_2\exp(7x) $$ 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) = (2/7)x + 2/49 + 7c_2\exp(7x).$ Then we plug in $ x=0$ to get the following equations. $$ \begin{align} y(0) = c_1 + c_2 &= 3 \\y'(0) = 2/49 + 7c_2 &= -4 \end{align} $$ We solve these equations to get $ c_1=1227/343$ and $ c_2=-198/343.$ 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) = (1/7)x^2 + (2/49)x + 1227/343 - (198/343)\exp(7x). $$ You may reload this page to generate additional examples.


If you have any problems with this page, please contact bennett@math.ksu.edu.
©2010, 2014 Andrew G. Bennett