I've been asked to integrate
$$\int\frac{\sqrt{1+\ln(x)}}{x\ln(x)}\,dx$$
and I'm well aware that actually there are some ways to solve this problem, so I challenge myself with a slightly longer solution.
I rewrite above integrand as
$$\int\frac{\sqrt{1+\left(\sqrt{\ln(x)}\right)^2}}{x\ln(x)}\,dx$$
$\sqrt{\ln(x)} = \tan(a)$
$\dfrac{1}{2x\sqrt{\ln(x)}}\, dx = \sec^2(a)\, da$.
and so, above expression turn into:
$$2\int\frac{\sec^2(a)\sqrt{1+\tan^2(a)}}{\tan(a)}\, da$$
$$2\int\frac{\sec^3(a)}{\tan(a)}\, da$$
$$2\int\sec^2(a)\csc(a)\, da$$
Here I using integral by parts
$$\int f'g = fg-\int fg'$$
I took,
$$\sec^2(a)= g' ,\tan(a) = g ,\csc(a) = f,-\csc(a)\cot(a)=f'$$
and so above integral resulting:
$$ 2\left[\csc(a)\tan(a)+ \ln\vert \sin(a)+\tan(a)\vert\right]+C$$
and here the consequences of those variable
opposite : $\sqrt{\ln(x)}$
adjacent : $1$
hypotenuse : $\sqrt{\ln(x)+1}$
$$ 2\left[\sqrt{\ln(x)+1}+\ln\left\vert \frac{\sqrt{\ln(x)}}{\sqrt{\ln(x)+1}}
+\sqrt{\ln(x)}\right\vert\right]+C$$
Personally, I don't think I made mistakes but when I check on the calculator, calculator ruled that this answer is wrong, I've been tracking i back over and over but i can't find where I did go wrong,
so please help me to identify my mistakes since if this right the difference should be no more than a constant.
Best Answer
Almost all of your work is correct, apart from the integration by parts step. For $\displaystyle\int \sec^2(a)\csc(a) \, \mathrm da$, let $u = \csc(a)$ and $\mathrm dv = \sec^2(a) \, \mathrm da$ (as you did). Hence, $\mathrm du = -\csc(a)\cot(a) \, \mathrm da$ and $v = \tan(a)$. Using $\displaystyle \int u \, \mathrm dv = uv-\displaystyle\int v \, \mathrm du$, you get:
$$\int \sec^2(a)\csc(a) \, \mathrm da = \csc(a)\cot(a)-\int -\tan(a)\csc(a)\cot(a) \, \mathrm da$$
Clearly, $\tan(a)\cot(a) = 1$ and you can get rid of the double negatives, so:
$$\int \sec^2(a)\csc(a) \, \mathrm da = \csc(a)\cot(a)+\int \csc(a) \, \mathrm da$$
It seems like your only problem was integrating $\csc(a)$, which gives $-\ln\vert \csc(a)+\cot(a)\vert+C$ and not $+\ln\vert \sin(a)+\tan(a)\vert+C$. The rest of your answer, however, is correct, so what you'll get is:
$$\int\frac{\sqrt{1+\ln(x)}}{x\ln(x)}\, \mathrm dx = 2\left[\sqrt{\ln(x)+1}-\ln\left\vert \frac{\sqrt{\ln(x)+1}}{\sqrt{\ln(x)}} +\frac{1}{\sqrt{\ln(x)}}\right\vert\right]+C$$
Extra: I'm suspecting that was just an accident. But here's an explanation in case it wasn't. In order to see how that works, recall that $\dfrac{\mathrm d}{\mathrm da} [\csc(a)] = -\csc(a)\cot(a)$ and $\dfrac{\mathrm d}{\mathrm da}[\cot(a)] = -\csc^2(a)$, so adding them together gives $\dfrac{\mathrm d}{\mathrm da} [\csc(a)+\cot(a)] = -\csc(a)[\csc(a)+\cot(a)]$ (just factoring). Isolating for $\csc(a)$ gives:
$$\csc(a) = -\dfrac{\dfrac{\mathrm d}{\mathrm da}[\csc(a)+\cot(a)]}{\csc(a)+\cot(a)}$$
The RHS is just $-\dfrac{f'(a)}{f(a)}$, which just gives $-\ln\vert f(a)\vert+C$ when integrated by substitution, so:
$$\displaystyle\int \csc(a) \, \mathrm da = -\ln \vert \csc(a)+\cot(a)\vert +C$$