When dealing with integrals involving a root in the form sqrt(x^2+a^2) where a is a constant, we can make the following trigonometric substitution:
x=atan(theta)
Here, a^2=1, a=sqrt(1)=1, x=tan(theta)
dx=sec^2(theta)d theta
Substituting yields:
intsec^2(theta)/sqrt(tan^2(theta)+1)d theta
Recall the identity
tan^2(theta)+1=sec^2(theta). Apply it to what's under the root:
intsec^2(theta)/sqrt(sec^2(theta))d theta
sqrt(sec^2(theta))=|sec(theta)|=sec(theta). We'll have to assume secant will remain positive since we're working with an indefinite integral.
intsec^(cancel(2)1)(theta)/cancel(sec(theta))d theta
intsec(theta)d theta
This is a common integral, I'll show a proof at the end, but it should be memorized:
intsec(theta)d theta=ln|sec(theta)+tan(theta)|+C
We must rewrite in terms of x. We said tan(theta)=x, it was our initial substitution.
To find sec(theta), recall the identity
1+tan^2(theta)=sec^2(theta)
Substitute in x=tan(theta) meaning that tan^2(theta)=x^2
sec^2(theta)=1+x^2
Take the root of both sides:
sec(theta)=sqrt(1+x^2)
Thus
intsec(theta)d theta=intdx/sqrt(x^2+1)=ln|sqrt(1+x^2)+x|+C
Proof of intsecthetad theta=ln|sec(theta)+tan(theta)|+C:
intsecthetad theta=intsectheta (sectheta+tantheta)/(sectheta+tantheta)
Multiply the integrand by (sectheta+tantheta)/(sectheta+tantheta). This is the same as multiplying by 1.
Make the following substitution:
u=sectheta+tantheta
du=(sec(theta)tan(theta)+sec^2(theta))d theta
If we multiply out the numerator of our integrand, we have
intsectheta(sectheta+tantheta)/(sectheta+tantheta)=int(sec^2theta+secthetatantheta)/(sectheta+tantheta)
So, du appears in the numerator and u is the denominator. . We now have
int(du)/u=ln|u|+C
Rewrite in terms of theta:
intsec(theta)=ln|sec(theta)+tan(theta)|+C