# Where did I go wrong with integral $\int \sqrt{1+\frac{1}{3x}} dx$ [duplicate]

Possible Duplicate:
Weird and difficult integral: $\sqrt{1+\frac{1}{3x}} \, dx$

So a couple of weeks ago I ran by accident with this integral. This is by no means homework, I just want to solve it out of curiosity. After asking for help and struggling for like 10 hours total I finally managed to reach something that makes some sense. However, the result is not the same as wolframalpha (integration or differentiate the primitive), and I was wondering where did I go wrong. Any help will be very much appreciated!

My work was:

$$\int \sqrt{1+\frac{1}{3x}} \, \, dx$$

$$u^2 = 3x$$

$$2u \: du = 3 \:dx \rightarrow \frac{2}{3} u \: du = dx$$

$$\frac{2}{3}\int \sqrt{1+\frac{1}{u^2}} \, \, u \: du$$

$$\frac{2}{3}\int \sqrt{u^2 + 1} \, \, \: du$$

$$\tan(s) = u \rightarrow du = \sec^2(s) ds$$

$$\frac{2}{3}\int \sqrt{\tan^2(s) + 1} \, \, \: \sec^2(s) \: ds$$

Given that

$$\tan(s) + 1 = \sec^2(s)$$

then

$$\frac{2}{3}\int \sqrt{\sec^2(s)} \, \, \: \sec^2(s) \: ds$$

$$\frac{2}{3}\int\sec^3(s) \: ds$$

Integrate

$$\frac{2}{3} \frac{1}{2} (\tan(s) \sec(s) + \log(\tan(s)+\sec(s)))$$

Given that

$$\tan(s) + 1 = \sec^2(s)$$

then

$$\sec(s) = \sqrt{\tan(s) + 1}$$

therefore

$$\frac{1}{3} (\tan(s) \: \sqrt{\tan(s) + 1} + \log(\tan(s)+\sqrt{\tan(s) + 1}))$$

unsubstitute

$$\frac{1}{3} (u \: \sqrt{u + 1} + \log(u+\sqrt{u + 1}))$$

remember

$$u = \sqrt{3x}$$

so

$$\frac{1}{3} (\sqrt{3x} \: \sqrt{\sqrt{3x} + 1} + \log(\sqrt{3x}+\sqrt{\sqrt{3x} + 1}))$$

You could do some algebra but by now it's too different from wolfram alpha. So anyway.. where did I go wrong?

Thanks a ton everyone!! =)

-

## marked as duplicate by Did, Emily, Thomas, DonAntonio, Austin MohrNov 2 '12 at 19:43

I changed $sec$, $tan$, and $log$ to $\sec$, $\tan$, and $\log$. This not only makes them non-italicized but also provides proper spacing in expressions like $x\sin x$. – Michael Hardy Nov 2 '12 at 16:06
In your first change of variable $u^2=3x$, $u^2$ is non-negative but in the original integral $x$ can take negative values.