Calculating $\int x dx$ using trigonometric functions

Well, I tried to solve the integral: $$\int x dx$$ using trigonometric functions instead of using the general formula for it. (If $n \neq -1$,$\int x^n dx=\frac{x^{n+1}}{n+1}+C$)

So I gave it shot in this way:

$$\int x dx = \int \sin\theta \cos\theta d\theta = \dfrac{1}{2}\int \sin2\theta d\theta=\dfrac{1}{2}\big(\dfrac{-1}{2}\cos^2\theta\big)+C=\dfrac{-1}{4}(\cos^2\theta-\sin^2\theta)+C$$

$$x=\sin\theta ,\cos\theta=\sqrt {1-x^2}, dx = \cos\theta d\theta$$

Thus we substitute them:

$$\int x dx = \dfrac{1}{2}\int \sin2\theta d\theta=\dfrac{-1}{4}(\cos^2\theta-\sin^2\theta)+C=\dfrac{-1}{4}+\dfrac{x^2}{2}+C'$$

If I had solved the integral with the general formula I wouldn't have got partial amount of the integration constant($\dfrac{-1}{4}+C'$) as my final answer.

Simply, my question is why another constant would rise up when I do the integration with trigonometric substitution?I know that I can disregard the appeared constant but why does it even rise up?

If I'm still not clear enough, please tell me to correct my question.


There is no other constant, because you see, $\int\sin 2\theta\, d\theta = \dfrac{1 - \cos 2\theta}{2} = \sin^2 \theta$. Oh, what's that, you're saying it's just $\dfrac{-\cos 2\theta}{2}$? Well okay then, I'll say that $\int x\, dx = \dfrac{x^2}{2} -\dfrac{1}{4}$.

I hope you see what's going on. There's no unique anti-derivative. You always make a choice when you write it as some particular function. My favourite example is, $$\int \dfrac{-1}{\sqrt{1 - x^2}} dx = \cos^{-1} x$$ because $\dfrac{d}{dx} \cos^{-1}x = \dfrac{-1}{\sqrt{1 - x^2}}$, but hey $$\int \dfrac{-1}{\sqrt{1 - x^2}} dx = -\int \dfrac{1}{\sqrt{1 - x^2}} dx = -\sin^{-1} x$$ because $\dfrac{d}{dx}\sin^{-1} x = \dfrac{1}{\sqrt{1 - x^2}}$. What's going on? $\dfrac{\pi}{2} - \sin^{-1} x = \cos^{-1} x$.

The example in your question is similar, only there the constant is explicit, it is visible. But there's no reason to say that $1 - \cos2\theta$ is any less of a function that $-\cos2\theta$, so you cannot fundamentally discriminate between the two (when deciding which one the anti-derivative "ought to be").


The constant of integration is arbitrary and two anti-derivatives are equivalent if they differ by a constant.

For example, since $$ \int0\,\mathrm{d}x=C $$ we get not only $$ \int\cos(x)\,\mathrm{d}x=\sin(x)+C $$ but also $$ \begin{align} \int\cos(x)\,\mathrm{d}x &=\int(\color{#C00000}{\cos(x)}+\color{#00A000}{0})\,\mathrm{d}x\\ &=\int\color{#C00000}{\cos(x)}\,\mathrm{d}x+\int\color{#00A000}{0}\,\mathrm{d}x\\[6pt] &=\color{#C00000}{\sin(x)+C}+\color{#00A000}{C} \end{align} $$ where the constants $\color{#C00000}{C}$ and $\color{#00A000}{C}$ are possibly different constants.


In the particular case you give, using $x=\sin(\theta)$, $$ \begin{align} \int x\,\mathrm{d}x &=\int\sin(\theta)\,\cos(\theta)\,\mathrm{d}\theta\\ &=\int\tfrac12\sin(2\theta)\,\mathrm{d}\theta\\ &=-\tfrac14\cos(2\theta)+C\tag{$\ast$}\\[3pt] &=-\tfrac14(1-2\sin^2(\theta))+C\\[3pt] &=\tfrac12\sin^2(\theta)+C-\tfrac14\\[3pt] &=\tfrac12x^2+C-\tfrac14 \end{align} $$ In step $(\ast)$, note that although $x=0$ corresponds to $\theta=0$, $-\frac14\cos(2\theta)=-\frac14$ at $\theta=0$. This is where the $-\frac14$ is introduced, if that is what you are asking about.

However, even simpler alterations to the method of integration can yield different, but equivalent, forms of the constant of integration: $$ \begin{align} \int x\,\mathrm{d}x &=\frac12\int 2x\,\mathrm{d}x\\ &=\frac12\left(x^2+C\right)\\[6pt] &=\tfrac12x^2+\tfrac12C \end{align} $$