Integration Question (1 Viewer)

SB257426

Very Important User
I came across an integral that my teacher gave me to do. I have an answer but am unsure if my answer is correct. Other softwares (wolfram alpha and symbolab) are giving me different answers, but I suspect they are algebraically equivalent since they probably have different constants of integration.

I would appreciate it if someone could verify this for me

tywebb

dangerman
$\bg_white \text{How about }-\sqrt{x-x^2}-\sin^{-1}\sqrt{1-x}+C$

$\bg_white \text{If you differentiate this you will get }\sqrt\frac{x}{1-x}$

$\bg_white \text{If you differentiate your answer, you don't.}$

tywebb

dangerman
There are other ways to write the answer like $\bg_white -\sqrt{x-x^2}+\cos^{-1}\sqrt{1-x}+C$, etc., but whichever way you write it, it should have an inverse trig function.

SB257426

Very Important User
There are other ways to write the answer like $\bg_white -\sqrt{x-x^2}+\cos^{-1}\sqrt{1-x}+C$, etc., but whichever way you write it, it should have an inverse trig function.

tywebb

dangerman
Here are 2 methods.

Method 1 - trig substitution

$\bg_white \text{One way is to let }x=\cos^2\theta\text{ so that }\cos\theta=\sqrt x,\ \sin\theta=\sqrt{1-x},$
$\bg_white \theta=\sin^{-1}\sqrt{1-x}\text{ and }dx=-2\cos\theta\sin\theta d\theta.$
\bg_white \begin{aligned}\text{Then }\int\sqrt{\frac{x}{1-x}}dx&=\int\sqrt{\frac{\cos^2\theta}{1-\cos^2\theta}}\ (-2\cos\theta\sin\theta d\theta)\\&=\int-2\cos^2\theta d\theta\\&=-2\int\frac{1}{2}(1+\cos2\theta)d\theta\\&=-\theta-\frac{1}{2}\sin2\theta+C\\&=-\theta-\frac{1}{2}(2\sin\theta\cos\theta)+C\\&=-\sin^{-1}\sqrt{1-x}-\sqrt{1-x}\sqrt x+C\\&=-\sqrt{x-x^2}-\sin^{-1}\sqrt{1-x}+C\end{aligned}

Method 2 - rationalise the numerator

\bg_white \begin{aligned}\int\sqrt{\frac{x}{1-x}}dx&=\int\sqrt{\frac{x}{1-x}}\cdot\sqrt\frac{x}{x}dx\\&=\int\frac{x}{\sqrt{x-x^2}}dx\\&=\int\frac{-\frac{1}{2}(1-2x)+\frac{1}{2}}{\sqrt{x-x^2}}dx\\&=-\frac{1}{2}\int\frac{1-2x}{\sqrt{x-x^2}}dx+\frac{1}{2}\int\frac{1}{\sqrt{\frac{1}{4}-(x-\frac{1}{2})^2}}dx\end{aligned}
$\bg_white \text{So now let }u=x-x^2\text{ and }v=\textstyle{x-\frac{1}{2}}\text{ so that }du=(1-2x)dx$
$\bg_white \text{and }dv=dx.\text{ Then }$
\bg_white \begin{aligned}\int\sqrt\frac{x}{1-x}dx&=-\frac{1}{2}\int u^{-\frac{1}{2}}du+\frac{1}{2}\int\frac{1}{\sqrt{\frac{1}{4}-v^2}}dv\\&=-u^\frac{1}{2}+\frac{1}{2}\sin^{-1}2v+C\\&=-\sqrt{x-x^2}+\frac{1}{2}\sin^{-1}(2x-1)+C\end{aligned}

Notice this differs from the previous answer. However you can see that $\bg_white \textstyle\frac{1}{2}\sin^{-1}(2x-1)$ and $\bg_white -\sin^{-1}\sqrt{1-x}$ differ by a constant by showing that $\bg_white \frac{d}{dx}(\textstyle\frac{1}{2}\sin^{-1}(2x-1)+\sin^{-1}\sqrt{1-x})=0$ and hence the 2 answers only differ by a constant.

Last edited:

SB257426

Very Important User
Here are 2 methods.

Method 1 - trig substitution

$\bg_white \text{One way is to let }x=\cos^2\theta\text{ so that }\cos\theta=\sqrt x,\ \sin\theta=\sqrt{1-x},$
$\bg_white \theta=\sin^{-1}\sqrt{1-x}\text{ and }dx=-2\cos\theta\sin\theta d\theta.$
\bg_white \begin{aligned}\text{Then }\int\sqrt{\frac{x}{1-x}}dx&=\int\sqrt{\frac{\cos^2\theta}{1-\cos^2\theta}}\ (-2\cos\theta\sin\theta d\theta)\\&=\int-2\cos^2\theta d\theta\\&=-2\int\frac{1}{2}(1+\cos2\theta)d\theta\\&=-\theta-\frac{1}{2}\sin2\theta+C\\&=-\theta-\frac{1}{2}(2\sin\theta\cos\theta)+C\\&=-\sin^{-1}\sqrt{1-x}-\sqrt{1-x}\sqrt x+C\\&=-\sqrt{x-x^2}-\sin^{-1}\sqrt{1-x}+C\end{aligned}

Method 2 - rationalise the numerator

\bg_white \begin{aligned}\int\sqrt{\frac{x}{1-x}}dx&=\int\sqrt{\frac{x}{1-x}}\cdot\sqrt\frac{x}{x}dx\\&=\int\frac{x}{\sqrt{x-x^2}}dx\\&=\int\frac{-\frac{1}{2}(1-2x)+\frac{1}{2}}{\sqrt{x-x^2}}dx\\&=-\frac{1}{2}\int\frac{1-2x}{\sqrt{x-x^2}}dx+\frac{1}{2}\int\frac{1}{\sqrt{\frac{1}{4}-(x-\frac{1}{2})^2}}dx\end{aligned}
$\bg_white \text{So now let }u=x-x^2\text{ and }v=\textstyle{x-\frac{1}{2}}\text{ so that }du=(1-2x)dx$
$\bg_white \text{and }dv=dx.\text{ Then }$
\bg_white \begin{aligned}\int\sqrt\frac{x}{1-x}dx&=-\frac{1}{2}\int u^{-\frac{1}{2}}du+\frac{1}{2}\int\frac{1}{\sqrt{\frac{1}{4}-v^2}}dv\\&=-u^\frac{1}{2}+\frac{1}{2}\sin^{-1}2v+C\\&=-\sqrt{x-x^2}+\frac{1}{2}\sin^{-1}(2x-1)+C\end{aligned}

Notice this differs from the previous answer. However you can see that $\bg_white \textstyle\frac{1}{2}\sin^{-1}(2x-1)$ and $\bg_white -\sin^{-1}\sqrt{1-x}$ differ by a constant by showing that $\bg_white \frac{d}{dx}(\textstyle\frac{1}{2}\sin^{-1}(2x-1)+\sin^{-1}\sqrt{1-x})=0$ and hence the 2 answers only differ by a constant.
Thanks once again for your reply!!! I wanted to try a unique method so I did use rationalise the numerator instead of trig sub. Referring to my working l, I made a silly algebra mistake resulting to my answer. I attempted it once more and got your answer

Drongoski

Well-Known Member
Here are 2 methods.

Method 1 - trig substitution

$\bg_white \text{One way is to let }x=\cos^2\theta\text{ so that }\cos\theta=\sqrt x,\ \sin\theta=\sqrt{1-x},$
$\bg_white \theta=\sin^{-1}\sqrt{1-x}\text{ and }dx=-2\cos\theta\sin\theta d\theta.$
\bg_white \begin{aligned}\text{Then }\int\sqrt{\frac{x}{1-x}}dx&=\int\sqrt{\frac{\cos^2\theta}{1-\cos^2\theta}}\ (-2\cos\theta\sin\theta d\theta)\\&=\int-2\cos^2\theta d\theta\\&=-2\int\frac{1}{2}(1+\cos2\theta)d\theta\\&=-\theta-\frac{1}{2}\sin2\theta+C\\&=-\theta-\frac{1}{2}(2\sin\theta\cos\theta)+C\\&=-\sin^{-1}\sqrt{1-x}-\sqrt{1-x}\sqrt x+C\\&=-\sqrt{x-x^2}-\sin^{-1}\sqrt{1-x}+C\end{aligned}

Method 2 - rationalise the numerator

\bg_white \begin{aligned}\int\sqrt{\frac{x}{1-x}}dx&=\int\sqrt{\frac{x}{1-x}}\cdot\sqrt\frac{x}{x}dx\\&=\int\frac{x}{\sqrt{x-x^2}}dx\\&=\int\frac{-\frac{1}{2}(1-2x)+\frac{1}{2}}{\sqrt{x-x^2}}dx\\&=-\frac{1}{2}\int\frac{1-2x}{\sqrt{x-x^2}}dx+\frac{1}{2}\int\frac{1}{\sqrt{\frac{1}{4}-(x-\frac{1}{2})^2}}dx\end{aligned}
$\bg_white \text{So now let }u=x-x^2\text{ and }v=\textstyle{x-\frac{1}{2}}\text{ so that }du=(1-2x)dx$
$\bg_white \text{and }dv=dx.\text{ Then }$
\bg_white \begin{aligned}\int\sqrt\frac{x}{1-x}dx&=-\frac{1}{2}\int u^{-\frac{1}{2}}du+\frac{1}{2}\int\frac{1}{\sqrt{\frac{1}{4}-v^2}}dv\\&=-u^\frac{1}{2}+\frac{1}{2}\sin^{-1}2v+C\\&=-\sqrt{x-x^2}+\frac{1}{2}\sin^{-1}(2x-1)+C\end{aligned}

Notice this differs from the previous answer. However you can see that $\bg_white \textstyle\frac{1}{2}\sin^{-1}(2x-1)$ and $\bg_white -\sin^{-1}\sqrt{1-x}$ differ by a constant by showing that $\bg_white \frac{d}{dx}(\textstyle\frac{1}{2}\sin^{-1}(2x-1)+\sin^{-1}\sqrt{1-x})=0$ and hence the 2 answers only differ by a constant.
Got the same answer as in your Method-2, using almost the same approach. Didn't post as I was not sure if my answer was correct.

Last edited:

s97127

Active Member
I came across an integral that my teacher gave me to do. I have an answer but am unsure if my answer is correct. Other softwares (wolfram alpha and symbolab) are giving me different answers, but I suspect they are algebraically equivalent since they probably have different constants of integration.