Solution:
Key idea: For a+bcos2x1 we divide the numerator and the denominator by cos2x. This gives sec2x on top and a quadratic in tanx below, so the substitution t=3tanx leads to the standard form ∫t2+a2dt, whose value is a1tan−1at+C.
Step 1 — Divide numerator and denominator by cos2x.
We divide both by cos2x, which is allowed wherever cosx=0.
9+16cos2x1=9sec2x+16sec2x
We replace sec2x in the denominator by 1+tan2x.
9sec2x+16sec2x=9(1+tan2x)+16sec2x
9(1+tan2x)+16sec2x=9tan2x+25sec2x
Step 2 — Substitute.
Since 9tan2x=(3tanx)2, we put 3tanx equal to t.
t=3tanx
Differentiating both sides gives the new differential.
dt=3sec2xdx
We divide by 3 to get the numerator times dx.
sec2xdx=3dt
Step 3 — Integrate in terms of t.
The integral becomes the standard form with a=5, since 25=52.
∫9tan2x+25sec2xdx=31∫t2+52dt
31∫t2+52dt=31⋅51tan−15t+C
31⋅51tan−15t+C=151tan−15t+C
Step 4 — Return to x.
We put back t=3tanx.
151tan−15t+C=151tan−1(53tanx)+C
Note: This antiderivative is valid on each interval where cosx=0; the constant C may differ from one such interval to the next.
Therefore, ∫9+16cos2xdx=151tan−1(53tanx)+C.