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

f = tanh(x)
g = x**2
series = f.subs(x, g).series(x, 1, 2)
print(series)
