Maclaurin Series Expansion of $\ln(1+\sin x)$

Hello can anyone help with this question Show that the Maclaurin series of the function $$\ln(1+\sin x)$$ up to the term in $$x^4$$ is $$x-x^2/2 + x^3/6 - x^4/12 + \ldots$$ So I know the expansion for $$\ln(1+x)= x - x^2 + x^3/3 +\dots$$ and that of $$\sin x= x - x^3/3!+x^5/5!-\dots$$ hence I tried by substituting the first two terms of $$\sin x$$ into the expansion of $$\ln(1+x)$$ to get $$\ln(1+x-x^3/6)$$ up to the $$x^4$$ term of the expansion of $$\ln(1+x)$$. But I got stucked with the algebra so I will value the help anyone can provide.

• Welcome to Math.SE. What have you accomplished so far? Please edit your post and add that information, and while you're at it, use MathJax. – Ertxiem Apr 26 at 7:17
• Do you know how to compute a Maclaurin series in general? – Milan Apr 26 at 8:36
• Do you know how to compute the MacLaurin Series of a given function? This is slightly different from knowing the MacLaurin Series of well-known functions... Your current ansatz is not quite correct though. – mrtaurho Apr 26 at 13:16
• Welcome to Math.SE! Please use MathJax. For some basic information about writing math at this site see e.g. basic help on mathjax notation, mathjax tutorial and quick reference, main meta site math tutorial and equation editing how-to. – GNUSupporter 8964民主女神 地下教會 Apr 26 at 13:16
• Take a look at my answer. Hopefully it helps you, if so you could accept it to show that you are satisfied of tell what I could improve :) – mrtaurho Apr 29 at 20:31

What you tried is, however, an interesting attempt to solve the given task but not quite right. It is in fact (and please don't ask me why) correct up a few terms if you finish what you tried. Anyway, this is not the standard way of finding a MacLaurin Series of a given function.

Recall, a MacLaurin Series Expansion is a Taylor Series Expansion centered at $$0$$. By Taylor's Theorem we know that the series expansion is then given by

$$f(x)=\sum_{n=0}^\infty\frac{f^{(n)}(0)}{n!}x^n\tag1$$

Since you are only asked to find the expansion up to the $$x^4$$-term we only need to compute the first four derivatives and evaluate them at $$0$$. Thus, we obtain \begin{align*} &f(x)=\ln(1+\sin x),&&f(0)=\ln(1+0)=0\\ &f^{(1)}(x)=\frac{\cos x}{1+\sin x},&&f^{(1)}(0)=\frac1{1+0}=1\\ &f^{(2)}(x)=-\frac1{1+\sin x},&&f^{(2)}(0)=-\frac1{1+0}=-1\\ &f^{(3)}(x)=\frac{\cos x}{(1+\sin x)^2},&&f^{(3)}(0)=\frac1{(1+0)^2}=1\\ &f^{(4)}(x)=-\frac{1+\sin x+\cos^2x}{(1+\sin x)^3},&&f^{(4)}(0)=-\frac{1+0+1}{(1+0)^3}=-2 \end{align*} Plugging these values in $$(1)$$ we obtain \begin{align*} \ln(1+\sin x)&=f(0)+f^{(1)}(0)x+\frac{f^{(2)}(0)}{2}x^2+\frac{f^{(3)}(0)}{6}x^3+\frac{f^{(4)}(0)}{24}x^4+\cdots\\ &=0+1\cdot x-\frac12x^2+\frac16x^3-\frac2{24}x^4+\cdots\\ &=x-\frac{x^2}2+\frac{x^3}6-\frac{x^4}{12}+\cdots \end{align*}

$$\therefore~\ln(1+\sin x)~=~x-\frac{x^2}2+\frac{x^3}6-\frac{x^4}{12}+\cdots$$

In a similiar way you can obtain the MacLaurin Series Expansions for $$sin x$$ or $$\ln(1+x)$$. Just substituting one into another isn't the afterall the exspected way to do this but rather computing the derivatives at $$0$$.

• @BarryCipra Interesting. But sadly speaking you are doing something wrong. According to WolframAlpha aswell as to my own calculator the second derivative is given by $$f^{(2)}(x)=-\frac{\sin^2x+\cos^2x+\sin x}{(1+\sin x)^2}$$ which simplifies to the one I gave above. – mrtaurho Apr 28 at 12:14
• @BarryCipra No problem with your comment :) It forced me to double check my own answer which isn't that bad I guess ^^ – mrtaurho Apr 28 at 13:10
• It never hurts to doublecheck. I actually did doublecheck my own calculation. I should have triplechecked it.... – Barry Cipra Apr 28 at 13:21
• I can see that you used the Taylor expansion. Unfortunately I am yet to study that. But I will see if I can make sense of that – Maxwell Agyemang Apr 30 at 5:11
• @MaxwellAgyemang Oh, that explains a lot. Furthermore I have to admit that your ansatz is in fact correct. I was not aware of this procedure and thus asked a question here dealing with this issue. The main problem with the algebra of your approach are the terms of higher power which you do not need but which are annoying to deal with. A soon as I got some time I will add this approach to my solution. – mrtaurho Apr 30 at 5:15