Why doesn't every integral from 0 to $2\pi$ equal zero?

4.9k Views Asked by At

Quick question, might end up having a simple answer, but I have here a "proof" that any integral from 0 to $2\pi$ is zero, as follows:

$$\int^{2\pi}_0f(x)dx$$

Now using u-substitution, let $u = \sin x$, so $dx = \frac{du}{\cos x}$, so:

$$\int^{0}_{0}\frac{f(x)du}{\cos x}$$

(The bounds were evaluated to zero due to the u-substituion).

However, this is zero, since the integral goes from zero to zero.

Any help as to why this is wrong would be appreciated.

4

There are 4 best solutions below

2
On BEST ANSWER

the $\sin$ function is not injective on $[0 ; 2\pi]$ so you may not be able to do such a substitution. Since you cannot readily give an inverse, you may have some difficulty expressing everything in terms of $u$.

In your case, the $\cos(x)$ term that appears from the change of variable cannot be expressed only in terms of $u = \sin(x)$, so the thing you are integrating "from $0$ to $0$" is not even a function of $u$ :

$\cos(x)$ is either $+\sqrt{1-u^2}$ or $-\sqrt{1-u^2}$ where the sign depends on $x$ (and not on $u$), and so $\sin(x)dx$ is not of the form $f(\sin(x))\cos(x)dx$ for any function $f$.

To resolve this you can split the integral in three parts (splitting the interval at $\pi/2$ and $3\pi/2$) and do $3$ separate substitutions and you will obtain something true but mostly useless.

Thanks to the user @m_t_ for pointing out that in case this doesn't happen, the substitution rule is applicable.

2
On

let's do it carefully. $$ A = \int_0^{2\pi} f(x)\,dx $$ Use the substitution $u = \sin x$.

We need to compute $x$ in terms of $u$. Well, $x = \arcsin u$, but that only holds for $-\pi/2 \le x \le \pi/2$. Outside that interval, you will have other formulas for $x$ in terms of $u$.

What about computing $dx$? Either $dx = \frac{du}{\sqrt{1-u^2}}$ or $dx = \frac{-\, du}{\sqrt{1-u^2}}$, depending on whether we are in an interval where $\sin x$ is increasing or decreasing.

So your result is not as simple as you thought.

0
On

Write the integral in terms of $u=\sin(x)$. To avoid the places where $\sin(x)$ is not $1{-}1$, we need to break up the integral: $$ \begin{align} \int_0^{2\pi}f(x)\,\mathrm{d}x &=\int_0^1\frac{f(\arcsin(u))}{\sqrt{1-u^2}}\,\mathrm{d}u\\ &-\int_1^{-1}\frac{f(\pi-\arcsin(u))}{\sqrt{1-u^2}}\,\mathrm{d}u\\ &+\int_{-1}^0\frac{f(2\pi+\arcsin(u))}{\sqrt{1-u^2}}\,\mathrm{d}u\\ \end{align} $$ The minus sign in the integral from $1$ to $-1$ is because we need the negative of the square root to get the proper $\cos(x)$.

If we don't pay close attention to the mapping between $x$ and $u$, we can be lead into the fallacy that you suggest.

0
On

Note carefully that you're doing an "inverse" substitution "$u = \sin x$", not an "ordinary (or $u$-)substitution" of the form $x = X(u)$. For your conclusion to follow from the change of variables theorem, you'd need $$ \int_{0}^{2\pi} f(x)\, dx = \int_{0}^{0} g(u)\, du $$ for some function $g$. Your argument proposes "solving" $f(x) = g(\sin x) \cos x$ for $g$, so that $$ \int_{a}^{b} \underbrace{g\bigl(u(x)\bigr) u'(x)}_{f(x)}\, dx = \int_{u(a)}^{u(b)} g(u)\, du. $$ But despite casual appearances, there is no such function $g$ because, as mercio says, your substitution isn't invertible (injective).

In symbols, you want to write $$ g(u) = \frac{f(\arcsin u)}{\cos x} = \frac{f(x)}{\cos x}. $$ However, $\arcsin(\sin x) \neq x$ if $|x| > \pi/2$, so this formal choice doesn't work.

Said another way, the function $\phi(x) = g(\sin x) \cos x$ satisfies the non-trivial symmetry $\phi(\frac{\pi}{2} - x) = -\phi(x)$ for all $x$ ($\phi$ is "odd with respect to $\frac{\pi}{2}$"), while $f$ need not.

Either way, if $f$ is given there is generally no $g$ such that $f(x) = g(\sin x) \cos x$, so your proof doesn't get off the ground.