\[\int \tan^{2}(3x) \, dx\]

1
Use Integration by Substitution.
Let u=3xu=3x, du=3dxdu=3 \, dx, then dx=13dudx=\frac{1}{3} \, du

2
Using uu and dudu above, rewrite tan2(3x)dx\int \tan^{2}(3x) \, dx.
tan2u3du\int \frac{\tan^{2}u}{3} \, du

3
Use Constant Factor Rule: cf(x)dx=cf(x)dx\int cf(x) \, dx=c\int f(x) \, dx.
13tan2udu\frac{1}{3}\int \tan^{2}u \, du

4
Use Pythagorean Identities: tan2x=sec2x1\tan^{2}x=\sec^{2}x-1.
13sec2u1du\frac{1}{3}\int \sec^{2}u-1 \, du

5
Use Sum Rule: f(x)+g(x)dx=f(x)dx+g(x)dx\int f(x)+g(x) \, dx=\int f(x) \, dx+\int g(x) \, dx.
13(sec2udu+1du)\frac{1}{3}(\int \sec^{2}u \, du+\int -1 \, du)

6
The derivative of tanu\tan{u} is sec2u\sec^{2}u.
13(tanu+1du)\frac{1}{3}(\tan{u}+\int -1 \, du)

7
Use this rule: adx=ax+C\int a \, dx=ax+C.
tanuu3\frac{\tan{u}-u}{3}

8
Substitute u=3xu=3x back into the original integral.
tan3x3x3\frac{\tan{3x}-3x}{3}

9
Add constant.
tan3x3x3+C\frac{\tan{3x}-3x}{3}+C

Done

How can we make this solution more helpful?