Power series of $f(x)=\ln(1+\sin(x))$ around $x_0=0$ At class we were given the following question:

Let $f(x)=\ln(1+\sin(x))$. Expand $f(x)$ into a power series around $x_0=0$, a.k.a. find $\sum_{0}^{\infty} a_n x^n$ that converge to $f(x)$ at $(-\delta, \delta)$.

We saw at class how to use the multiplication rule to expand functions such as $f(x)g(x)$ (e.g. $\sin(x)\cos(x)$ etc.), but idk how to deal with nested functions.
I thought of using the definition
$\ln(1+x) = \sum_{n=0}^{\infty} \frac{(-1)^nx^{n+1}}{(n+1)}$
and then substitute $x=\sin(x)$ when
$\sin(x)=\sum_{n=0}^{\infty} \frac{(-1)^n x^{2n}}{(2n)!}$
But I'm not sure that that's the appropriate approach. I'd be thankful for your help!
 A: I agree with @saulspatz that the likely intent of the question is to compute the first few terms.  That said, I wondered if one could find a closed form for those terms. I think it might be possible, but it seems quite ugly!
Define $f(x)=\ln(1+\sin(x))$. Then
$$\begin{split}
f^\prime(x)&=\frac {\cos x}{1+\sin x}\\
&=\cot\left(\frac x 2 +\frac \pi 4\right) \,\,\, \left (\text{since }\cot\frac u 2=\frac {\sin u}{1-\cos u}\right)\\
\end{split}$$
Using the power series for $\cot$:
$$\begin{split}
f^\prime(x) &= \sum_{n \mathop = 0}^\infty \frac {\left({- 1}\right)^n 2^{2 n} B_{2 n} \, \left ( \frac x 2 +\frac \pi 4\right )^{2 n - 1} } {\left({2 n}\right)!}\\
&= \frac 1 {\frac x 2 +\frac \pi 4} + \sum_{n \mathop = 1}^\infty \frac {\left({- 1}\right)^n 2^{2 n} B_{2 n}} {\left({2 n}\right)!} \sum_{k=0}^{2n-1}{ {2n-1} \choose k}\left(\frac{\pi}{4}\right)^{2n-1-k}\frac{x^k}{2^k}\\
&= \frac 2 {x +\frac \pi 2} + \sum_{k \mathop = 0}^\infty\left(  \sum_{n=\lceil \frac {k+1} 2 \rceil}^{+\infty}{ {2n-1} \choose k}\left(\frac{\pi}{4}\right)^{2n-1-k}\frac{1}{2^k}\frac {\left({- 1}\right)^n 2^{2 n} B_{2 n}} {\left({2 n}\right)!}\right)x^k\\
\end{split}$$
So, using the fact that $f(0)=0$, 
$$\begin{split}
f(x) =& 2\ln\left(1 + \frac 2 \pi x\right)+\sum_{k \mathop = 0}^\infty\left(  \sum_{n=\lceil \frac {k+1} 2 \rceil}^{+\infty}{ {2n-1} \choose k}\left(\frac{\pi}{4}\right)^{2n-1-k}\frac{1}{2^k}\frac {\left({- 1}\right)^n 2^{2 n} B_{2 n}} {\left({2 n}\right)!}\right)\frac{x^{k+1}}{k+1}
\end{split}$$
and you can expand the log as a power series as well, giving you one power series for the whole thing. Yep, it's pretty ugly, but at least there seems to be a closed form for the coefficients (as long as you can compute Bernoulli numbers).
