# Decomposition into spherical harmonics

I'm trying to follow a text I found online. The author decomposes EM fields such

$$\mathbf{E} = \sum_{lm}\left(f_l(r) \mathbf{Y}_{lm} - i \frac{l(l+1)}{r} g_l(r) \mathbf{\Psi}_{lm} - i\left(\frac{d g_l(r)}{dr} + g_l(r) \right) \Phi_{lm}\right) e^{-i\omega t}$$ $$\mathbf{B} = \sum_{lm}\left(g_l(r) \mathbf{Y}_{lm} + i \frac{l(l+1)}{r} f_l(r) \mathbf{\Psi}_{lm} + i\left(\frac{d f_l(r)}{dr} + f_l(r) \right) \Phi_{lm}\right)e^{-i\omega t}$$ Where the functions are defined as $$\mathbf{Y}_{lm} = r \mathbf{n} \times \mathbf{\nabla} Y_{lm}$$ $$\mathbf{\Psi}_{lm} = r \mathbf{\nabla} Y_{lm}$$ $$\mathbf{Y}_{lm} = Y_{lm} \mathbf{n}$$ where $$\mathbf{n}$$ is the position vector $$\mathbf{n} = \mathbf{r}/r$$, $$Y_{lm}$$ are the vector spherical harmonics (the arguments $$\theta, \phi$$ are omitted), $$f_l(r),g_l(r)$$ are either the spherical Bessel functions or the spherical Bessel functions dependent only on the radial coordinate and $$\mathbf{\nabla}$$ is the gradient.

Now the author states, that using the equations $$\mathbf{n} \times \mathbf{E} = 0$$ $$\mathbf{n} \cdot \mathbf{B} = 0$$ and by utilizing the spherical harmonics orthogonality we get $$f_l(r) = 0$$ $$\frac{d g_l(r)}{dr} = 0$$ But this doesn't work for me , I always get $$\frac{dg_l(r)}{dr} + r g_l(r) = 0$$ Could someone check the answer with me or prove me wrong? For further reading on the functions $$(\mathbf{Y},\mathbf{\Psi},\mathbf{\Phi})$$ please refer to this text.