# Why are the solutions to second order differential equations summed?

I'm an A-Level maths student, and earlier in the year we learnt about second order differential equations in the form $A\frac{d^2y}{dx^2} + B \frac{dy}{dx} + Cy = 0$ and $A\frac{d^2y}{dx^2} + B \frac{dy}{dx} + Cy = f(x)$

For the first form, we let $y = e^{mx}$ (1), then $\frac{dy}{dx} = me^{mx}$ and $\frac{d^2y}{dx^2} = m^2e^{mx}$. This means $Am^2 + Bm + C = 0$ (2). Substituting the solutions into (1) gives us $y=e^{m_0 x}$ and $y=e^{m_1 x}$, where $m_0$ and $m_1$ are the solutions to (2). From this, we somehow conclude that $y = c_1e^{m_0 x} + c_2e^{m_1 x}$

But what I don't understand is, where to the constants come from, and why are the two solutions summed?

Regarding the second form of the equation, the above method breaks down because we cannot solve the quadratic. Why can we ignore the $f(x)$ at this stage?

When $f(x)$ is present, we come up with a different solution (with no constants) called the particular integral. Where does the particular integral come from, and why is that also added to the other solution we obtained by ignoring the $f(x)$?

-
Try plugging in just $y = c_1 e^{m_0x}$ alone into the ODE and see what happens if you don't use the other solution. If the quadratic can't be solved, you will go into imaginary numbers –  Hawk Jun 21 '12 at 23:09

The constants you get are arbitrary integration constants. When you take indefinite integrals, you always have a $+C \,$ term at the end, which can be any arbitrary constant. The method you use to solve differential equations is fundamentally the same, so you're left with a few integration constants. In this case, that number is 2, since the highest order derivative is a second order one.

Both multiplication by constants and differentiation are linear operators. Hence, $A(c_1 y_1+c_2 y_2)''+B(c_1 y_1+c_2 y_2)'+C(c_1y_1+c_2y_2)=c_1(Ay_1''+By_1'+Cy_1)+c_2(Ay_2''+By_2'+Cy_2)$. That is to say, if $y_1$ and $y_2$ both satisfy the differential equation $Ay''+By'+Cy=0$, then so does $c_1 y_1+c_2 y_2$. Since we know there should be two independent integration coefficients, if $y_1$ and $y_2$ are independent then this is the general solution.

To solve the inhomogenous equation with $f(x)$ on the right hand side, remember again the linearity property. So if $c_1 y_1+c_2 y_2$ is the general solution for $Ay''+By'+Cy=0$, and $y_p$ is any solution to $Ay''+By'+Cy=f(x)$, then $c_1 y_1+c_2 y_2+y_p$ will also solve $Ay''+By'+Cy=f(x)$ since $A(c_1 y_1+c_2 y_2+y_p)''+B(c_1 y_1+c_2 y_2+y_p)'+C(c_1y_1+c_2y_2+y_p)=c_1(Ay_1''+By_1'+Cy_1)+c_2(Ay_2''+By_2'+Cy_2)+Ay_p''+By_p'+Cy_p=f(x)$.

This works in reverse also, if $y_p$ and $y_q$ are two solutions to the inhomogenous equation, then their difference must be of the form $c_1 y_1+c_2 y_2$ for some $c_1, c_2$, so this is the most generic solution possible.

-

Let $Ay''+By'+Cy=L(y)$. Then, our original equation becomes $L(y)=f(x)$

Now, we can prove that $L(c_1y+c_2z)=c_1L(y)+c_2L(z)$. This property is called Linearity.

So if $e^{m_0x}$ and $e^{m_1x}$ are two solutions to the second order differential equation $L(y)=0$, then ALL linear combinations of $e^{m_0x}$ and $e^{m_1x}$ are solutions (since by linearity, the sum will always be $0$).

Using this, assume, $y$ is a general solution to $L(y)=0$ and $z$ is a particular solution to $L(z)=f(x)$. Then, $L(y+z)=L(y)+L(z)=f(x)$. In other words, we can show that $y+z$ is a solution since $L$ satisfies linearity.

-

Let $y_0$ be a fixed solution of $Ay''+By'+Cy=f(x)$, and let $y_1$ be another solution of the same equation.

Then it is easy to verify by substitution that $y_1-y_0$ satisfies the equation $Ay''+By'+Cy=0$.

Note that $y_1=y_0+(y_1-y_0)$. So $y_1$ is the particular solution of the original DE, plus a solution of the homogeneous equation $Ay''+By'+Cy=0$.

Conversely, if $y_0$ is any solution of the original equation, and $y_h$ is any solution of the homogeneous equation $Ay''+By'+Cy=0$, we can easily verify that $y_0+y_h$ is a solution of the original equation $Ay''+By'+Cy=f(x)$: just substitute and calculate.

As to the $c_1e^{m_1 x}+c_2e^{m_2 x}$ stuff, just substitute this in the expression $Ay''+By'+Cy$ and compute. After a while you will get $0$.

We leave for now the non-trivial bit, which is to show that all solutions of the homogeneous equation have shape $c_1e^{m_1 x}+c_2e^{m_2 x}$. This is not even quite true, if $m_1=m_2$.

-

This is closely related to linear algebra. In particular, think of everything you know about solving a system of linear equations.

For example, how might you go about writing all of the solutions to $3x + 4y + 5z = 1$? Well, you could solve for $z$ and say the solutions are everything of the form

$$(x, y, \frac{1}{5} - \frac{3}{5} x - \frac{4}{5} y)$$

and depending on your application, you might split it out into

$$(0, 0, \frac{1}{5}) + x \cdot (1, 0, -\frac{3}{5}) + y \cdot (0, 1, -\frac{4}{5})$$

If you did this sort of thing a lot, you might have been able to come up with this final form immediately -- by finding a particular point on the plane, and identifying the other two vectors as solutions to the homogeneous equation $3x + 4y + 5z = 0$.

The reason you spend a lot of effort on linear ordinary differential equations is because all of the same theory applies. We know a lot about linear systems, and they appear a lot whether naturally or because we went through effort to make them appear. The ideas you describe in your question are directly analogous to the what I did above in solving the equation of a plane. A second order linear differential equation is a linear equation whose solution set has two degrees of freedom.

-