# Will all solutions of this ODE look like this?

Suppose that we have this ODE: $$ay'' + by' + cy = 0 \quad a,b,c \in \mathbb{R}$$ Then we have the characteristic polynomial: $$ak^2 +bk + c = 0$$ And we know that, if $k_1$ and $k_2$ are roots of that polynomial, then any L.C of $e^{k_1x}$ and $e^{k_2x}$ are solutions to the equation. My question is: Will all solutions of the equation be a linear combination of these two terms? If not, how can i verify it?

Another small question: Why do we start supposing that there is a $e^{kt}$ solution to the ODE to find the characteristic polynomial, and not some other function? Thanks.

• It's worth noting that, if the characteristic polynomial only has one solution, then it's a linear combination of $e^{kx}$ and $xe^{kx}$, rather than two distinct $e^{k_ix}$ terms. – Glen O Apr 20 '17 at 7:46
• @GlenO: See my answer for a proof of the general homogenous linear ODE that shows exactly what happens for roots with multiplicity. – user21820 Apr 20 '17 at 9:30
• @user21820 - I wasn't asking, and I wasn't stating it as "this needs to be in an answer". It was just an aside for Dovah-king because the format written in the question doesn't apply for the case of a single solution to the CP. – Glen O Apr 20 '17 at 13:44
• @GlenO: I understand that you were not asking, but as you just said, the stated question is incorrect for a multiple root, and I thought you and other readers might want to know that it is actually easy to derive the general solution rather than rely on guessing its form from scratch. Besides, your comment had left it ambiguous what happens for higher degree characteristic equations. =) – user21820 Apr 20 '17 at 13:51
• @user21820 - sometimes, it's better to keep things simpler. I know quite well how to derive general solutions (there are quite a few different ways to get there, including Laplace, Fourier, Differential Operator transformation, Integrating Factor, etc). But given that Dovah-king was asking about the simplest case, without separating out the special case, I naturally assume the level of mathematical knowledge, and didn't want to overcomplicate and cause confusion. – Glen O Apr 20 '17 at 14:16

Yes, all the solutions can be written in terms of two above-mentioned exponents. This is due to uniqueness of solution (or uniqueness of solution space) – the result known as Picard–Lindelöf_theorem.

As for your second question, the assumed general form of solution (e.g. exponential or trig or polynomial functions) is called ansatz. In this particular case it makes sense to try exponent first because linear combination of function and its derivatives is zero $\implies$ function and its derivatives have the same general form.

Using this logic it makes sense to try exponential or trigonometric ansatz. Since the first guess resulted in complete solution, and since the solution (space) is unique, we conclude that there are no more solutions of any form other that exponentials, thus obtained function(s) represent full solution space.

Edit (in reply to @Dovah-king comment):

For example let us consider polynomials. Assume solution is $n$ degree polynomial of the form $P_n(x)=\sum_{i=0}^n a_ix^i$, then its derivatives are polynomials of the power $n-1$ and $n-2$. If you substitute everything into expression $ay''+by'+cy=0\quad a,b,c\in\mathbb R$ you will see that the highest order term is $x^n$ from the first summand, whereas the second and the third ones have lower highest degree. Thus $a_nx^n$ cannot be canceled out, so $a_n$ must be zero. But it contradicts our assumption of solution polynomial having power $n$.

The exponents, on the other hand, have derivatives which look generally the same as original function. Thus, if you assume solution to be an exponential function, its derivatives will also be exponential functions, so it is possible for a linear combination of such function and its derivatives to be zero, i.e. to satisfy your equation $ay''+by'+cy=0$.

• This is what i was thinking. Thanks. Now, what about my "second" question? – embedded_dev Apr 19 '17 at 23:20
• @Dovah-king Here you go, I edited my answer. – Vlad Apr 19 '17 at 23:22
• I can't understand this part "because linear combination of function and its derivatives is zero ⟹⟹ function and its derivatives have the same general form." – embedded_dev Apr 19 '17 at 23:27
• @Dovah-king I could not fit my reply into a comment, so I appended it to the answer . – Vlad Apr 19 '17 at 23:40

Another small question: Why do we start supposing that there is a ektekt solution to the ODE to find the characteristic polynomial, and not some other function? Thanks.

Because the exponential function is the only function that looks like itself when differentiated. Since a constant-coefficient ODE is a linear combination of an unknown function and its derivatives, it seems reasonable that the unknown is of the form $e^{kx}$. Note that when the coefficients of the ODE are variable, the ansatz $y = c e^{kx}$ doesn't work any longer.

• Strictly speaking the trigonometric functions also look like themselves when differentiated, but they in turn can be represented in terms of exponents :-) – Vlad Apr 19 '17 at 23:27
• @Vlad indeed, just let $k$ be a complex number. Trigonometric (and hyperbolic functions) are nothing but exponentials! – Dmoreno Apr 20 '17 at 0:32

