Celeb Glow
general | April 14, 2026

Fourier representation for $\tan(x)$

$\begingroup$

Q: Which Fourier representation is suitable for $f(x) = \tan(x)$: Fourier trigonometric series, Fourier half-range expansion, or Fourier integral and why?

Well I searched and found that: $\tan(x)$ cannot be expanded as a Fourier series since $\tan(x)$ not satisfies Dirichlet’s.

Isn't there any Fourier representation for $\tan(x)$?

Thanks ^_^

$\endgroup$ 1

2 Answers

$\begingroup$

In terms of generalized functions, there is a Fourier series for $\tan(x)$ on $(-\pi/2,\pi/2)$. To see this, we proceed as follows.

Let $f(x)=\tan(x)$ and let $F(x)\equiv \int_0^x f(t)\,dt$ for $0 \le x< \pi/2$ be an antiderivative of $f(x)$ on $[0,\pi/2)$. Clearly, we have $F(x)=-\log(\cos(x))$.

Next, note that we can write

$$\begin{align} \log(\cos(x))&=\log(e^{ix}+e^{-ix})-\log(2)\\\\ &=\log(1+e^{i2x})-\log(2)-ix\\\\ &=\sum_{n=1}^\infty \frac{(-1)^{n-1}e^{i2nx}}{n}-\log(2)-ix \tag1 \end{align}$$

which after taking the real part of $(1)$ reveals

$$\int_0^x \tan(t)\,dt= -\sum_{n=1}^\infty \frac{(-1)^{n-1} \cos(2nx)}{n}\tag2$$

If we formally differentiate both sides of $(2)$ with respect to $x$, we arrive at the relationship

$$\tan(x)=2\sum_{n=1}^\infty (-1)^{n-1}\sin(2nx)\tag3$$

which is obviously incorrect in the context of real analysis since the series on the right-hand side of $(3)$ diverges for $x\in (0,\pi/2)$.

We can assign, however, a meaning to $(3)$ in the context of generalized functions. Recall that for any suitable test function $\phi$ that has compact support on $[0,\pi/2]$, we have

$$\begin{align} \int_0^{\pi/2} F(x)\phi'(x)\,dx&=-\int_0^{\pi/2}\tan(x)\phi(x)\,dx\\\\ &=-\int_0^{\pi/2} \sum_{n=1}\frac{(-1)^{n-1}}{n}\cos(2nx)\phi'(x)\,dx\\\\ &=-\sum_{n=1}\frac{(-1)^{n-1}}{n} \int_0^{\pi/2} \cos(2nx)\phi'(x)\,dx\\\\ &=-2\sum_{n=1}^{\infty}(-1)^{n-1}\int_0^{\pi/2} \sin(2nx)\phi(x)\,dx \end{align}$$

Then, in distribution we can write

$$\tan(x)\sim 2\sum_{n=1}^\infty (-1)^{n-1}\sin(2nx)\tag4$$

where we interpret $(4)$ for to mean that for any suitable test function with compact support on $[0,\pi/2]$, we have

$$\int_0^{\pi/2}\tan(x)\phi(x)\,dx=2\sum_{n=1}^\infty (-1)^{n-1}\int_0^{\pi/2}\sin(2nx)\phi(x)\,dx\tag 5$$

for $x\in[0,\pi/2)$

Finally, exploiting the symmetry and periodicity we see that $(5)$ holds for all periodic test functions that vanish at odd integral multiples of $\pi/2$.

$\endgroup$ 2 $\begingroup$

$\tan(x)$ is odd with period $\pi$, so the half-range fourier coefficients would be given by $\frac{4}{\pi}\int_0^{\frac{\pi}{2}} \tan(x)\sin(\frac{nx}{2}) \mathrm{d}x$. But the integral diverges. However, if $f(x)=\tan(x)$ for $a<x<b$, where $a>-\frac{\pi}{2}$ and $b<\frac{\pi}{2}$, the periodic etension of $f(x)$ has a fourier transform.

$\endgroup$ 2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy