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?

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

1 Answer 1


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)$.

  • 1
    $\begingroup$ This is also what I did. Comforting that you get the same answer either way. I've never seen this integral done with trig sub before. $\endgroup$
    – Randall
    Oct 6, 2017 at 14:33
  • $\begingroup$ 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)$. $\endgroup$
    – JEM
    Oct 6, 2017 at 14:38
  • $\begingroup$ @JEM This is why it's important to have all the working in the question: if you've made an error, and can't identify what it is, you probably can't tell where the error is. $\endgroup$
    – Chappers
    Oct 6, 2017 at 14:43
  • $\begingroup$ I see it now, I was using the length of the hypotenuse squared. Thank you. $\endgroup$
    – JEM
    Oct 6, 2017 at 14:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .