Problem:
Find the third order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \tan \left(x^5\right)$ and $g(x) = $\tan ^{-1}(x)$
from sympy import *
from sympy.abc import x

f = tan(x**5)
g = atan(x)
series = f.subs(x, g).series(x, 0, 3)
print(series)
