Linear ODEs with constant coefficients

We wish to solve a differential equation like x¨+ax˙+bx=c\ddot x + a \dot x + b x = c. We start by finding the characteristic polynomial, in this case λ2+aλ+b=0\lambda^2 + a\lambda + b = 0.

Our ansatz is x=Aeλtx = A e^{\lambda t}. We solve the characteristic polynomial for λ\lambda above and plug it into this solution. There are several cases depending on the roots of λ\lambda.

  • If we get distinct real roots for λ\lambda, our life is easy, we just plug them into our solution.

  • If we get complex roots, our life is not much harder. When λ=a+ib\lambda = a +ib, a real solution can be written as ARe(eλt)+BIm(eλt)=ea(Acosbt+Bsinbt)A\, \mathrm{Re}(e^{\lambda t}) + B\, \mathrm{Im}(e^{\lambda t}) = e^a( A \cos bt + B \sin bt).

  • If a root has multiplicity greater than one, we must write the solution as (A+Bt)eλt(A+Bt)e^{\lambda t}. This is to ensure we still get the correct number of free parameters based on our initial conditions. Plug in and check that this is a solution, if you are unsure.

These are all solution to the corresponding homogenous ODE, i.e. where c=0c=0. Because we have an inhomogenous term, we also have a particular inhomogenous solution. We see that x=cbx=\frac cb is such a solution. The general solution is then a superposition of the homogenous and inhomogenous solutions.

One application of 2nd order linear ODEs is finding the behavior damped oscillators.

Tip

To check that you have found all solutions make sure you have as many free variables as the degree of the ODE.