# $\int\frac{dx}{1+x}, x\geq0$ by trigonometric substitution

Consider the integral $I=\int\frac{dx}{1+x}, x\in[0,\infty)$. A standard treatment using the substitution $u=1+x$ directly gives the result $\ln(1+x)+c$. Now consider doing this with the trigonometric substitution $\sqrt{x} = \tan\theta, \theta\in[0,\pi/2)$ then $x=\tan^2\theta, dx = 2\tan\theta\sec^2\theta$. Now, following your nose with right triangle trigonometry this leads directly to the solution $I = 2\ln(1+x) + c$. Is there a mistake here or some subtlety I'm ignoring? Is there something interesting with the integration constants?

• I get for the integral $2\ln\sec\theta+c=\ln\sec^2\theta+c=\ln(1+x)+c$. Oct 6, 2017 at 14:29

I think you've integrated the tangent incorrectly: $$\int 2\tan{\theta} \, d\theta = 2\log{\lvert\sec{\theta}\rvert}+C = \log{(\sec^2{\theta})}+C = \log{(1+\tan^2{\theta})}+C = \log{(1+x)}+C.$$
Edit per OP's comment: Starting from $-2\log{\cos{\theta}}=-\log{\cos^2{\theta}}$, we have by Pythagoras $\cos^2{\theta} +\sin^2{\theta}=1$, and dividing by $\cos^2{\theta}$ gives $$\frac{1}{\cos^2{\theta}} = 1+\frac{\sin^2{\theta}}{\cos^2{\theta}} = 1+\tan^2{\theta} = 1+x.$$ So in fact $\cos^2{\theta}=1/(1+x)$.
• I see. My chain of reasoning was $I = -2\ln(\cos\theta)+C$ and with the associated right triangle I came up with $\cos\theta = \frac{1}{1+x}$ and then $-2\ln(\frac{1}{1+x}) = 2\ln(1+x)$.