# Maclaurin series for differential equation

I found this question in a Special Paper for Further Mathematics. I post my answer in full, but I wanted to verify that my Maclaurin series is correct. Thank you.

Given, $$x = \cos \theta$$, and $$y = \cos 9\theta$$, and given the differential equation, $$(1 - x^2) \frac{d^2y}{dx^2} - x \frac{dy}{dx} +81y = 0$$

a). Prove that

$$(1 - x^2) \frac{d^{n+2}y}{dx^{n+2}} - x(2n + 1) \frac{dy^{n+1}}{dx^{n+1}} - (n^2 - 81) \frac{d^ny}{dx^n} = 0$$.

b). Denoting $$\frac{d^ny}{dx^n}$$ by $$f^n$$, deduce that, $$f^{n + 2}(0) = (n^2 - 81)f^n(0)$$

Use Maclaurin's theorem to obtain $$y$$ as a polynomial in $$x$$.

My workings:

a). Using Leibnitz's theorem to differentiate $$n$$-times the given differential equation,

Leibnitz's theorem: $$\frac{d^n (uv)}{dx^n} = u_{n}v + {}^{n}C_{1}u_{n-1}v_{1} + {}^{n}C_{2}u_{n-2}v_{2} + {}^{n}C_{3}u_{n-3}v_{3} \dots + uv_{n}$$

$$\therefore$$ differentiating n-times: $$\frac{d^n}{dx^n} \left[ (1 - x^2) \frac{d^2y}{dx^2} \right] - \frac{d^n}{dx^n} \left[ x \frac{dy}{dx} \right] +81 \frac{dy^n}{dx^n} = 0$$

$$\therefore \left\{ \frac{d^n}{dx^n} \left(\frac{d^2y}{dx^2}(1 - x^2) \right) + n \frac{d^{n-1}}{dx^{n-1}} \left(\frac{d^2y}{dx^2} \right)(- 2x) + \frac{n(n - 1)}{2} \frac{d^{n-2}}{dx^{n-2}} \left(\frac{d^2y}{dx^2} \right)(- 2) \right \} - \left \{ \frac{d^n}{dx^n} \left (\frac{dy}{dx} \right )x + n \frac{d^{n - 1}}{dx^{n -1}} \left ( \frac{dy}{dx} \right) \times 1 \right \} + 81 \frac{d^ny}{dx} = 0$$

$$\Rightarrow \frac{d^{n + 2}y}{dx^{n + 2}} (1 - x^2) - 2nx \frac{d^{n + 1}y}{dx^{n + 1}} - n(n - 1) \frac{d^n y}{dx^n} - \left \{ \frac{d^{n + 1}y}{dx^{n + 1}} x + n \frac{d^n y}{dx^n} \right \} + 81 \frac{d^ny}{dx} = 0$$

Combining terms,

$$(1 - x^2) \frac{d^{n + 2}y}{dx^{n + 2}} - x(2n + 1) \frac{d^{n + 1}y}{dx^{n + 1}} - \left \{ n(n - 1) + n - 81 \right \} \frac{d^n y}{dx^n} = 0$$

$$\therefore (1 - x^2) \frac{d^{n + 2}y}{dx^{n + 2}} - x(2n + 1) \frac{d^{n + 1}y}{dx^{n + 1}} - (n^2 - 81) \frac{d^n y}{dx^n} = 0$$ ... Result 1, proved by Leibnitz's theorem!

(Induction also shows the same result holds true for all positive integers $$n$$).

b). When $$x = 0$$, Result 1 becomes, $$(1 - x^2) \frac{d^{n + 2}y(0)}{dx^{n + 2}} - x(2n + 1) \frac{d^{n + 1}y(0)}{dx^{n + 1}} - (n^2 - 81) \frac{d^n y(0)}{dx^n} = 0$$

$$\Rightarrow \frac{d^{n + 2}y(0)}{dx^{n + 2}} - (n^2 - 81) \frac{d^n y(0)}{dx^n} = 0$$

With $$\frac{d^n y}{dx^n}$$ denoted as $$f^n$$ $$\Rightarrow f^{n + 2}(0) - (n^2 - 81)f^n(0) = 0$$

$$\therefore$$ we deduce that $$f^{n + 2}(0) = (n^2 - 81)f^n(0)$$} ... Result 2

Maclaurin series coefficients are found using Result 2, for $$n \ge 0$$

Maclaurin series: $$f(x) = f(0) + xf^1(0) +\frac{x^2}{2!}f^2(0) + \frac{x^3}{3!}f^3(0) + \dots \frac{x^n}{n!}f^n(0) + \frac{x^{n + 1}}{(n + 1)!}f^{n + 1}(0) \dots$$

Given that $$x = \cos \theta$$, and $$y = \cos 9\theta$$,

at $$x = 0, \cos \theta = 0 \Rightarrow \theta = \pm \frac{\pi}{2}$$

$$\therefore y(0) = f(0) = \cos (9 \frac{\pi}{2})$$

$$\therefore f(0) = 0$$

Applying Result 2 with $$n = 0$$ gives, $$f^{2}(0) = (- 81)f(0) = 0$$

For, $$n = 2, 4, 6, \dots \Rightarrow f^{4}(0) = (4 - 81)f^{2}(0) = 0, f^{6}(0) = (16 - 81)f^{4}(0) = 0 \dots \Rightarrow f^{n + 2}(0) = 0$$, for all EVEN $$n$$.

For, $$n = 1$$, differentiating $$x$$ and $$y$$ parametrically gives, $$f^1(x) = \frac{dy}{dx} = \frac{\frac{dy}{d \theta}}{\frac{dx}{d \theta}}$$

$$\therefore f^1(x) = \frac{9 \sin(9 \theta)}{\sin \theta}$$

$$\Rightarrow f^1(0) = \frac{9 \sin (9 \frac{\pi}{2})}{\sin (\frac{\pi}{2})} = 9$$

Applying Result 2 with $$n = 1 \Rightarrow f^3(0) = (1 - 81)f^1(0) = - 80 \times 9 = - 720$$

For $$n = 3, \Rightarrow f^5(0) = (9 - 81)f^3(0) = (- 72)(- 80) \times 9 = 51840$$

For $$n = 5, \Rightarrow f^7(0) = (25 - 81)f^5(0) = (- 56)(- 72)(- 80) \times 9 = - 2903040$$

For $$n = 7, \Rightarrow f^9(0) = (49 - 81)f^7(0) = ( -32)(- 56)(- 72)(- 80) \times 9 = 92897280$$

For $$n = 9, \Rightarrow f^11(0) = (81 - 81)f^9(0) = 0$$

For $$n = 11, \Rightarrow f^13(0) = (121 - 81)f^11(0) = 0$$ ...

... for all ODD $$n \ge 9$$ the Maclaurin coefficients $$= 0$$

$$\therefore$$ the Maclaurin series is, $$f(x) = - 720x + \frac{51840}{3!}x^3 - \frac{2903040}{5!}x^5 + \frac{92897280}{7!}x^7$$

Therefore, $$f(x) = - 720x + 8640x^3 - 24192x^5 + 18432x^7$$