# Solving $\int\frac{\sqrt{4+x}}x\, \text dx$

Solve $$\int\frac{\sqrt{4+x}}x\, \text dx$$

I tried different ways of integrating, but never found the correct answer, and worse still I can't figure out why my reasoning is flawed.

I want to use trig substition, so I do a $u$ sub \begin{align}u&=\sqrt x \\ du&=\frac12\sqrt x\end{align}

This gives me \begin{align}2u\sqrt{4+u^2}{u^2} \to 2\int \sqrt{4+u^2}{u}\end{align}

Then I use the trig sub

\begin{align}u&=2\tan(t) \\ du&=2\sec^2(t)dt\end{align}

So $$\frac{\sec^2(t)\sqrt{4(1+\tan^2(t)}}{2\tan(t)}=2\int \frac{\sin(t)}{\cos^2(t)}$$

Then I use the integration by parts to obtain

$$\frac1{\cos(t)}+2\int \frac{\sin(t)}{\cos^2(t)}$$

Which would mean $$1\frac1{\cos(t)} = 0$$ which cannot be

How to proceed?

• Here's a tutorial in MathJax – Sahiba Arora Jun 13 '17 at 12:18
• I'll use it next time I post, sorry about that – Lazarus Jaeger Jun 13 '17 at 12:27
• @LazarusJaeger This isn't your first question, and all your previous questions had to be edited so that the math was rendering. Please take the time to make your questions readable in the future. – Simply Beautiful Art Jun 13 '17 at 12:47
• You're right, I meant what I said though – Lazarus Jaeger Jun 13 '17 at 12:48
• I thought I needed to use trig substition, turns out I just made it harder that way. Thank you all for helping me! – Lazarus Jaeger Jun 13 '17 at 12:54

## 4 Answers

HINT, use a substitution:

$$\text{u}:=\sqrt{4+x}\tag1$$

$$u^2=x+4\implies 2u\,du=dx\implies \int\frac{\sqrt{x+4}}xdx=\int\frac u{u^2-4}2u\,du=$$

$$2\int\frac{u^2}{u^2-4}du=2\int\left(1+\frac4{u^2-4}\right)du$$

The last ones above are almost-almost immediate integrals. Can you take it from here?

Setting $$\sqrt{4+x}=t$$ then we get $$x=t^2-4$$ and $$dx=2tdt$$ and our integral is given by $$\int \frac{t}{t^2-4}2tdt$$

$$\int\frac{\sin t}{\cos^2t}dt=\frac1{\cos t}+C,$$ immediately.

• except the solution is suposed to be 2(ln(∣∣√x+4−2∣∣)−ln(√x+4+2)+√x+4)+C :/ – Lazarus Jaeger Jun 13 '17 at 12:28
• @LazarusJaeger That answer you should get when you get back to the original variable...which is exactly what happens also with my answer. You must substitute back . – DonAntonio Jun 13 '17 at 12:42
• @LazarusJaeger: my answer addresses the part of your development that went wrong. The rest is routine work. And there is no "except" as this concerns the integral on the $t$ variable. – Yves Daoust Jun 13 '17 at 14:04