# How do you use substitution to integrate 2/(xsqrt(4lnx- (lnx)^2 ))?

Jul 23, 2015

The answer turned out to be $4 \arcsin \left(\frac{\sqrt{\ln x}}{2}\right) + C$. Just a note; Wolfram Alpha gives a much more complicated answer, and it's not particularly nice of a result when, for example, you are typing it in for an online homework problem.

Wolfram Alpha gives its alternative answer as:

$= \frac{4 \sqrt{\ln x - 4} \sqrt{\ln x} \ln \left(\sqrt{\ln x - 4} + \sqrt{\ln x}\right)}{\sqrt{- \left(\ln x - 4\right) \ln x}}$

$= \frac{4 \sqrt{\ln x - 4} \sqrt{\ln x} \ln \left(\sqrt{\ln x - 4} + \sqrt{\ln x}\right)}{\sqrt{4 \ln x - {\ln}^{2} x}}$

which... let's face it, looks terrible! :)

I feel like trig substitution should be done somewhere here... Let's say for now...

Let:
$u = \ln x$
$\mathrm{du} = \frac{1}{x} \mathrm{dx}$

$\implies \int \frac{2}{x \sqrt{4 u - {u}^{2}}} \mathrm{dx}$

$= 2 \int \frac{1}{\sqrt{4 u - {u}^{2}}} \mathrm{du}$

Okay, so this looks a little better. What if we factored something out?

$= 2 \int \frac{1}{\sqrt{u} \sqrt{4 - u}} \mathrm{du}$

$= 2 \int \frac{1}{\sqrt{u} \sqrt{{2}^{2} - {\left(\sqrt{u}\right)}^{2}}} \mathrm{du}$

Now, what if we said...
$\sqrt{u} = 2 \sin \theta$
$u = 4 {\sin}^{2} \theta$
$\mathrm{du} = 8 \sin \theta \cos \theta d \theta$
$\sqrt{4 - u} = \sqrt{{2}^{2} - {2}^{2} {\sin}^{2} \theta} = 2 \cos \theta$

More manageable now.

$= 2 \int \frac{1}{\cancel{2} \cancel{\sin \theta} \cancel{2} \cancel{\cos \theta}} \cdot {\cancel{8}}^{2} \cancel{\sin \theta \cos \theta} d \theta$

$= 4 \int d \theta$

Huh? How... easy?

$= 4 \theta$

Now, we had $2 \sin \theta = \sqrt{u}$, so:

$\theta = \arcsin \left(\frac{\sqrt{u}}{2}\right)$

Thus:

$\theta = \arcsin \left(\frac{\sqrt{\ln x}}{2}\right)$

And so we have:

$= \textcolor{b l u e}{4 \arcsin \left(\frac{\sqrt{\ln x}}{2}\right) + C}$

That is our answer. It seems rather intuitive considering the resemblance of the original with $\frac{1}{\sqrt{1 - {u}^{2}}}$.

Let's try to differentiate this and see if we get back to the original.

$\frac{\mathrm{dy}}{\mathrm{dx}} \left[\arcsin u\right] = \frac{1}{\sqrt{1 - {u}^{2}}} \left(\frac{\mathrm{du}}{\mathrm{dx}}\right)$

Thus, with $u = \frac{\sqrt{\ln x}}{2}$, we have, after some Chain Rule action...

Cancel out terms:
$4 \frac{d}{\mathrm{dx}} \left[\arcsin \left(\frac{\sqrt{\ln x}}{2}\right)\right] = \cancel{4} \cdot \frac{1}{\sqrt{1 - {\left(\frac{\sqrt{\ln} x}{2}\right)}^{2}}} \cdot \frac{1}{\cancel{2}} \cdot \frac{1}{\cancel{2} \sqrt{\ln x}} \cdot \frac{1}{x}$

Shift values around:
$= \frac{1}{x \sqrt{\ln x} \sqrt{1 - {\left(\frac{\sqrt{\ln} x}{2}\right)}^{2}}}$

Multiply out the square:
$= \frac{1}{x \sqrt{\ln x} \sqrt{1 - \frac{\ln x}{4}}}$

Distribute into the square root:
$= \frac{1}{x \sqrt{\ln x - {\left(\ln x\right)}^{2} / 4}}$

Factor $\sqrt{\frac{1}{4}}$ out:
$= \frac{1}{x \sqrt{\frac{1}{4}} \sqrt{4 \ln x - {\left(\ln x\right)}^{2}}}$

Shift that around:
$= \frac{\sqrt{4}}{x \sqrt{4 \ln x - {\left(\ln x\right)}^{2}}}$

Done!
$= \textcolor{g r e e n}{\frac{2}{x \sqrt{4 \ln x - {\left(\ln x\right)}^{2}}}}$