# General solution to an inhomogeneous ODE (trouble with integration by parts?)

Consider the simple inhomogeneous ODE:

$$a_1 \frac{dx(t)}{dt} + a_0 x(t) = f(t)$$

By substitution, show that the following is a solution (where $\lambda_1$ solves $a_1 \lambda_1 + a_0 = 0$, i.e. $\lambda_1 = -a_0/a_1$).:

$$x(0) e^{\lambda_1t} + \int_0^t e^{\lambda_1(t-t')}f(t')dt'$$

To start, I know that you need to substitute the above expression into the first equation as x(t):

$$a_1 \frac{d}{dt} \left[ x(0)e^{\lambda_1 t} + \int_0^t e^{\lambda_1 (t-t')} f(t')dt' \right] + a_0 \left( x(0)e^{\lambda_1 t} + \int_0^t e^{\lambda_1 (t-t')} f(t')dt' \right)$$

However, I don't know how to evaluate the definite integrals once I get to this step. My thought was to integrate by parts, is that the correct idea? Thank you and sorry for posting such a simple question.

-