# Inhomogeneous 2nd ODE

Tags:
1. Nov 25, 2015

### Tzabcan

If i have

3y" - 2y' -y = 14 + e2x+8x

And i want to find the general solution.

Obviously first i obtain the characteristic eqn, yc, by making it into a homogeneous eqn. Then i can get yp

BUT

Am i able to get yp for the e2x and the 14 + 8x separately, then add them together for yp?

Thanks

2. Nov 25, 2015

### pasmith

Yes, because the ODE is linear.

3. Nov 25, 2015

### Geofleur

I would like to expand a little on what pasmith said. Suppose that we have $y'' - 2y' - y = f(x) + g(x)$ where $f$ and $g$ are some functions, and further that we have found solutions $y_{p1}$ and $y_{p2}$ such that

$y''_{p1} - 2y'_{p1} - y_{p1} = f(x)$ and

$y''_{p2} - 2y'_{p2} - y_{p2} = g(x)$.

Then, if we define $y_p = y_{p1} + y_{p2}$, we will have

$y''_p - 2y'_p - y_p = (y_{p1}+y_{p2})'' - 2(y_{p1}+y_{p2})' - (y_{p1}+y_{p2}) = y''_{p1} + y''_{p2} - 2y'_{p1} - 2y'_{p2} - y_{p1} - y_{p2} = f(x) + g(x)$.

If we had somewhere in the differential equation a term like, say, $y^2$, the trick above would no longer work (I recommend trying it to see why).

4. Nov 28, 2015

### HallsofIvy

Staff Emeritus
An obvious "try" would be $y= Ax+ B+ Ce^{2x}$. Put that into the equation and solve for A, B, and C.