Home » Blog » power series

Tag: power series

Compute the coefficients of a power series with coefficients satisfying a given identity

Consider the power series

    \[ f(x) = \sum_{n=0}^{\infty} a_n x^n \]

whose coefficients satisfy the identity

    \[ \cos x = \sum_{n=0}^{\infty} a_n (n+2)x^n. \]

Compute the coefficients a_5, a_6 and determine the value of f(\pi).


First, we know the power-series expansion of \cos x is given by

    \[ \cos x = \sum_{n=0}^{\infty} 1 - \frac{1}{2}x^2 + \frac{1}{24} x^4 - \frac{1}{720} x^6 + \cdots. \]

So, we have

    \[ 1 - \frac{1}{2} x^2 + \frac{1}{24}x^4 - \frac{1}{720} x^6 + \cdots = \sum_{n=0}^{\infty} a_n (n+2)x^n. \]

Equating like powers of x we can compute the coefficients a_5 and a_6,

    \begin{align*}  a_5 &= 0 \\[9pt]   8 a_6 &= \frac{-1}{6!} & \implies && a_6 &= \frac{-7}{8!}. \end{align*}

Then to compute the value of f(\pi) we solve the differential equation

    \begin{align*}  \cos x &= \sum_{n=0}^{\infty} a_n (n+2) x^n \\[9pt]  &= \sum_{n=0}^{\infty}n a_n x^n + 2 \sum_{n=0}^{\infty} a_n x^n \\[9pt]  &= \sum_{n=1}^{\infty} n a_n x^n + 2 \sum_{n=0}^{\infty} a_n x^n \\[9pt]  &= xy' + 2y \end{align*}

If x = 0 we have

    \[ \cos x = \sum_{n=0}^{\infty} a_n (n+2) x^n \quad \implies \quad 1 = 2a_0 \quad \implies \quad a_0 = \frac{1}{2}. \]