You can actually show this using only that the derivative of a function is zero if and only if it is constant, the exponential function differentiates to almost itself, and some ingenuity. Suppose that the equation starts in the equivalent form $$y'' - (r_1+r_2)y' + r_1r_2 y =0. \tag{1}$$ (Obviously $r_1$ and $r_2$ are the roots of the characteristic equation, but we can do this to any quadratic, so we can do it to the original equation. Also, $r_1$ and $r_2$ are not necessarily distinct, but we'll come back to this). Now, we're all happy that $y=e^{r_1 x}$ is a solution. So—and here's the clever bit—what conditions does $y=u(x)e^{r_1 x}$ have to satisfy to be a solution? (Why consider this? We know $Ae^{r_1x}$ is a solution for constant $A$, so it seems sensible to ask what happens if we have more than a constant.) We stick it into the equation (1) and see what happens: $$0= y''- (r_1+r_2)y' + r_1r_2 y = e^{r_1x}\left((u''+2r_1u'+r_1^2u) -(r_1+r_2)(u'+r_1u) +r_1r_2 u \right) \\ = e^{r_1x}\left(u''+(r_1-r_2)u' \right)$$ Since $e^{r_1x}$ never vanishes, we find that $u$ satisfies $$u'' + (r_1-r_2)u' = 0. \tag{2}$$ Now there are two cases. Suppose the roots are equal. Then the differential equation reduces to $u''=0$. Hence $u'=A$ for some constant $A$, since the only function with derivative zero is a constant. But then $0=u'-A=(u-Ax)'$, so $u-Ax$ has derivative zero, and it must be a constant $B$. Hence in this case, the only possible form of solution for $u$ is $u=Ax+B$, so the only possible solutions are $y=(Ax+b)e^{r_1x}$.

Suppose now the roots are not equal. Then it's a bit more difficult. But notice that if we multiply by the never-zero $e^{(r_1-r_2)x}$, the left-hand side of (2) may be written as $(e^{(r_1-r_2)x}u')',$ and so (2) becomes $$(e^{(r_1-r_2)x}u')' = 0.$$ Ah, but the only thing with derivative zero is a constant, so $$e^{(r_1-r_2)x}u' = A \implies u' = Ae^{(r_2-r_1)x}$$ But then $u'-Ae^{(r_2-r_1)x} = 0$, so $$\left( u-A\frac{e^{(r_2-r_1)x}}{r_2-r_1} \right)' = 0,$$ so $u-A\frac{e^{(r_2-r_1)x}}{r_2-r_1}$ must be constant, and hence $$u = A\frac{e^{(r_2-r_1)x}}{r_2-r_1} + B.$$ Since $r_2-r_1$ is just a constant, we can set $A'=A/(r_2-r_1)$, and thus $$u = A'e^{(r_2-r_1)x} + B,$$ so the only possible form of $y$ is $$y = Ae^{r_2x} + Be^{r_1x}.$$

• I find it interesting that in my proof, the simple-roots case is easier, whereas in your proof it is harder. – user21820 Apr 20 '17 at 9:31

It is easy to prove that the set of solutions is a vectorial space with dimension $2$. So, if we can find two independent solutions, we get all the others.

The characteristic polynomial is simply a convenient way to get to the solution, avoiding more complicated manipulations by using the known form of the solutions to such ODEs.

The neatest and simplest way to see how it actually works (the characteristic polynomial is the easier way to solve) is to notice that $$ae^{k_1 x}\frac{d}{dx}\left(e^{(k_2-k_1)x}\frac{d}{dx}\left[e^{-k_2x}y\right]\right)=ay''-a(k_1+k_2)y'+ak_1k_2y$$ This is an extension of the logic of the Integrating Factor technique for solving first-order linear ODEs.

If $k_1+k_2=-b/a$ and $k_1k_2=c/a$, then $k_1$ and $k_2$ are roots of $ax^2+bx+c$ and we have

$$ae^{k_1 x}\frac{d}{dx}\left(e^{(k_2-k_1)x}\frac{d}{dx}\left[e^{-k_2x}y\right]\right)=ay''+by'+cy=0$$ Dividing off $ae^{k_1x}$ and integrating once, we have $$e^{(k_2-k_1)x}\frac{d}{dx}\left[e^{-k_2x}y\right] = C$$ or $$\frac{d}{dx}\left[e^{k_2x}y\right] = Ce^{(k_1-k_2)x} \tag{1}$$ Integrating again (with $k_1\neq k_2$) gives $$e^{k_2x}y = \frac{C}{k_1-k_2}e^{(k_1-k_2)x}+B$$ Now, letting $A=\frac{C}{k_1-k_2}$ and solving for $y$, we get $$y = Ae^{k_1x}+Be^{k_2x}$$ So, as long as $k_1\neq k_2$, all solutions will look like this.

When $k_1=k_2=k$, equation (1) becomes $$\frac{d}{dx}\left[e^{kx}y\right] = C$$ Integrating and rearranging then gives $$y = (Cx+B)e^{-kx}$$

Actually there is no need to guess the solution at all, even to prove the general linear ODE solution. $\def\cc{\mathbb{C}}$

All we have to do is to abstract out the operators from the differential equation, and everything falls into place. Namely let $D$ be the differential operator:

$D(f) = f'$ for every differentiable function $f : \cc \to \cc$.

