Home » power series » Page 2

Tag: power series

Determine the interval of convergence of a given power series and show that it satisfies a differential equation

Consider the function f(x) defined by the power series

    \[ f(x) = x + \sum_{n=0}^{\infty} \frac{(3x)^{2n+1}}{(2n+1)!}. \]

Determine the interval of convergence for the power series and show that f(x) satisfies the differential equation

    \[ y'' = 9 (y-x). \]


First, we use the ratio test to determine the interval of convergence,

    \begin{align*}  \lim_{n \to \infty} \frac{a_{n+1}}{a_n} &= \lim_{n \to \infty} \left( \frac{(3x)^{2n+3}}{(2n+3)!} \right) \left( \frac{(2n+1)!}{(3x)^{2n+1}} \right) \\[9pt]  &= \lim_{n \to \infty} \frac{9x^2}{(2n+2)(2n+3)} \\[9pt]  &= 0. \end{align*}

Hence, the series converges for all x. Then, to show that it satisfies the given differential equation we take the first two derivatives,

    \begin{align*}  && f(x) &= x + \sum_{n=0}^{\infty} \frac{(3x)^{2n+1}}{(2n+1)!} \\[9pt]  \implies && f'(x) &= 1 + \sum_{n=0}^{\infty} \frac{3(2n+1)(3x)^{2n}}{(2n+1)!} \\[9pt]  &&&= 1 + 3\sum_{n=0}^{\infty} \frac{(3x)^{2n}}{(2n)!} \\[9pt]  \implies && f''(x) &= 3\sum_{n=1}^{\infty} \frac{3(2n)(3x)^{2n-1}}{(2n)!} \\[9pt]  &&&= 9\sum_{n=1}^{\infty} \frac{(3x)^{2n-1}}{(2n-1)!}. \end{align*}

Then we have

    \begin{align*}  9(y-x) &= 9 \left( -x + x + \sum_{n=0}^{\infty} \frac{(3x)^{2n+1}}{(2n+1)!} \right) \\[9pt]  &= 9 \sum_{n=0}^{\infty} \frac{(3x)^{2n+1}}{(2n+1)!} \\[9pt]  &= 9 \sum_{n=1}^{\infty} \frac{(3x)^{2(n-1)+1}}{(2(n-1)+1)!} \\[9pt]  &= 9 \sum_{n=1}^{\infty} \frac{(3x)^{2n-1}}{(2n-1)!} \\[9pt]  &= y''.  \end{align*}

Therefore, f(x) indeed is a solution of the given differential equation.

Now, to find the sum we first need to get the general form of the solutions for the differential equation

    \[ y'' = 9(y-x) \quad \implies \quad y'' - 9y = -9x. \]

First, we find the general form of the solutions of the homogeneous equation

    \[ y'' - 9y = 0. \]

In this case we have an equation of the form y'' + ay' + by = 0 where a = 0 and b= -9. From this we can compute d = a^2 - 4b = 36 and k = \frac{1}{2} \sqrt{d} = 3. Therefore, the general form of the solutions is

    \[ y = e^{-\frac{ax}{2}} \left( c_1 e^{kx} + c_2 e^{-kx} \right) = c_1 e^{3x} + c_2 e^{-3x}. \]

Then, we can find a particular solution y_1 of the given equation by inspection since

    \[ y'' - 9y = -9x \quad \implies \quad y_1 = x \]

is a solution. Therefore, the general solution to the given inhomogeneous equation is

    \[ y = c_1 e^{3x} + c_2 e^{-3x} + x. \]

Now, in the particular case we also have the initial condition f(0) = 0 and so we have

    \[ f(0) = c_1 + c_2 = 0. \]

Furthermore, since f(x) is an odd function we must have

    \[ f(x) = -f(-x) \quad \implies \quad c_1 - c_2 = 1. \]

Therefore, we conclude c_1 =\frac{1}{2} and c_2 = -\frac{1}{2}. And so,

    \[ f(x) = \frac{1}{2} e^{3x} - \frac{1}{2}e^{-3x} + x = x + \sinh (3x). \]

Determine the interval of convergence for a given power series and show that it satisfies a given differential equation

