Series Solutions of Oscillator

Overview


The osicallator equation is
{% \frac{d^2y}{dx^2} + \omega^2 y %}
which is used the classical analysis of a mass on a spring. (see Hookes law)

Solution


First hypothesize a solution as follows.
{% y(x) = x^s \sum_{i=0}^\infty a_i x^i %}
{% \frac{dy}{dx} = \sum_0^\infty a_i(s+i)x^{s+i-1} %}
{% \frac{d^2}{dx^2} \sum_0^\infty a_i(s+i)(s+i-1)x^{s+i-2} %}
Then by plugging into the original differential equation, we have
{% \sum_0^\infty a_i(s+i)(s+i-1)x^{s+i-2} + \omega^2 \sum_0^\infty a_ix^{s+i} = 0 %}

Determining the Coefficients


Because the above equation is equal to zero, that must mean that each term is identically zero. The lowest power of x is {% s-2 %}, which occurs only in the first summation above for {% i=0 %}. Then we must have
{% a_0 s(s-1) = 0 %}
By hypothesis, {% a_0 \neq 0 %}, so either {% s=0 %} or {% s=1 %}.

The next {% a_1 %} coefficient has the following equation
{% a_1(s+1)s = 0 %}
For terms higher than 1, we should have
{% a_{i+2}(s+i+2)(s+i+1) + \omega^2 a_i = 0 %}
which leads to the following recurrence relation.
{% a_{i+2} = -a_i \frac{\omega^2}{(s+i+2)(s+i+1)} %}

Cosine Solution


Choosing {% s=0 %}, but then {% a_1 %} is unspecified, and can be set to 0.
{% a_2 = -\frac{\omega^2}{2!} a_0 %}
{% a_4 = \frac{\omega^4}{4!} a_0 %}
and so on. Recognizing this as the Taylor series of the cosine function, we have
{% y(x) = a_0 cos(\omega x) %}

Sine Solution


Similar to the cosine solution above, if we instead choose {% s=1 %}, we then get
{% y(x) = \frac{a_0}{\omega} sin(\omega x) %}