# calculus and analysis – How to expand Lie characters?

The following involves characters of affine Lie algebras, and I will be using as reference the book on CFT by Francesco et at (here are some screenshots if useful). But hopefully the post will be self-contained.

Let
$$Theta^k_lambda=sum_{ninmathbb Z}expbig(-2pi i(knz+frac12lambda z-kn^2tau-nlambdatau-lambda^2tau/4k)big)tag{14.176}$$
and
$$chi^k_lambda=frac{Theta^{k+2}_{lambda+1}-Theta^{k+2}_{-lambda-1}}{Theta^2_1-Theta^2_{-1}}tag{14.174}$$

The idea is to expand $$chi$$ for $$lambda=k=1$$, $$z=0$$, in powers of $$q=e^{2pi i tau}$$. The expected result is
$$chi^1_1=q^{5/24}(2+2q+6q^2+8q^3+cdots)tag{14.179}$$

How can I use Mathematica to recover eq.$$14.179$$ from the other two equations? The naive approach does not quite work, because $$chi$$ yields an indeterminate form if we take $$lambda=1,z=0$$ directly. And the sum does not converge for $$|mathrm{re}(q)|<1$$ (and it cannot be analytically continued), so the expansion around $$q=0$$ is only asymptotic (not a proper power series in the strict sense).