Consider the function f(x) defined by the power series

    \[ f(x) = \sum_{n=0}^{\infty} \frac{(-1)^n 2^{2n} x^{2n}}{(2n)!}. \]

Determine the interval of convergence for f(x) and show that it satisfies the differential equation

    \[ y'' + 4y = 0. \]


First, to determine the interval of convergence for the power series we use the ratio test

    \begin{align*}  \lim_{n \to \infty} \frac{a_{n+1}}{a_n} &= \lim_{n \to \infty} \left( \frac{(-1)^{n+1}2^{2n+2} x^{2n+2}}{(2n+2)!} \right) \left( \frac{(2n)!}{(-1)^n 2^{2n} x^{2n}} \right) \\[9pt]  &= \lim_{n \to \infty} \frac{-4x^2}{(2n+1)(2n+2)} \\[9pt]  &= 0. \end{align*}

Hence, the series converges for all x. Next, to show that it satisfies the given differential equation we take the first two derivatives,

    \begin{align*}  f(x) &= \sum_{n=0}^{\infty} \frac{(-1)^n 2^{2n} x^{2n}}{(2n)!} \\[9pt]  f'(x) &= \sum_{n=1}^{\infty} \frac{(-1)^n 2^{2n} (2n) x^{2n-1}}{(2n)!} \\[9pt]  &= \sum_{n=1}^{\infty} \frac{(-1)^n 2^{2n} x^{2n-1}}{(2n-1)!} \\[9pt]  f''(x) &= \sum_{n=1}^{\infty} \frac{(-1)^n 2^{2n} (2n-1) x^{2n-2}}{(2n-1)!} \\[9pt]  &= \sum_{n=1}^{\infty} \frac{(-1)^n 2^{2n} x^{2n-2}}{(2n-2)!}. \end{align*}

Then, we have

    \begin{align*}  y'' + 4y &= \sum_{n=1}^{\infty} \frac{(-1)^n 2^{2n} x^{2n-2}}{(2n-2)!} + 4 \sum_{n=0}^{\infty} \frac{(-1)^n 2^{2n} x^{2n}}{(2n)!} \\[9pt]  &= \sum_{n=0}^{\infty} \frac{(-1)^{n+1} 2^{2n+2} x^{2n}}{(2n)!} + 4 \sum_{n=0}^{\infty} \frac{(-1)^n 2^{2n} x^{2n}}{(2n)!} \\[9pt]  &= 4 \sum_{n=0}^{\infty} \frac{(-1)^{n+1} 2^{2n} x^{2n}}{(2n)!} + 4 \sum_{n=0}^{\infty} \frac{(-1)^n 2^{2n} x^{2n}}{(2n)!} \\[9pt]  &= -4 \sum_{n=0}^{\infty} \frac{(-1)^n 2^{2n} x^{2n}}{(2n)!} + 4\sum_{n=0}^{\infty} \frac{(-1)^n 2^{2n} x^{2n}}{(2n)!} \\[9pt]  &= 0. \end{align*}

Thus, f(x) indeed satisfies the given differential equation.

