# Solving a Second Order Linear Homogeneous ODE Without an Ansatz/Characteristic Polynomial.

I wanted to try solving the following differential equation: $$y''+ay'+by=0$$ without using the ansatz of $$y=e^{kt}$$. This means using separation of variables, substitutions, or an integrating factor to possibly find the solution. If we let $$a=0$$, it becomes easier to find a solution with that constraint: $$y''=-by$$ $$\int y''\cdot y'dt=-b\int y\cdot y'dt$$ $$\left(y'\right)^{2}=-by^{2}+c$$ $$\frac{dy}{dt}=\sqrt{c-by^{2}}$$ $$\frac{1}{\sqrt{c}}\int \frac{dy}{\sqrt{1-\frac{b}{c}y^{2}}}=\int_{ }^{ }dt$$ let $$\omega=\sqrt{b}$$, and $$R=\sqrt{\frac{c}{b}}$$: $$\frac{1}{\omega}\sin^{-1}\left(\frac{1}{R}y\right)=t+D$$ let $$D\cdot\omega=\delta$$ $$y(t)=R\sin\left(\omega t+\delta\right)$$ In fact any equation of the form $$y''=-by^{n}$$ can be simplified into a solution containing an indefinite integral at least (since u sub can be done on the right). If I tried the same technique, but when a is nonzero. I end up with: $$\int_{ }^{ }y''\cdot y'dt+\int_{ }^{ }a\left(y'\right)^{2}dt+\int_{ }^{ }by\cdot y'dt=0$$ I don't know how to integrate the $$\left(y'\right)^{2}$$ term though. I then tried using an integration factor. I wrote the equation as: $$-\frac{1}{a}y''=y'+\frac{b}{a}y$$ let $$\mu\left(t\right)=e^{\frac{b}{a}t}$$. By doing some rearranging: $$-\frac{1}{a}\int_{ }^{ }e^{\frac{b}{a}t}y''dt=e^{\frac{b}{a}t}y$$ I don't know how to the integral on the left either :S

I know that the actual solution ends up being an exponential function times a trig function (through the ansatz method, which is admittedly much faster), but I would like to derive the solution without using that method. Thanks

EDIT: I think I specifically want to preserve the part where you integrate to get arcsin. Using an ansatz, and then eulers method sort of gets around that step. I guess I wanted to see specifically where that trig function comes in, and that was easy to see when a=0.

• is your issue with the "ansatz method" that it feels unmotivated and adhoc? If yes then you should study some linear algebra; particularly how higher order linear ODEs like this can be written equivalently as a linear system of first order ODEs. Then, one uses the technique of diagonalization (or more generally the theory of Jordan Canonical forms... though this is probably overboard for most introductory problems), which is a very natural procedure because it allows us to "find the most suitable coordinates to solve the problem". Commented Feb 27, 2021 at 7:06
• That thought has crossed my mind before, so I will look into the linear algebra reasoning you mentioned too. Regardless of that though, I thought it would be interesting to see it solved solely with separation of variables or a substitution. I'm just curious since it's possible to do it if a=0 Commented Feb 27, 2021 at 7:36
• Put $y=e^{\alpha t}w$ and choose constant $\alpha$ so as to eliminate the 1st derivative from the equation. And then proceed as you do for $a=0$. Commented Feb 27, 2021 at 7:58
• @Startwearingpurple This is sort of late, I didn't get what you were saying at first, but that technique did work. let y=e^-a/2 * z and then you get a diff eq. in terms of z that doesn't have a z' term. Then you can use the arcsin derrivaion. In retrospect that sort of makes sense since -a/2 is the real part of the zero of the char. polynomial. Anyways, the substitution does avoid eulers formula in the way I wanted, so thanks Commented Mar 22, 2021 at 21:03

Let set $$\begin{cases}\omega_1+\omega_2=-a\\\omega_1\omega_2=b\end{cases}\quad$$ solutions of sum and product $$x^2+ax+b=0$$

The ODE can be rewritten $$y''-(\omega_1+\omega_2)y'+\omega_1\omega_2y=0\iff (\underbrace{y''-\omega_1y'}_{z'})=\omega_2(\underbrace{y'-\omega_1y}_z)$$

You can solve $$z'=\omega_2 z$$ then go on solving $$y'-\omega_1y=z$$ with RHS $$z$$.

• My knowledge is not very deep in the field but isn't this just the characteristic polynomial? Commented Feb 27, 2021 at 8:42
• I just demystified it. Showing how you can reduce it to a system of first order ODE as peek-a-boo indicated in his comment, and the reason behind it.
– zwim
Commented Feb 27, 2021 at 8:44
• @zwim rewriting it as $z'=ω_{2}z$ makes sense, and I was able to get the final solution of $Ae^{ω_{1}t}+Be^{ω_{2}t}$. While demystifying it does help, I think I want to see a method that specifically avoids Euler's formula. The sin part of the solution was easy to see in what I wrote since the arcsin derrivative pops up. I guess ω_1 and ω_2 are imaginary depending on a and b, and thats where the sin/cos term comes up, but I would like to see it come up in say an integral Commented Feb 27, 2021 at 19:47
• Does this work for the case of repeated roos (that is, $\omega_1=\omega_2$)? Commented Jan 29 at 16:57
• @samwolfe Yes, the incidence will be on solving the particular solution $y'-\omega y=z$. When roots are different $z$ will be some $e^{\omega_2 x}$ and $y$ some $e^{\omega_1 x}$ but when roots are identical, $y$ and $z$ will collide and particular solution will have to be searched under the form $(ax+b)e^{\omega x}$ instead of $ae^{\omega_2 x}$.
– zwim
Commented Feb 5 at 9:37