Second Order Differential Equations $ay''+by'+cy=0$, without complex numbers How to solve the following equation without using Second Order Differential Equations formulas or Power Series:
$$af^{''}(x)+bf^{'}(x)+cf(x)=0$$
where $b^2-4ac<0$.
I know that the soltution is something like this:
$$f(x)=A\sin (qx)+B\cos (qx)$$
In any event, I would like to know how to solve this equation without that well-known formula that we find in any Differential Equations Course. I would like an elementary solution to this equation and without complex numbers.
For instance, if $b^2-4ac>0$ then we can solve it by using something like that: $$(e^{kx}g(x))^{'}=0$$. Can't we do something similar as well?
The second question I want to ask is if I want to solve the equation with Power Series is it correct the following approach:
I prove by induction that $f$ is infinitely derivable and after that I assume:
$$f(x)=\sum_{n=0}^\infty a_n x^n$$
I know that not all infinitely derivable can be written in this form, for example:
$e^{-\frac{1}{x^2}}$.
So it shoul be wrong. Nonetheless, there are several people who provide solutions to this problem by using this fact which for me seems to be blatantly erroneous.
 A: @Vercassivelaunos has explained how to reduce the problem to looking at the problem $g''+m^2 g=0$; by replacing $x$ by $mx$ we need only look at the problem $g''+g=0$.
Let us show that there is a unique solution, given that $g(0)=A, g'(0)=B$. Clearly $A\cos x+ B\sin x$ is a solution with these initial conditions, so look at $h(x):=g(x)-A\cos x+ B\sin x$; this satisfies $h''+h=0$, $h(0)=0,h'(0)=0$. We want to show that $h(x)=0$ for all $x$.
Multiplying $h''+h=0$  by $h'$ we see that $h'' h'+h'h=0$ for all $x$. Note that $h''h'+h'h=(\frac12 (h')^2+\frac12 h^2)'$. Therefore, by the Mean Value Theorem,
$$
\frac12 h'(x)^2+\frac12 h(x)^2=(x-0)(\frac12 (h'(\theta x)^2+\frac12 h(\theta x)^2)=0. 
$$
Now a real sum of squares can only be zero if each summand is zero. So we have, as required, $h(x)=0$ for all $x$.
[For those of an applied bent, we are just doing the classical thing of conserving the total energy.]
A: You can make the educated guess that the solution will be of the form $f(x)=e^{kx}g(x)$. Then we get
$$\begin{align}&{~}a[e^{kx}g(x))''+b(e^{kx}g(x))'+ce^{kx}g(x)\\
&=a[e^{kx}g''(x)+2ke^{kx}g'(x)+k^2e^{kx}g(x)]~+~b[e^{kx}g'(x)+ke^{kx}g(x)]~+~ce^{kx}g(x)\\
&=ae^{kx}g''(x)~+~[2ak+b]e^{kx}g'(x)~+~[ak^2+bk+c]e^{kx}g(x)\\
&=0\end{align}$$
Since $e^{kx}$ is never $0$, this reduces to
$$ag''+(2ak+b)g'+(ak^2+bk+c)g=0.$$
We are free to choose $k$ as we wish, because if $e^{kx}g(x)$ solves the ODE, then so does $e^{\tilde kx}e^{(k-\tilde k)x}g(x)$, and we simply get $\tilde g(x)=e^{(k-\tilde k)}g(x)$ as the solution for $g$ instead. So we choose $k$ as simple as possible: such that $2ak+b=0$, that is, $k=-\frac{b}{2a}$. Then the equation reads (after multiplying by $4a$)
$$4a^2g''-(b^2-4ac)g=0.$$
The solution to this, given that $b^2-4ac<0$, is known: it's of the form $g(x)=A\sin(\omega x)+B\cos(\omega x)$, where $\omega:=\sqrt{c-\frac{b^2}{4a}}$.
So in total we get $f(x)=e^{kx}[A\sin(\omega x)+B\cos(\omega x)]$ with $k$ and $\omega$ as specified.