Therefore, f(0) = \frac{1}{2}. If x \neq 0 then we can divide the above differential equation by x to obtain the first order linear differential equation

    \[ y' + \frac{2}{x} y = \frac{\cos x}{x}. \]

Now, we can solve this differential equation as follows,

    \begin{align*}  && y' + \frac{2}{x} y &= \frac{\cos x}{x} \\[9pt]  \implies && x^2 y' + 2x y &= x \cos x \\[9pt]  \implies && x^2 y' + (x^2)' y &= x \cos x \\[9pt]  \implies && \frac{d}{dx} \left( x^2 y \right) &= x \cos x &(\text{prod. rule})\\[9pt]  \implies && \int \frac{d}{dx} \left( x^2 y \right) \, dx &= \int x \cos x \, dx \\[9pt]  \implies && x^2 y &= \cos x + x \sin x + C \\[9pt]  \implies && y &= \frac{\cos x}{x^2} + \frac{\sin x}{x} + \frac{C}{x^2}. \end{align*}

Where C is an arbitrary constant.

(Incomplete. Judging by the answer in the back of the book, Apostol computes this constant as C = -1. I’m not sure how to get that though. I think we need some kind of initial condition to determine the constant, and so get a unique solution for f(x). Maybe we can assume this must be continuous at 0 and then take a limit as x \to 0? I do think that would get us to C = -1, but I don’t know why can assume f is continuous at 0. Leave a comment if you have any suggestions.)

Compute the coefficients of a given power series

Consider the power series

    \[ f(x) = \sum_{n=0}^{\infty} a_n x^n \]

with coefficients determined by the identity

    \[ e^{-2x} = \sum_{n=0}^{\infty} (2a_n + (n+1)a_{n+1})x^n. \]

Compute the coefficients a_1, a_2, a_3 and determine the sum of the series.


We know the power-series expansion for e^{-2x} is given by

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

Starting with a_0= 1 and the given identity we can compute the coefficients a_1, a_2, a_3 by equating the coefficients of like powers of x,

    \begin{align*}  2a_0 + a_1 &= 1 & \implies && a_1 &= -1 \\[9pt]  2a_1 + 2a_2 &= -2 & \implies && a_2 &= 0 \\[9pt]  2a_2 + 3a_3 &= 2 & \implies && a_3 &= \frac{2}{3}. \end{align*}

Then from the identity for the coefficients (and noting that the series converges absolutely for all real x so we may split the sum into separate sums without worry),

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

This is a first order linear differential equation of the form y' + P(x) y = Q(x). Furthermore, the initial condition a_0 = 1 implies that y = 1 when x = 0. Therefore, the solution is

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

where

    \[ a = 0, \quad b= 1, \quad A(x) = \int_0^x P(t) \,dt = 2x. \]

So, we have

    \begin{align*}   f(x) &= e^{-2x} +  e^{-2x} \int_0^x e^{-2t} e^{2t} \, dt \\[9pt]  &= e^{-2x} + e^{-2x} \int_0^x \, dt \\[9pt]  &= (x+1)e^{-2x}. \end{align*}

Assume y′′ + xy′ + y = 0 has a power-series solution and determine the coefficient an

Assume that the differential equation

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

has a power-series solution y = \sum a_n x^n and find a formula for the coefficient a_n.


First, we have

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

So, from the given differential equation we have

    \begin{align*}  && y'' + xy' + y &= 0 \\[9pt]  \implies && \sum_{n=2}^{\infty} n(n-1)a_n x^{n-2} + x \sum_{n=1}^{\infty} n a_n x^{n-1} + \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=1}^{\infty} n a_n x^n + \sum_{n=0}^{\infty} a_n x^n &= 0 \\[9pt]  \implies && 2a_2 + \sum_{n=1}^{\infty} (n+2)(n+1)a_{n+2} x^n + \sum_{n=1}^{\infty} na_n x^n + a_0 + \sum_{n=1}^{\infty} a_n x^n &= 0 \\[9pt]  \implies && 2a_2 + a_0 + \sum_{n=1}^{\infty} ((n+2)(n+1) a_{n+2} + na_n + a_n)x^n &= 0 \\[9pt]  \implies && 2a_2 + a_0 + \sum_{n=1}^{\infty} ((n+2)(n+1)a_{n+2} + (n+1)a_n) x^n &= 0. \end{align*}

Since each coefficient of x^n must equal 0 for this equation to hold we have

    \begin{align*}  2a_2 + a_0 &= 0 \\[9pt]  (n+2)(n+1)a_{n+2} +(n+1)a_n &= 0 & \implies && a_{n+2} = \frac{-1}{n+2} a_n. \end{align*}

By induction we then have

    \begin{align*}  a_{2n} &= \frac{(-1)^n}{2 \cdot 4 \cdot \cdots \cdot (2n)} \\[9pt]  a_{2n+1} &= \frac{(-1)^{n+1}}{1 \cdot 3 \cdot \cdots \cdot (2n-1)}. \end{align*}

The coefficients a_0 and a_1 are arbitrary and we denote them by c_0 and c_1 respectively. Then we have

    \[ y = c_0 \left( \sum_{n=1}^{\infty} \frac{(-1)^n x^{2n}}{2 \cdot 4 \cdots (2n)} \right) + c_1 \sum_{n=1}^{\infty} \frac{(-1)^{n+1} x^{2n-1}}{1 \cdot 3 \cdots (2n-1)}. \]

Assume y′′ = xy has a power-series solution and determine the coefficient an

Assume that the differential equation

    \[ y'' = xy \]

has a power-series solution y = \sum a_n x^n and find a formula for the coefficient a_n.


First, we have

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

Therefore, we have

    \begin{align*}  && y'' &= xy \\[9pt]  \implies && \sum_{n=0}^{\infty} (n+2)(n+1) a_{n+2} x^n &= x \sum_{n=0}^{\infty} a_n x^n  \\[9pt]  \implies && \sum_{n=0}^{\infty} (n+2)(n+1) a_{n+2} x^n &= \sum_{n=0}^{\infty} a_n x^{n+1} \\[9pt]  \implies && 2a_2 + \sum_{n=1}^{\infty} (n+2)(n+1)a_{n+2}x^n &= \sum_{n=0}^{\infty} a_n x^{n+1} \\[9pt]  \implies && 2a_2 + \sum_{n=0}^{\infty} (n+3)(n+2) a_{n+3} x^{n+1} &= \sum_{n=0}^{\infty} a_n x^{n+1}. \end{align*}

Equating like powers of x, we have a recursive relation for a_n when n > 2 given by

    \[ a_{n+3} = \frac{a_n}{(n+3)(n+2)}, \]

Furthermore, we have that a_2 = 0 and that a_0 and a_1 are arbitrary constants, say c_0 and c_1, respectively. Then by induction we establish

    \begin{align*}   a_{3n} &= \frac{a_0}{(2 \cdot 3)(5 \cdot 6) \cdots ((3n-1)\cdot(3n))} \\[9pt]  a_{3n+1} &= \frac{a_1}{(3 \cdot 4)(6 \cdot 7) \cdots ((3n)\cdot(3n+1))} \\[9pt]  a_{3n+2} &= 0. \end{align*}

Therefore,

    \[ y = c_0 \left( 1 + \sum_{n=1}^{\infty} \frac{x^{3n}}{(2 \cdot 3)(5 \cdot 6) \cdots ((3n-1)\cdot(3n))} \right) + c_1 \left( x + \sum_{n=1}^{\infty} \frac{x^{3n+1}}{(3 \cdot 4)(6 \cdot 7) \cdots ((3n)\cdot (3n+1))} \right). \]

Find the first four nonzero terms of the power series solution of y′ = x + y2

Consider the differential equation

    \[ y' = x + y^2 \]

with initial conditions y = 0 when x = 0. Assume this differential equation has a power-series solution and compute the first four nonzero terms of the expansion.


Let

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

be the power-series solution of the differential equation. Then we must have

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

From the initial conditions we know a_0 = 0. Then, equating like powers of x we can solve for the first four nonzero terms in the power series expansion:

    \begin{align*}  a_0 &= 0 \\[9pt]  a_1 &= a_0^2 & \implies && a_1 &= 0 \\[9pt]  2a_2 &= 2a_0 a_1 + 1 & \implies && a_2 & = \frac{1}{2} \\[9pt]  3a_3 &= a_1^2 + 2a_0 a_2 & \implies && a_3 &= 0 \\[9pt]  4a_4 &= 2(a_0 a_3 + a_1 a_2) & \implies && a_4 &= 0 \\[9pt]  5a_5 &= a_2^2 + 2(a_0 a_4 + a_1 a_3) & \implies && a_5 &= \frac{1}{20} \\[9pt]  6a_6 &= 2(a_0 a_5 + a_1 a_4 + a_2 a_3) & \implies && a_6 &= 0 \\[9pt]  7a_7 &= a_3^2 + 2(a_0 a_6 + a_1 a_5 + a_2 a_4) & \implies && a_7 &= 0 \\[9pt]  8a_8 &= 2(a_0 a_7 + a_1 a_6 + a_2 a_5 + a_3 a_4) & \implies && a_8 &= \frac{1}{160} \\[9pt]  9a_9 &= a_4^2 + 2(a_0 a_8 + a_1 a_7 + a_2 a_6 + a_3 a_5) & \implies && a_9 &= 0 \\[9pt]  10a_{10} &= 2(a_0 a_9 + a_1 a_8 + a_2 a_7 + a_3 a_6 + a_4 a_5) & \implies && a_{10} &= 0 \\[9pt]  11a_{11} &= a_5^2 + 2(a_0 a_{10} + a_1 a_9 + a_2 a_8 + a_3 a_7 + a_4 a_6) & \implies && a_{11} &= \frac{1}{8800} \end{align*}

(Note: I think the solution in the back of Apostol is wrong on this. Apostol has a_5 = \frac{1}{12}, a_8 = \frac{1}{060}, and a_{11} = \frac{7}{8800}. I’m going to mark this as errata until someone convinces me Apostol is actually correct.)

Therefore, we have

    \[ y = \frac{1}{2} x^2 + \frac{1}{20} x^5 + \frac{1}{160} x^8 + \frac{1}{8800} x^{11} + \cdots. \]

Find the first four nonzero terms of the power series solution of y′ = 1 + xy2

Consider the differential equation

    \[ y' = 1 + xy^2 \]

with initial conditions y = 0 when x = 0. Assume this differential equation has a power-series solution and compute the first four nonzero terms of the expansion.


Let

    \[ f(x) = \sum_{n=0}^{\infty} a_n x^n \]

be the power series solution of the differential equation. Then we must have

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

From the initial condition y =0 when x = 0 we know a_0 = 0. Therefore, equating like powers of x we have

    \begin{align*}  a_1 &= 1 \\[9pt]  2a_2 &= a_0^2 & \implies && a_2 &= 0 \\[9pt]  3a_3 &= 2a_0 a_1 & \implies && a_3 &= 0 \\[9pt]  4a_4 &= a_1^2 + 2a_0 a_2 & \implies && a_4 &= \frac{1}{4} \\[9pt]  5a_5 &= 2(a_0 a_3 + a_1 a_2) & \implies && a_5 &= 0 \\[9pt]  6a_6 &= a_2^2 + 2(a_0 a_4 + a_1 a_3) & \implies && a_6 &= 0 \\[9pt]  7a_7 &= 2(a_0 a_5 + a_1 a_4 + a_2 a_3) & \implies && a_7 &= \frac{1}{14} \\[9pt]  8a_8 &= a_3^2 + 2(a_0 a_6 + a_1 a_5 + a_2 a_4) & \implies && a_8 &= 0  \\[9pt]  9a_9 &= 2(a_0 a_7 + a_1 a_6 + a_2 a_5 + a_3 a_4) & \implies && a_9 &= 0 \\[9pt]  10a_{10} &= a_4^2 + 2(a_0 a_8 + a_1 a_7 + a_2 a_6 + a_3 a_5) & \implies && a_{10} &= \frac{23}{112}. \end{align*}

(Note: The book gives the value a_{10} = \frac{23}{1120}. I think the answer we have above is correct. I’m marking this as errata unless someone convinces me that Apostol is correct.)

Therefore, we have

    \[ f(x) = x + \frac{1}{4} x^4 + \frac{1}{14} x^7 + \frac{23}{112} x^{10} + \cdots. \]

Find the first four nonzero terms of the power series solution of y′ = x2 + y2

Consider the differential equation

    \[ y' = x^2 + y^2 \]

with initial conditions y = 1 when x = 0. Assume this differential equation has a power-series solution and compute the first four nonzero terms of the expansion.


Let

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

be the power-series solution of the differential equation. Then we must have

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

From the initial condition y = 1 when x = 0 we have a_0 = 1. Therefore, equating like powers of x we have the following equations

    \begin{align*}  a_0 &= 1 \\[9pt]  a_1 &= a_0^2 = 1 \\[9pt]  2a_2 &= 2a_0 a_1 = 2 & \implies && a_2 &= 1 \\[9pt]  3a_3 &= a_1^2 + 2a_0 a_2 + 1 = 4 & \implies && a_3 &= \frac{4}{3}. \end{align*}

Therefore, we have

    \[ y = 1 + x + x^2 + \frac{4}{3} x^3 + \cdots. \]