Then the equation is simply:

$(aD^2+bD+c)(y) = 0$.

where addition and scalar multiplication of operators are pointwise, and "$0$" is the zero function. If it is not clear what is going on here, just keep this apparently fanciful reasoning in mind first and compare it with the concrete translation in the last section.

This naturally yells at us to factorize the quadratic operator, which we can do so using the roots $p,q$ of the associated quadratic equation:

$(D-p)(D-q)(y) = 0$.

This ability to factorize crucially depends on the fact that $D$ is a linear operator. Now observe that we already know the solution to the following equation (which is essentially the base case):

$(D-p)(z) = 0$.

Namely:

$z = ( \cc\ x \mapsto A\exp(px) )$ for some constant $A \in \cc$.

[Namely $z$ is a function with domain $\cc$ such that $z(x) = A\exp(px)$ for every $x \in \cc$.]

Thus we get:

$(D-q)(y) = ( \cc\ x \mapsto A\exp(px) )$ for some constant $A \in \cc$.   [1]

All that remains is to make the right-hand expression zero and we can use induction to finish. This is exactly where it matters whether $q = p$ or not.

If $q \ne p$ then:

$(D-q)(\exp(px)) = ( \cc\ x \mapsto (p-q)\cdot\exp(px) )$.   [2a]

If $q = p$ then:

$(D-q)(x\cdot\exp(px)) = ( \cc\ x \mapsto \exp(px) )$.   [2b]

Therefore we can subtract from [1] a suitable multiple of either [2a] or [2b] as appropriate, to make the right-hand expression zero, and hence can continue as desired. This technique easily generalizes to the general linear ODE solution, and shows that the degree of the polynomial multiplied to each factor $\exp(rx)$ depends exactly on the multiplicity of the root $r$ of the characteristic polynomial. I shall leave the details to the aspiring reader!

Curiously, for the quadratic case there is a sneaky quick trick if $p \ne q$:

$(D-q)(y) = ( \cc\ x \mapsto A\exp(px) )$ for some constant $A \in \cc$.

$(D-p)(y) = ( \cc\ x \mapsto B\exp(qx) )$ for some constant $B \in \cc$.

Subtracting immediately gives:

$(p-q)(y) = ( \cc\ x \mapsto A\exp(px) + B\exp(qx) )$.

And we are done!!

Here is a bit more explanation of the notation used to combine operators. Just as we can perform pointwise operations on functions, we can do the same for operators. So given any differentiable function $f : \cc \to \cc$, we have the function $aD^2(f) : \cc \to \cc$ where $(aD^2(f))(x) = af''(x)$ for every $x \in \cc$, and we have the function $(bD+c)(f) : \cc \to \cc$ where $((bD+c)(f))(x) = bf'(x)+cf(x)$ for every $x \in \cc$.

If you wish to see how it works concretely, just translate everything to the usual form. For example, here is what the sneaky trick for $p \ne q$ looks like in full:

Let $p,q$ be the roots in $\cc$ of the quadratic $( X \mapsto aX^2+bX+c )$.

Let $z(x) = y'(x)-q\ y(x)$ for every $x \in \cc$.

Then $z'(x) = y''(x)-q\ y'(x)$ for every $x \in \cc$.

Thus $z'(x)-p\ z(x) = y''(x)-(p+q)\ y'(x)+pq\ y(x) = 0$ for every $x \in \cc$.

Thus $y'(x)-q\ y(x) = z(x) = A\exp(px)$ for every $x \in \cc$, for some constant $A \in \cc$.

Similarly $y'(x)-p\ y(x) = B\exp(qx)$ for every $x \in \cc$, for some constant $A \in \cc$.

Thus $(p-q)\ y(x) = A\exp(px) + B\exp(qx)$ for every $x \in \cc$.

Tada! Done without operators, but the elegance is gone.

• In case it is not obvious, exactly the same technique works in essentially the same way for the general (homogenous) linear recurrence relation. – user21820 Apr 20 '17 at 9:26
• It might be better to simplify the notation used in your answer. Someone who is asking about the basic form of solution to a second-order linear ODE with constant coefficients isn't likely to be experienced with "maps to", probably hasn't seen $\mathbb{C}$ used within non-set-theory expressions, and may not have much knowledge of the "differential operator" as $D$ (and so a clearer explanation of it could be useful). – Glen O Apr 20 '17 at 14:21
• @GlenO: Hmm okay done. How is it now? – user21820 Apr 20 '17 at 14:47
• Improved. You could probably drop all of the $\mathbb{C}$ and stick with "for all $x$", "the roots of the quadratic", etc. Similarly, no need for the $X\mapsto$ in defining the quadratic. For someone versed in abstract algebra, analysis, etc, these things are necessary for correctness. For someone learning basic differential equation solution techniques, they're unnecessary. – Glen O Apr 20 '17 at 14:54
• @GlenO: I'll pass that. I've already explained at the first usage what that mapping notation means, and I prefer correctness to vague simplicity. And I think the final concrete version is complete enough for any reader who is actually interested in the mathematics behind all this. =) – user21820 Apr 20 '17 at 15:17