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

sequences-and-seriestaylor expansion

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.

Best Answer

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$.

Related Question