Find the Maclaurin Series for $e^{\arctan x}$ up to $\mathcal{O}(n^5)$ The question is to find the value of the Maclaurin series expansion of $e^{\arctan x}$ up to (but not including)  $\mathcal{O}(n^5)$.
I tried using the Maclaurin series for $e^{u}$ then subbing $\arctan x$ into it, and I got  $$\sum_{n=0}^{\infty } \frac{(\arctan x)^{n}}{n!}$$
Is this the correct approach to solving this problem or am I missing something? Cause if so I'm not sure when to stop to reach $\mathcal{O}(n^5)$
 A: https://en.wikipedia.org/wiki/Exponential_formula
\begin{align}
\arctan x & = x - \frac{x^3} 3 + \frac{x^5} 5 - \frac{x^7} 7 + \cdots \\[10pt]
& = a_1 x + a_2 \frac{x^2} 2 + a_3 \frac{x^3} 6 + a_4 \frac{x^4}{24} + \cdots \\[10pt]
a_1 & = 1 \\
a_2 & = 0 \\
a_3 & = -1/3 \\
a_4 & = 0 \\
a_5 & = +1/5 \\
& \,\,\,\vdots \\[10pt]
e^{\arctan x} & = 1 + b_1 x + b_2 \frac{x^2} 2 + b_3 \frac{x^3} 6 + b_4 \frac{x^4} {24} + \cdots \\[10pt]
b_1 & = a_1 \\
b_2 & = a_1^2 + a_2 \\
b_3 & = a_1^3 + 3a_1 a_2 + a_3 \\
b_4 & = a_1^4 + 4a_1 a_3 + 3a_2^2 + 6a_1^2 a_2 + a_4 \\
& \text{etc.}
\end{align}
The pattern is this:
The coefficient of $a_2^2$ is $3$ because there are three ways to partition a set of four objects into two sets of two:
$$
ab/cd, \qquad ac/bd, \qquad ad/bc
$$
The coefficient of $a_1^2 a_2$ is $6$ because there are six ways to partition a set of four objects into two sets of one and a set of two:
$$
a/b/cd, \qquad a/c/bd, \qquad a/d/bc, \qquad b/c/ad, \qquad b/d/ac, \qquad c/d/ab
$$
And so on.
Thus
$$
e^{\arctan x} = 1 + x + x^2 + \frac{x^3} 9 - \frac{x^4}{72} + \cdots
$$
You should probably check my arithmetic.
Next we have
$$
b_5 = a_1^5 + 10a_1^3 a_2 + 15a_1 a^2_2 + 10a_1^2 a_3 + 10a_2 a_3 + 5a_1 a_4 + a_5.
$$
A: Composition of series is a very interesting problem.
Suppose $$A=e^{f(x)} \implies \log(A)=f(x)$$ and develop $f(x)$ as 
$$f(x)=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)$$ Now, use
$A=e^{\log(A)}$ and use the expansion of the exponential function. You should get
$$A=e^{f(0)}+e^{f(0)}  f'(0)\,x+\frac{1}{2} e^{f(0)}
   \left(f''(0)+f'(0)^2\right) x^2+\frac{1}{6} e^{f(0)} \left(f^{(3)}(0)+f'(0)^3+3
   f'(0) f''(0)\right)x^3 +\frac{1}{24} e^{f(0)} \left(f^{(4)}(0)+3
   f''(0)^2+f'(0)^4+4 f^{(3)}(0) f'(0)+6 f'(0)^2 f''(0)\right) x^4+O\left(x^5\right)$$ which, for your case, simplify a lot since $f(0)=0$, $f'(0)=1$, $f''(0)=0$, $f^{(3)}(0)=-2$, $f^{(4)}(0)=0$.
In the case of an odd function, this will simplify as
$$A=1+ f'(0)\,x+\frac{1}{2}  f'(0)^2x^2+\frac{1}{6} 
   \left(f^{(3)}(0)+f'(0)^3\right)x^3+\frac{1}{24}  \left(f'(0)^4+4 f^{(3)}(0)
   f'(0)\right)x^4+O\left(x^5\right)$$
A: It is enough to differentiate $f(x)=e^{\arctan x}$ five times, by exploiting $g'(x)=g(x)\cdot\frac{d}{dx}\log g(x)$:
$$ f'(x)=\frac{1}{1+x^2}f(x),\qquad f''(x)=\frac{1-2x}{(1+x^2)^2}f(x),\qquad f'''(x)=\frac{-1-6x+6x^2}{(1+x^2)^3}f(x),$$
$$ f^{IV}(x) = \frac{-7+12x+36x^2-24x^3}{(1+x^2)^4}f(x),\quad f^{V}(x)=\frac{5+140 x-120 x^2-240 x^3+120 x^4}{(1+x^2)^5}f(x) $$
since $f(0)=1$, by evaluating these derivatives at $x=0$ we get
$$ e^{\arctan x} = 1+x+\frac{x^2}{2}-\frac{x^3}{6}-\frac{7 x^4}{24}+\frac{x^5}{24}+o(x^5) $$
in a neighbourhood of the origin.
