In general trigonometric substitutions are useful to solve the integrals of algebraic functions containing radicals in the form √x2±a2 or √a2±x2. Consider the different cases:
A. Let f(x) be a rational function of x and √x2+a2:
∫f(x)dx=∫R(x,√x2+a2)dx
Substitute: x=atant, dx=asec2tdt with t∈(−π2,π2) and use the trigonometric identity:
1+tan2t=sec2t
Considering that for t∈(−π2,π2) the secant is positive:
√x2+a2=√a2tan2t+a2
√x2+a2=a√tan2t+1=asect
Then:
∫f(x)dx=∫R(atant,asect)sec2tdt
B. Let f(x) be a rational function of x and √x2−a2:
∫f(x)dx=∫R(x,√x2−a2)dx
Restrict the function to x∈(a,+∞) and substitute: x=asect, dx=asecttantdt with t∈(0,π2) and use the trigonometric identity:
sec2t−1=tan2t
Considering that for t∈(0,π2) the tangent is positive:
√x2−a2=√a2sec2t−a2
√x2−a2=a√sec2t−1=atant
Then:
∫f(x)dx=∫R(asect,atant)secttantdt
Normally you can see by differentiation that the solution that is found is valid also for x∈(−∞,−a)
C. Let f(x) be a rational function of x and √a2−x2:
∫f(x)dx=∫R(x,√a2−x2)dx
Substitute: x=asint, dx=acost with t∈(−π2,π2) and use the trigonometric identity:
1−sin2t=cos2t
Considering that for t∈(−π2,π2) the cosine is positive:
√a2−x2=√a2−a2sin2t
√a2−x2=a√1−sin2t=acost
Then:
∫f(x)dx=∫R(asint,acost)costdt