December 27, 2009

Find the Maclaurin Series for sqrt(x+1)

Filed under: Uncategorized — Tags: — aspensmonster @ 7:41 am

Flattr this!

(Noting that LaTeX code cannot be put inside a post title)

This problem was given on a Calculus II review a few semesters back. Our class spent all 50 minutes trying to develop an expression for the given Maclaurin series, but could not find one. The best we could do was tack on an additional infinite series to the expressions we did develop. One all-nighter and a bunch of caffeine later, I found an expression.

Problem statement:

Find the Maclaurin series for f(x) = \sqrt{x+1}


First, we will make a table of the values for f^{n}(x) and f^{n}(0):

(Noting that LaTeX tables are not supported with standard WP)

n f^{n}(x) f^{n}(0)
0 \left(x+1\right)^{1/2} \frac{1}{1}
1 \frac{1}{2}\left(x+1\right)^{-1/2} \frac{1}{2}
2 \frac{-1}{4}\left(x+1\right)^{-3/2} \frac{-1}{4}
3 \frac{3}{8}\left(x+1\right)^{-5/2} \frac{3}{8}
4 \frac{-15}{16}\left(x+1\right)^{-7/2} \frac{-15}{16}
5 \frac{105}{32}\left(x+1\right)^{-9/2} \frac{105}{32}
6 \frac{-945}{64}\left(x+1\right)^{-11/2} \frac{-945}{64}
7 \frac{10395}{128}\left(x+1\right)^{-13/2} \frac{10395}{128}
8 \frac{-135135}{256}\left(x+1\right)^{-15/2} \frac{-135135}{256}

The denominator of this expression is clear: 2^{n}. However, the numerator is being a pain in the ass right off the bat:

  • The first two values (of the fraction as a whole, not just the numerator) are positive before alternating sign
  • The first three values (of the numerator) have magnitude 1
  • The remaining values (of the numerator) follow a seemingly benign sequence: 3, 15, 105, 945, 10395, 135135

To make this easier to analyze, ignore signs for now and simply focus on magnitudes. In doing this, notice the following pattern:

n numerator magnitude factored
0 1 1
1 1 1
2 1 1
3 3 1*3
4 15 1*3*5
5 105 1*3*5*7
6 945 1*3*5*7*9
7 10395 1*3*5*7*9*11
8 135135 1*3*5*7*9*11*13

Isn’t that sexy? It’s behaving in a factorial manner once we get past the first two values, but only with odd numbers! This right here is what made finding the solution an all-nighter. I tried for several hours to develop an expression that yielded such behavior. I failed. Instead I went to Google and found, via Wolfram Mathworld, that this sort of thing is called a double factorial:

  \left(n\right)!! \equiv \begin{cases} n\left(n-2\right)...5\cdot 3\cdot 1 & n > 0, odd \\ n\left(n-2\right)...6\cdot 4\cdot 2 & n > 0, even \\ 1 & \text{n=-1,0} \end{cases}  

So… we could try to define our numerator as \left(2n-3\right)!!. We do this because we want the first three values to equate to one. When n is one or two, we get the expected “ones” at the beginning of the sequence. When n is three or greater, the pattern of 3, 15, 105 … holds. However, there is a problem if we try to take care of the zero case: n!! is undefined for -3. So the question becomes: How can we take care of the zero case while also ensuring that the pattern is taken care of? Another question becomes: Why the fuck is this problem so difficult?

Well, we could do this:


Which takes care of that pesky zero case while also maintaining the pattern. As it turns out, there is another expression that can help us simplify this expression even further:

  =[\left(2n-1\right)\left(2n-3\right)\cdots 1][2n][2\left(n-1\right)][2\left(n-2\right)]\cdots 2\left(1\right) \\  
  =[\left(2n-1\right)\left(2n-3\right)\cdots 1][2n\left(2n-2\right)\left(2n-4\right)\cdots 2] \\   
  =2n\left(2n-1\right)\left(2n-2\right)\left(2n-3\right)\left(2n-4\right)\cdots 2\left(1\right) \\   

Which gives: \left(2n-1\right)!! = \frac{\left(2n\right)!}{2^{n}n!}

So… we now have the numerator figured out; the “ones” all work and the benign sequence still follows. Which means we have the entire f^{n}\left(0\right) fraction figured out as well:

\frac{\left(2n-3\right)!!}{2^{n}} \equiv \frac{\frac{\left(2n-1\right)!!}{2n-1}}{2^{n}} \equiv \frac{\frac{\left(2n\right)!}{2^{n}n!\left(2n-1\right)}}{2^{n}} \equiv \frac{\left(2n\right)!}{4^{n}n!\left(2n-1\right)}

So… we have an expression that solves two of our three gripes with this problem:

  • The first three values of the numerator have magnitude 1
  • The remaining values of the numerator follow a seemingly benign sequence: 3, 15, 105, 945, 10395, 135135

Like I said, lets continue to ignore signs for now. Plugging them in at this point would still only give you the first term being negative with the rest being positive anyway. Now that we have the fraction taken care of, there is nothing left to do but add the x^{n} and \frac{1}{n!} and \left(-1\right)^{n} into the mix to complete the sequence that this infinite series expands to:

a_{n} = \frac{\left(-1\right)^{n}\left(2n\right)!}{4^{n}n!^{2}\left(2n-1\right)}x^{n}

\left(x+1\right)^{1/2} = \displaystyle\sum_{n=0}^{\infty} \frac{\left(-1\right)^{n}\left(2n\right)!}{4^{n}n!^{2}\left(2n-1\right)}x^{n} = \displaystyle\sum_{n=0}^{\infty} a_{n}

But alas, the signs are wrong. From n=0 to infinity, we have negative, negative, positive, negative, postive, negative, etc. What we need to do is swap these. The key? Change \left(2n-1\right) in the denominator to \left(1-2n\right) . This maintains the magnitudes and provides the needed swap of signs. It also gives the final answer:

\left(x+1\right)^{1/2} = \displaystyle\sum_{n=0}^{\infty} \frac{\left(-1\right)^{n}\left(2n\right)!}{4^{n}n!^{2}\left(1-2n\right)}x^{n}

Isn’t math awesome?