Further, in a previous exercise (Section 8.14, Exercise #2) that the solution of the differential equation y'' + 4y = 0 are all of the form

    \[ y = c_1 \cos (2x) + c_2 \sin (2x). \]

For this problem we also have f(0) = 1 so

    \[ f(0) = c_1 \cos 0 + c_2 \sin 0 = c_1 = 1. \]

Finally, we know this function is an even function (since f(x) = f(-x) for all x because we have x^{2n} inside the sum is the only x term). This means we must have c_2 = 0. Hence, we must have

    \[ f(x) = \cos (2x). \]

Determine the interval of convergence of ∑ xn / n! and show that it satisfies y′ = x + y

Consider the function f(x) defined by the power series

    \[ f(x) = \sum_{n=2}^{\infty} \frac{x^n}{n!}. \]

Determine the interval of convergence for f(x) and show that it satisfies the differential equation

    \[ y' = x + y. \]


(We might notice that this is almost the power series expansion for the exponential function e^x and deduce the interval of convergence and the differential equation from properties of the exponential that we already know. We can do it from scratch just as easily though.)

First, we apply the ratio test

    \begin{align*}  \lim_{n \to \infty} \frac{a_{n+1}}{a_n} &= \lim_{n \to \infty} \left( \frac{x^{n+1}}{(n+1)!} \right) \left( \frac{n!}{x^n} \right) \\[9pt]  &= \lim_{n \to \infty} \frac{x}{n+1} \\[9pt]  &= 0. \end{align*}

Hence, the series converges for all x. Next, we take a derivative

    \begin{align*}  y &= \sum_{n=2}^{\infty} \frac{x^n}{n!} \\[9pt]  y' &= \sum_{n=2}^{\infty} \frac{nx^{n-1}}{n!} \\[9pt]     &= \sum_{n=2}^{\infty} \frac{x^{n-1}}{(n-1)!} \\[9pt]     &= \sum_{n=1}^{\infty} \frac{x^n}{n!}. \end{align*}

Then we have

    \begin{align*}  x + y &= x + \sum_{n=2}^{\infty} \frac{x^n}{n!} \\[9pt]  &= \sum_{n=1}^{\infty} \frac{x^n}{n!} \\[9pt]  &= y'. \end{align*}

Now, to compute the sum we can solve the given differential equation

    \[ y' = x + y \quad \implies \quad y' - y = x. \]

This is a first order linear differential equation of the form y' + P(x)y = Q(x) with P(x) = -1 and Q(x) = x. We also know that f(0) = 0; therefore, this equation has a unique solution satisfying the given initial condition which is given by

    \[  y = be^{-A(x)} + e^{-A(x)} \int_a^x Q(t) e^{A(t)} \, dt. \]

Where a = b = 0 and

    \[ A(x) = \int_0^x P(t) \, dt = - \int_0^x dt = -x. \]

Therefore, we have

    \begin{align*}  f(x) &= e^{x} \left( \int_0^x t e^{-t} \, dt \\[9pt]  &= e^x \left( -te^{-t} \Bigr \rvert_0^x + \int_0^x e^{-t} \, dt \right) \\[9pt]  &= e^x \left( -xe^{-x} - e^{-x} + 1 \right) \\[9pt]  &= e^x - x - 1. \end{align*}

Determine the interval of convergence of ∑ x2n / n! and show it satisfies a given differential equation

Consider the function f(x) defined by the power series

    \[ f(x) = \sum_{n=0}^{\infty} \frac{x^{2n}}{n!}. \]

Determine the interval of convergence for f(x) and show that it satisfies the differential equation

    \[ y' = 2xy. \]


First, to determine the interval of convergence we use the ratio test,

    \begin{align*}  \lim_{n \to \infty} \frac{a_{n+1}}{a_n} &= \lim_{n \to \infty} \left( \frac{x^{2n+2}}{(n+1)!} \right) \left( \frac{n!}{x^{2n}} \right) \\[9pt]  &= \lim_{n \to \infty} \frac{x^2}{n+1} \\[9pt]  &= 0. \end{align*}

Hence, the series converges for all x.

To show that it satisfies the given differential equation, we first take the derivative,

    \begin{align*}  && f(x) &= \sum_{n=0}^{\infty} \frac{x^{2n}}{n!} \\[9pt]  \implies && f'(x) &= \sum_{n=1}^{\infty} \frac{2n x^{2n-1}}{n!} \\[9pt]  &&&= 2 \sum_{n=1}^{\infty} \frac{x^{2n-1}}{(n-1)!}. \end{align*}

Then, it satisfies the given differential equation since

    \begin{align*}  2xy &= 2x \left( \sum_{n=0}^{\infty} \frac{x^{2n}}{n!} \right)\\[9pt]  &= 2 \left( \sum_{n=0}^{\infty} \frac{x^{2n+1}}{n!} \right)\\[9pt]  &= 2 \sum_{n=1}^{\infty} \frac{x^{2(n-1)+1}}{(n-1)!} \\[9pt]  &= 2 \sum_{n=1}^{\infty} \frac{x^{2n-1}}{(n-1)!} \\[9pt]  &= y'. \end{align*}

Then, since the given differential equation is a first-order linear differential equation of the form

    \[ y' + P(x)y = 0 \]

with P(x) = -2x we know that the solutions are uniquely determined by the formula

    \[ f(x) = be^{-A(x)}, \qquad \text{where} \qquad A(x) = \int_a^x P(t) \, dt. \]

Since we have the initial condition f(0) = 1 (by plugging in x = 0 to the power series expansion for f(x)) we have a= b= 0 and the unique solution of this differential equation is

    \[ f(x) = e^{-A(x)} = \exp \left( - \int_0^x (-2t) \, dt \right) = e^{x^2}. \]

Determine the interval of convergence of a given power series and show that it satisfies a given differential equation

Consider the function f(x) defined by the power series

    \[ f(x) = 1 + \sum_{n=1}^{\infty} \frac{1 \cdot 4 \cdot 7 \cdots (3n-2)}{(3n)!} x^{3n}. \]

Determine the interval of convergence for f(x) and show that it satisfies the differential equation

    \[ y'' = x^a y + b. \]

Find a and b.


First, to determine the interval of convergence for f(x) we use the ratio test,

    \begin{align*}  \lim_{n \to \infty} \frac{a_{n+1}}{a_n} &= \lim_{n \to \infty} \left( \frac{1 \cdot 4 \cdot 7 \cdots (3n+1) \cdot x^{3n+3}}{(3n+3)!} \right) \left( \frac{(3n)!}{1 \cdot 4 \cdot 7 \cdots (3n-2) \cdot x^{3n}} \right) \\[9pt]  &= \lim_{n \to \infty} \frac{(3n+1)x^3}{(3n+1)(3n+2)(3n+3)} \\[9pt]  &= \lim_{n \to \infty} \frac{x^3}{(3n+2)(3n+3)} \\[9pt]  &= 0. \end{align*}

Therefore, the series converges for all x. Next, to show that it satisfies the given differential equation, we take the first two derivatives,

    \begin{align*}  y &= 1 + \sum_{n=1}^{\infty} \frac{1 \cdot 4 \cdot 7 \cdots (3n-2)}{(3n)!} x^{3n} \\[9pt]  y' &= \sum_{n=1}^{\infty} \frac{1 \cdot 4 \cdot 7 \cdots (3n-2)\cdot (3n)}{(3n)!} x^{3n-1} = \sum_{n=1}^{\infty} \frac{1 \cdot 4 \cdot 7 \cdots (3n-2)}{(3n-1)!} x^{3n-1} \\[9pt]  y'' &= \sum_{n=1}^{\infty} \frac{1 \cdot 4 \cdot 7 \cdots (3n-2)\cdot (3n-1)}{(3n-1)!} x^{3n-2} = \sum_{n=1}^{\infty} \frac{1 \cdot 4 \cdot 7 \cdots (3n-2)}{(3n-2)!}x^{3n-2}.  \end{align*}

Then, we have the differential equation y'' = x^a y + b,

    \begin{align*}  && y'' &= x^a y + b \\[9pt]  \implies && \sum_{n=1}^{\infty} \frac{1 \cdot 4 \cdot 7 \cdots (3n-2)}{(3n-2)!}x^{3n-2} &= x^a\left( 1 + \sum_{n=1}^{\infty} \frac{1 \cdot 4 \cdot 7 \cdots (3n-2)}{(3n)!} x^{3n} \right) + b \\[9pt]  \implies && \sum_{n=1}^{\infty} \frac{1 \cdot 4 \cdot 7 \cdots (3n-2)}{(3n-2)!} x^{3n-2} &= b + x^a + \sum_{n=1}^{\infty} \frac{1 \cdot 4 \cdot 7 \cdots (3n-2)}{(3n)!} x^{3n+a}. \end{align*}

But, for this equation to hold we must have b = 0 (since there is no constant term in y'' on the left) and we must also have a = 1 since there the coefficient of x^1 on the left is 1 and the only possible x^1 term on the right is if a = 1. Using these values of a and b we verify that the given differential equation is satisfied since we have

    \begin{align*}  y'' &= \sum_{n=1}^{\infty} \frac{1 \cdot 4 \cdot 7 \cdots (3n-2)}{(3n-2)!} x^{3n-2} \\[9pt]  x^a y + b = xy &= x + \sum_{n=1}^{\infty} \frac{1 \cdot 4 \cdot 7 \cdots (3n-2)}{(3n)!} x^{3n+1} \\[9pt]  &= x + \sum_{n=2}^{\infty} \frac{1 \cdot 4 \cdot 7 \cdots (3(n-1)-2)}{(3(n-1))!} x^{3(n-1)+1} &(\text{Reindexing})\\[9pt]  &= \frac{1}{(3\cdot 1 - 2)!} x^{3 \cdot 1 - 2} + \sum_{n=2}^{\infty} \frac{1 \cdot 4 \cdot 7 \cdots (3n-5)}{(3n-3)!} \cdot \frac{(3n-2)}{(3n-2)} \cdot x^{3n-2} \\[9pt]   &= \frac{1}{(3 \cdot 1 - 2)!} x^{3 \cdot 1 - 2} + \sum_{n=2}^{\infty} \frac{1 \cdot 4 \cdot 7 \cdots (3n-2)}{(3n-2)!} x^{3n-2} \\[9pt]  &= \sum_{n=1}^{\infty} \frac{1 \cdot 4 \cdot 7 \cdots (3n-2)}{(3n-2)!} x^{3n-2}.  \end{align*}

Hence, we indeed have y'' = x^a y + b.

Determine the interval of convergence of ∑xn / (n!)2 and show that it satisfies a given differential equation

Consider the function f(x) defined by the power series,

    \[ f(x) = \sum_{n=0}^{\infty} \frac{x^n}{(n!)^2}. \]

Determine the interval of convergence of f(x) and show that f(x) satisfies the differential equation

    \[ xy'' + y' - y = 0. \]


First, to determine the radius of convergence we use the ratio test,

    \begin{align*}  \lim_{n \to \infty} \frac{a_{n+1}}{a_n} &= \lim_{n \to \infty} \left( \frac{x^{n+1}}{(n+1)!^2} \right) \left( \frac{(n!)^2}{x^n} \right) \\[9pt]  &= \lim_{n \to \infty} \frac{x}{(n+1)^2} \\[9pt]  &= 0. \end{align*}

Therefore, the series converges for all x (or the radius of convergence is r = +\infty). Next, to show that f(x) satisfies the given differential equation we take the first two derivatives,

    \begin{align*}   && y &= \sum_{n=0}^{\infty} \frac{x^n}{(n!)^2} \\[9pt]  \implies && y' &= \sum_{n=1}^{\infty} \frac{nx^{n-1}}{(n!)^2} = \sum_{n=1}^{\infty} \frac{x^{n-1}}{n ((n-1)!)^2} \\[9pt]  \implies && y'' &= \sum_{n=2}^{\infty} \frac{(n-1)x^{n-2}}{n ((n-1)!)^2} = \sum_{n=2}^{\infty} \frac{x^{n-2}}{n(n-1)((n-2)!)^2}. \end{align*}

Plugging this into the given differential equation we have

    \begin{align*}  xy'' + y' - y &= x \left( \sum_{n=2}^{\infty} \frac{x^{n-2}}{n(n-1)((n-2)!)^2} \right) + \left( \sum_{n=1}^{\infty} \frac{x^{n-1}}{n ((n-1)!)^2} \right) - \left( \sum_{n=0}^{\infty} \frac{x^n}{(n!)^2} \right) \\[9pt]  &= \sum_{n=2}^{\infty} \frac{x^{n-1}}{n(n-1)((n-2)!)^2} + \sum_{n=1}^{\infty} \frac{x^{n-1}}{n ((n-1)!)^2} - \sum_{n=0}^{\infty} \frac{x^n}{(n!)^2} \\[9pt]  &= \sum_{n=1}^{\infty} \frac{x^n}{(n+1)n((n-1)!)^2} + \sum_{n=0}^{\infty} \frac{x^n}{(n+1)(n!)^2} -\sum_{n=0}^{\infty} \frac{x^n}{(n!)^2} \\[9pt]  &= \left( \sum_{n=1}^{\infty} \frac{x^n}{(n+1)n((n-1)!)^2} + \frac{x^n}{(n+1)(n!)^2} - \frac{x^n}{(n!)^2} \right) + 1 - 1 \\[9pt]  &= \sum_{n=1}^{\infty} \left( \frac{1}{(n+1)n((n-1)!)^2} + \frac{1}{(n+1)(n!)^2} - \frac{1}{(n!)^2} \right)x^n \\[9pt]  &= \sum_{n=1}^{\infty} \frac{n + 1 - (n+1)}{(n+1)(n!)^2} x^n \\[9pt]  &= \sum_{n=1}^{\infty} \frac{0}{(n+1)(n!)^2} x^n \\[9pt]  &= 0. \end{align*}

Hence, y indeed satisfies the given differential equation.

Determine the interval of convergence of ∑ x4n / (4n)! and show that it satisfies a given differential equation

Consider the function f(x) defined by the power series,

    \[ f(x) = \sum_{n=0}^{\infty} \frac{x^{4n}}{(4n)!}. \]

Determine the interval of convergence of f(x) and show that f(x) satisfies the differential equation

    \[ f^{(4)}(x) = f(x). \]


First, to determine the radius of convergence we use the ratio test

    \begin{align*}  \lim_{n \to \infty} \frac{a_{n+1}}{a_n} &= \lim_{n \to \infty} \left( \frac{x^{4n+4}}{(4n+4)!} \right) \left( \frac{(4n)!}{x^{4n}} \right) \\[9pt]  &= \lim_{n \to \infty} \frac{x^4}{(4n+1)(4n+2)(4n+3)(4n+4)} \\[9pt]  &= 0. \end{align*}

Therefore, f(x) converges for all x (equivalently, r = +\infty). Next, to show that f(x) satisfies the differential equation y^{(4)} = y we take the first four derivatives,

    \begin{align*}  && y&= \sum_{n=0}^{\infty} \frac{x^{4n}}{(4n)!} \\[9pt]  \implies && y' &= \sum_{n=1}^{\infty} \frac{4n x^{4n-1}}{(4n)!} = \sum_{n=1}^{\infty} \frac{x^{4n-1}}{(4n-1)!} \\[9pt]  \implies && y'' &= \sum_{n=1}^{\infty} \frac{(4n-1)x^{4n-2}}{(4n-1)!} = \sum_{n=2}^{\infty} \frac{x^{4n-2}}{(4n-2)!} \\[9pt]  \implies && y''' &= \sum_{n=1}^{\infty} \frac{(4n-2)x^{4n-3}}{(4n-2)!} = \sum_{n=3}^{\infty} \frac{x^{4n-3}}{(4n-3)!} \\[9pt]  \implies && y^{(4)} &= \sum_{n=1}^{\infty} \frac{(4n-3)x^{4n-4}}{(4n-3)!} = \sum_{n=4}^{\infty} \frac{x^{4n-4}}{(4n-4)!}. \end{align*}

But, reindexing this expression for the fourth derivative we have

    \[ y^{(4)} = \sum_{n=1}^{\infty} \frac{x^{4n-4}}{(4n-4)!} = \sum_{n=0}^{\infty} \frac{x^{4(n+1)-4}}{(4(n+1)-4)!} = \sum_{n=0}^{\infty} \frac{x^{4n}}{(4n)!} = y. \]

Thus, f(x) satisfies the given differential equation.

Use the method of undetermined coefficients to solve (1-x2)y′′ – 2xy′ + 6y = 0

Consider the differential equation

    \[ (1-x^2)y'' - 2xy' + 6y = 0. \]

The solution to this differential equation has a power-series expansion

    \[ f(x) = \sum_{n=0}^{\infty} a_n x^n \qquad \text{with} \qquad f(0) = 1, \quad f'(0) = 0. \]

Using the method of undetermined coefficients obtain a recursion formula relating the terms a_{n+2} to the terms a_n. Give an explicit formula for a_n for each n and find the sum of the series.


First, we differentiate twice,

    \begin{align*}  f(x) &= \sum_{n=0}^{\infty} a_n x^n \\  f'(x) &= \sum_{n=1}^{\infty} na_n x^{n-1} \\  f''(x) &= \sum_{n=2}^{\infty} n(n-1)a_n x^{n-2}. \end{align*}

From the initial conditions f(0) = 1 and f'(0) = 0 we have

    \begin{align*}  f(0) &= \sum_{n=0}^{\infty} a_n x^n = a_0 = 1 \\  f'(0) &= \sum_{n=1}^{\infty} na_n x^{n-1} = a_1 = 0. \end{align*}

Now, we plug the expressions for y, \ y', and y'' back into the given differential equation,

    \begin{align*}  && (1-x^2)y'' - 2xy' + 6y &= 0 \\[9pt]  \implies && (1-x)^2 \left(\sum_{n=2}^{\infty} n(n-1)a_n x^{n-2} \right) - 2x \sum_{n=1}^{\infty} na_n x^{n-1} + 6 \sum_{n=0}^{\infty} a_n x^n &= 0 \\[9pt]  \implies && \sum_{n=2}^{\infty} n(n-1) a_n x^{n-2} - \sum_{n=2}^{\infty} n(n-1)a_n x^n - 2 \sum_{n=1}^{\infty} na_n x^n + 6 \sum_{n=0}^{\infty} a_n x^n &= 0 \\[9pt]  \implies && \sum_{n=0}^{\infty} (n+2)(n+1) a_{n+2} x^n - \sum_{n=2}^{\infty} n(n-1)a_n x^n - 2 \sum_{n=1}^{\infty} na_n x^n + 6 \sum_{n=0}^{\infty} a_n x^n &= 0 \\[9pt]  \implies && \left(\sum_{n=2}^{\infty} \left( (n+2)(n+1)a_{n+2} - n(n-1)a_n - 2na_n + 6a_n \right)x^n\right) + 2a_2 + 6a_3 x -2a_1 x + 6a_0 + 6a_1 x &= 0. \end{align*}

Then, we use the fact from above that a_0 = 1 and a_1 = 1 to get

    \begin{align*}  && \left( \sum_{n=2}^{\infty} \left( (n+2)(n+1)a_{n+2} - n(n-1)a_n - 2na_n + 6a_n \right) \right) + 2a_2 + 6a_3 x + 6 &= 0 \\[9pt]  \implies && \left( \sum_{n=2}^{\infty} \left( (n+2)(n+1)a_{n+2} - a_n (n^2 + n - 6) \right) \right) + 6a_3 x + 2a_2 + 6 &= 0 \\  \implies && \left( \sum_{n=2}^{\infty} \left( (n+2)(n+1)a_{n+2} - (n+3)(n-2)a_n \right)\right) + 6a_3 x + 2a_2 + 6 &= 0. \end{align*}

Since this sum is equal to 0, we know that every coefficient of every power of x must be equal to 0. First, we solve for a_2 and a_3,

    \begin{align*}  2a_2 + 6 &= 0 & \implies && a_2 &= -3 \\  6a_3 &= 0 & \implies && a_3 &= 0. \end{align*}

Then, we establish the recursive relationship between a_n and a_{n+2},

    \begin{align*}  && (n+2)(n+1)a_{n+2} - (n+3)(n-2)a_n &= 0 \\  \implies && (n+2)(n+1) a_{n+2} &= (n+3)(n-2)a_n \\  \implies && a_{n+2} &= \frac{(n+3)(n-2)}{(n+2)(n+1)} a_n \end{align*}

for all n \geq 0. Then since a_3 = 0 we have a_{2n+1} = 0 for all n (since for every odd integer n the formula for a_{n+2} has is multiplied by a_n, but each of these will be 0). For the even terms we have for n=2,

    \[ a_4 = \frac{(n+3)(n-2)}{(n+2)(n+1)} a_2 = \frac{(5)(0)}{(4)(3)} (-3) = 0.\]

This means all of the remaining even terms will be 0 as well. So we have

    \[ a_0 = 1, \quad a_1 = 0, \quad a_2 = -3, \quad a_3 = a_4 = \cdots = 0. \]

Hence,

    \[ f(x) = 1 - 3x^2. \]