Let \(\displaystyle y= \sum_{n=0}^\infty a_n x^n\,\), where the coefficients \(a_n\) are independent of \(x\) and are such that this series and all others in this question converge.
Show that
\[
\displaystyle y'= \sum_{n=1}^\infty na_n x^{n-1}\,,
\]
and write down a similar expression for \(y''\).
Write out explicitly each of the three
series as far as the term containing \(a_3\).
It is given that \(y\) satisfies the differential
equation
\[
xy''-y'+4x^3y =0\,.
\]
By substituting the series of part (i) into the differential
equation and comparing coefficients, show that \(a_1=0\).
Show that, for \(n\ge4\),
\[ a_n =- \frac{4}{n(n-2)}\, a_{n-4}\,,
\]
and that, if \(a_0=1\) and \(a_2=0\), then \( y=\cos (x^2)\,\).
Find the corresponding result when \(a_0=0\) and \(a_2=1\).
\begin{align*}
&& 0 &= xy''-y'+4x^3y \\
&&&= x\sum_{n=2}^\infty n(n-1) a_n x^{n-2} - \sum_{n=1}^\infty n a_n x^{n-1} + 4x^3 \sum_{n=0}^\infty a_n x^n \\
&&&= \sum_{n=2}^\infty n(n-1) a_n x^{n-1} - \sum_{n=1}^\infty n a_n x^{n-1} + \sum_{n=0}^\infty 4a_n x^{n+3} \\
&&&= \sum_{n=2}^\infty n(n-1) a_n x^{n-1} - \sum_{n=1}^\infty n a_n x^{n-1} + \sum_{n=4}^\infty 4a_{n-4} x^{n-1} \\
&&&= \sum_{n=4}^{\infty} \l n(n-1) a_n- n a_n +4a_{n-4} \r x^{n-1} + 2a_2x + 6a_3x^2-a_1-2a_2x-3a_3x^2 \\
&&&= \sum_{n=4}^{\infty} \l n(n-2) a_n +4a_{n-4} \r x^{n-1}+ 3a_3x^2-a_1 \\
\end{align*}
Therefore since all coefficients are \(0\), \(a_1 = 0\), \(a_3 = 0\) and \(\displaystyle a_n = -\frac{4}{n(n-2)}a_{n-4}\).
If \(a_0 = 1, a_2 = 0\), and since \(a_1 = 0, a_3 = 0\) the only values which will take non-zero value are \(a_{4k}\). We can compute these values as: \(a_{4k} = -\frac{4}{(4k)(4k-2)} a_{4k-4} = \frac{1}{2k(2k-1)}a_{4k-r}\) so \(a_{4k} = \frac{(-1)^k}{(2k)!}\), which are precisely the coefficients in the expansion \(\cos x^2\).
If \(a_0 = 0, a_2 = 1\) then since \(a_1 = 0, a_3 = 0\) the only values which take non-zero values are \(a_{4k+2}\) we can compute these values as:
\(a_{4k+2} = -\frac{4}{(4k+2)(4k)}a_{4k-2} = -\frac{1}{(2k+1)2k}a_{4k-2}\) so we can see that \(a_{4k+2}= \frac{(-1)^k}{(2k+1)!}\) precisely the coefficients of \(\sin x^2\)