So we were taught in school that when integrating expressions of form $ \int f^{'}(x) f^n(x)$ dx
We get $f^{n+1} + C$
This way something like $\int sin(x)\sqrt{1-cos(x)}$ becomes $(1-cos(x))^{3/2} +C$
The Question now is that can't we integrate $ \sqrt{1-cos(x)}$ as such:
$\int \sqrt{1-cos(x)} = \frac {1}{sin(x)}\bigl(1-cos(x)\bigr) + C $
Is this Integral incorrect? Like I'm aware that this isn't defined for certain values of x, but integrating this way seems much simpler. Just like the reverse power rule i.e. increase the power by 1 and divide by the derivative of the inner function.
Can we do this??
Well, in general we have:
$$\mathcal{I}_\text{n}\left(x\right):=\int\text{y}'\left(x\right)\cdot\left(\text{y}\left(x\right)\right)^\text{n}\space\text{d}x=\frac{\left(\text{y}\left(x\right)\right)^{1+\text{n}}}{1+\text{n}}+\text{C}\tag1$$
And that is not hard to prove using IBP.
So, when $\text{y}'\left(x\right)=\sin\left(x\right)$ we also have $\text{y}\left(x\right)=-\cos\left(x\right)$:
$$\mathcal{I}_\text{n}\left(x\right)=\int\sin\left(x\right)\cdot\left(-\cos\left(x\right)\right)^\text{n}\space\text{d}x=\frac{\left(-\cos\left(x\right)\right)^{1+\text{n}}}{1+\text{n}}+\text{C}\tag2$$
Or, when $\text{y}'\left(x\right)=\sqrt{1-\cos\left(x\right)}$ we also have $\text{y}\left(x\right)=-2\text{y}'\left(x\right)\cot\left(\frac{x}{2}\right)$:
$$\mathcal{I}_\text{n}\left(x\right)=\int\sqrt{1-\cos\left(x\right)}\cdot\left(-2\text{y}'\left(x\right)\cot\left(\frac{x}{2}\right)\right)^\text{n}\space\text{d}x=$$ $$\frac{\left(-2\text{y}'\left(x\right)\cot\left(\frac{x}{2}\right)\right)^{1+\text{n}}}{1+\text{n}}+\text{C}=\frac{\left(-2\sqrt{1-\cos\left(x\right)}\cot\left(\frac{x}{2}\right)\right)^{1+\text{n}}}{1+\text{n}}+\text{C}\tag3$$