# Maclaurin series of $\frac{1}{1+\sin x}$

Find the terms through degree four of the Maclaurin series of $f(x)$.

$$f(x) = \frac{1}{1+\sin x}$$

My work:

The Maclaurin series for $\sin x$ up to degree $4$ is $x - \frac{x^3}{6} + \frac{x^5}{120}$

The Maclaurin series for $\frac{1}{1+x}$ up to degree $4$ is $1 - x + x^2 - x^3 + x^4$

I substituted $x - \frac{x^3}{6} + \frac{x^5}{120}$ for $x$ in $1 - x + x^2 - x^3 + x^4$

Did I do this right? Plugging this into WolframAlpha, I get this: http://goo.gl/SKddyh

Which doesn't seem like the answer in the text: $1-x+x^2-\frac{5x^3}{6}+\frac{2x^4}{3}$

• @ABC Thank you for editing! – Quaxton Hale Feb 27 '14 at 7:41

Have a look at this:

As you can see, what you plugged into WolframAlpha was the same equation as the answer in the text.

You did it right. The answer on WolframAlpha is the same. Try typing "expand" in front on WA.

I do not know if you were obliged to use these steps since there is a direct way of doing this expansion applying the basic rules, that is to say that the Taylor series of $f(x)$ built at $x=0$ just write (up to the fourth degree) $$f(0)+x f'(0)+\frac{1}{2} x^2 f''(0)+\frac{1}{6} f^{(3)}(0) x^3+\frac{1}{24} f^{(4)}(0) x^4+O\left(x^5\right)$$ The value of the function and its first four derivatives are $1,-1 ,2,-5,16$ (they are easy to evaluate bcause $sin(0)=0$ and $cos(0)=1$).
You also have another way : replace in the denominator $sin(x)$ by its Taylor expansion and perform the long division of numerator by denominator.
Your answer is correct, but there is a somewhat simpler method. You are looking for a polynomial $P=a+bx+cx^2+dx^3+ex^4$ such that $P\times(1+x-\frac{x^3}6)\equiv 1\pmod{x^5}$. This gives (by comparing coefficients of $x^0,x^1,\ldots,x^4$) the equations \begin{align}a&=1\\a+b&=0\\b+c&=0\\-\tfrac16a+c+d&=0\\-\tfrac16b+d+e&=0, \end{align} which you can solve straight away as $a=1$, $b=-1$, $c=1$, $d=-\tfrac56$, $e=\tfrac23$.