Problem:
Find the fourth order expansion about $x = -2$ of the composition $f(g(x))$ for $f(x) = x^2$ and $g(x) = $x$
from sympy import *
from sympy.abc import x

f = x**2
g = x
series = f.subs(x, g).series(x, -2, 4)
print(series)
