# Why does using the following definition of $\sin(x)$ result in the wrong integral for $\int \sin(x)dx$?

Using the following definition of $\sin(x)$

$$\sin(x) \stackrel{\text{def}}{=} \frac{1}{2}\left(e^{ix} - e^{-ix}\right)$$

Results in the following integral

\begin{align} \int \sin(x)\ dx &= \frac{1}{2}\int\left(e^{ix} - e^{-ix}\right) \ dx \\ &= \frac{1}{2i}\left(e^{ix} + e^{-ix}\right) + C \end{align}

But $\int \sin(x)\ dx = -\cos(x) + C \iff \int \sin(x)\ dx = \frac{1}{2}\int\left(e^{ix} + e^{-ix}\right) + C$. Thus the $\frac{1}{i}$ multiplicand is the term here is what is producing the wrong integral.

Is it only possible to integrate $\sin(x)$ and prove $\int \sin(x) = -\cos(x) + C$ via the Taylor Series definition of $\sin(x)$?

$$\sin(x) \stackrel{\text{def}}{=} \sum_{n=0}^{\infty} \frac{(-1)^n}{(2n+1)!}x^{2n+1} \ \ \ \ \ \text{(Taylor Series Definition)}$$

• Your starting definition is missing $i$ at the denominator. – Yves Daoust Aug 8 '16 at 9:30
• Hint: Your definition of the sine function is wrong, so is your antiderivative of $\sin (x)$. – Nigel Overmars Aug 8 '16 at 9:30
• Also, $\int\sin(x)dx$ is not $\cos(x) + C$... – 5xum Aug 8 '16 at 9:43

## 3 Answers

You made the usual mistake in mathematics: sloppyness!

Using the following definition of $\sin(x)$

$$\sin(x) \stackrel{\text{def}}{=} \frac{1}{2}\left(e^{ix} - e^{-ix}\right)$$

Wrong. The formula you wrote evaluates to

$$\frac12(\cos x + i\sin x - (\cos(-x) + i\sin(-x))) = \frac12(\cos x + i\sin x - \cos x + i\sin x) =\frac12 (2i\sin x) = i\sin x \neq \sin x$$

Using the correct formula for $\sin x$ (which is $\frac1{2i}(e^{ix}-e^{-ix}$) will get you:

$$\int \sin x dx = \frac{1}{2i}\int(e^{ix}-e^{-ix})dx =\\ =\frac{1}{2i}\left(\int e^{ix} dx - \int e^{-ix} dx \right)=\\ =\frac{1}{2i}\left(\frac{1}{i}e^{ix} - \frac{1}{-i} e^{-ix}\right)+C=\\ =\frac{1}{2i}\cdot \frac{1}{i}\left(e^{ix} + e^{-ix}\right)+C=\\ =\frac{1}{-2}(\cos x + i\sin x + \cos(-x) + i\sin(-x))+C=\\ =\frac{1}{-2}(\cos x + i\sin x + \cos(x) - i\sin(x))=\\ =\frac{1}{-2}\cdot2\cdot \cos x+C = -\cos x+C$$

Which works out to what you would expect.

• I like "You made the usual mistake in mathematics: sloppyness!" :) +1 – 6005 Aug 8 '16 at 10:11

Notice, Euler's formula (and de Moivre formula):

$$e^{\theta i}=\cos(\theta)+\sin(\theta)i$$

And use:

• $$\cos(-\theta)=\cos(\theta)$$
• $$\sin(-\theta)=-\sin(\theta)$$

So, we get:

$$e^{\theta i}-e^{-\theta i}=\left(\cos(\theta)+\sin(\theta)i\right)-\left(\cos(-\theta)+\sin(-\theta)i\right)=$$ $$\cos(\theta)+\sin(\theta)i-\cos(\theta)+\sin(\theta)i=2\sin(\theta)i$$

So:

$$\sin(\theta)=\frac{e^{\theta i}-e^{-\theta i}}{2i}$$

Now, the integral become:

$$\int\sin(\theta)\space\text{d}\theta=\int\frac{e^{\theta i}-e^{-\theta i}}{2i}\space\text{d}\theta=\frac{1}{2i}\left[\int e^{\theta i}\space\text{d}\theta-\int e^{-\theta i}\space\text{d}\theta\right]=$$ $$\frac{-ie^{\theta i}-ie^{-\theta i}}{2i}+\text{C}=\text{C}-\cos(\theta)$$

By the Euler and de Moivre formulas,

$$e^{ix}-e^{-ix}=(\cos x+i\sin x)-(\cos x-i\sin x)=2i\sin x.$$

Other check:

$$(e^{ix}-e^{-ix})^2=e^{2ix}-2+e^{-i2x}=2\cos(2x)-2,$$ which is a negative number !

The developments of $e^{ix}$ and $e^{-ix}$ differ in the sign of the terms of odd power, so that when you subtract them, only the odd powers remain, and $i^{2k+1}=\pm i$.

You can establish two integrals in a single go, as follows:

$$e^{ix}=\cos x+i\sin x,$$ then omitting the constant,

$$\int e^{ix}dx=\frac{e^{ix}}i=\sin x-i\cos x.$$ Then equate the real and imaginary parts.

• $2 \cos (2x)-2$ isn't always negative, it is certainly always non-positive though :-) – Kevin Aug 8 '16 at 9:47
• @Bacon: with $x$ uniformly spread in $[0,2\pi)$, the expression is almost certainly negative. :) – Yves Daoust Aug 8 '16 at 9:51