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.

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.
