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

f = x
g = atan(x)
series = f.subs(x, g).series(x, -2, 1)
print(series)
