Problem:

Find the coefficient of the second term in the series expansion of the following function around 2:

$\tan \left(\frac{x^4}{2}\right)$

from sympy import *
from sympy.abc import x

f = S(tan(((x**4)/2)))
series = f.series(x, 2, None)
for i, term in enumerate(series):
    if i == 2: print(term)
    elif i > 2: break
print(0)

