Week 5 Discussion Notes

Table of Contents

Trig Substitution

Example 1.

Calculate dxx2+4\displaystyle \int \frac{\diff{x}}{x^2 + 4}.

Solution.

In general, for trig substitution problems, your goal is to get rid of everything next to the x2x^2. So for this one, you want to replace xx with something so that x2+4x^2 + 4 is no longer a sum. We know that tan2θ+1=sec2θ\tan^2\theta + 1 = \sec^2\theta, which means that 4tan2θ+4=4sec2θ4\tan^2\theta + 4 = 4\sec^2\theta, so we can try setting

x=2tanθ    dx=2sec2θdθ.x = 2\tan\theta \implies \diff{x} = 2\sec^2\theta \,\diff\theta.

Also, x2+4=4sec2θx^2 + 4 = 4\sec^2\theta, which transforms the integral into

dxx2+4=2sec2θ4sec2θdθ=12dθ=12θ+C.\int \frac{\diff{x}}{x^2 + 4} = \int \frac{2\sec^2\theta}{4\sec^2\theta} \,\diff\theta = \int \frac{1}{2} \,\diff\theta = \frac{1}{2} \theta + C.

All that's left to do is turn everything back into terms of xx. Since x=2tanθx = 2\tan\theta, we get θ=arctanx2\theta = \arctan\frac{x}{2}, so our final answer is

12arctanx2+C.\boxed{\frac{1}{2}\arctan\frac{x}{2} + C}.
Example 2.

Calculate dxx2+1\displaystyle \int \frac{\diff{x}}{\sqrt{x^2 + 1}}.

Solution.

Like before, we want to turn the x2+1x^2 + 1 into something without a sum, so we can use x=tanθx = \tan\theta again. As before, this gives

dx=sec2θdθandx2+1=tan2θ+1=sec2θ,\diff{x} = \sec^2\theta \,\diff\theta \quad\text{and}\quad x^2 + 1 = \tan^2\theta + 1 = \sec^2\theta,

so the integral becomes

dxx2+1=sec2θsecθdθ=secθdθ=lnsecθ+tanθ+C.\int \frac{\diff{x}}{\sqrt{x^2 + 1}} = \int \frac{\sec^2\theta}{\sec\theta} \,\diff\theta = \int \sec\theta \,\diff\theta = \ln\abs{\sec\theta + \tan\theta} + C.

We have to do a little bit more work this time to get everything back into terms of xx. We already have x=tanθx = \tan\theta, so we just need to figure out what secθ\sec\theta is:

x2+1=sec2θ    secθ=x2+1,x^2 + 1 = \sec^2\theta \implies \sec\theta = \sqrt{x^2 + 1},

so in the end, we get

lnsecθ+tanθ+C=lnx2+1+x+C.\ln\abs{\sec\theta + \tan\theta} + C = \boxed{\ln\abs{\sqrt{x^2 + 1} + x} + C}.
Example 3.

Calculate dxx2x29\displaystyle \int \frac{\diff{x}}{x^2\sqrt{x^2 - 9}}.

Solution.

Same idea as before, but this time x=3tanθx = 3\tan\theta does not work. Instead, if you notice that sec2θ1=tan2θ\sec^2\theta - 1 = \tan^2\theta, this should tell you that x=3secθx = 3\sec\theta will do the trick. We get

dx=3secθtanθdθandx29=9sec2θ9=9tan2θ\diff{x} = 3\sec\theta\tan\theta \,\diff\theta \quad\text{and}\quad x^2 - 9 = 9\sec^2\theta - 9 = 9\tan^2\theta

and

dxx2x29=3secθtanθ9sec2θ3tanθdθ=19dθsecθ=19cosθdθ=19sinθ+C.\begin{aligned} \int \frac{\diff{x}}{x^2\sqrt{x^2 - 9}} = \int \frac{3\sec\theta\tan\theta}{9\sec^2\theta \cdot 3\tan\theta} \,\diff\theta &= \frac{1}{9} \int \frac{\diff\theta}{\sec\theta} \\ &= \frac{1}{9} \int \cos\theta \,\diff\theta \\ &= \frac{1}{9} \sin\theta + C. \end{aligned}

From our substitution,

x=3secθ    x3=1cosθ    cosθ=3x    cos2θ=9x2    sin2θ=1cos2θ=19x2=x29x2    sinθ=x29x.\begin{aligned} x = 3\sec\theta &\implies \frac{x}{3} = \frac{1}{\cos\theta} \\ &\implies \cos\theta = \frac{3}{x} \\ &\implies \cos^2\theta = \frac{9}{x^2} \\ &\implies \sin^2\theta = 1 - \cos^2\theta = 1 - \frac{9}{x^2} = \frac{x^2 - 9}{x^2} \\ &\implies \sin\theta = \frac{\sqrt{x^2 - 9}}{x}. \end{aligned}

So the integral is

19sinθ+C=x299x+C.\frac{1}{9} \sin\theta + C = \boxed{\frac{\sqrt{x^2 - 9}}{9x} + C}.
Example 4.

Calculate x2+2xdx\displaystyle \int \sqrt{x^2 + 2x} \,\diff{x}.

Solution.

If we want to use a trig substitution, we need to get it in the form u2+a2u^2 + a^2, where uu is some function of xx and aa is a constant. The way to do this is to complete the square:

x2+2x=(x+1)21.x^2 + 2x = \p{x + 1}^2 - 1.

So, we can use x+1=secθx + 1 = \sec\theta here, which gives dx=secθtanθdθ\diff{x} = \sec\theta\tan\theta \,\diff{\theta} and (x+1)21=sec2θ1=tan2θ\p{x + 1}^2 - 1 = \sec^2\theta - 1 = \tan^2\theta. Substituting into the integral, it becomes

x2+2xdx=(x+1)21dx=tan2θsecθtanθdθ=secθtan2θdθ.\begin{aligned} \int \sqrt{x^2 + 2x} \,\diff{x} = \int \sqrt{\p{x + 1}^2 - 1} \,\diff{x} &= \int \sqrt{\tan^2\theta} \sec\theta\tan\theta \,\diff\theta \\ &= \int \sec\theta\tan^2\theta \,\diff\theta. \end{aligned}

From here, we're going to end up using the same trick as calculating something like exsinxdx\int e^x \sin{x} \,\diff{x}: integrate by parts and solve for the integral. We're going to let

u=tanθ    du=sec2θdθdv=secθtanθdθ    v=secθ,\begin{aligned} u = \tan\theta &\implies \diff{u} = \sec^2\theta \,\diff\theta \\ \diff{v} = \sec\theta\tan\theta \,\diff\theta &\implies v = \sec\theta, \end{aligned}

which turns the integral into

secθtan2θdθ=secθtanθsec3θdθ=secθtanθsecθ(tan2θ+1)dθ=secθtanθsecθdθsecθtan2θdθ    2secθtan2θdθ=secθtanθlnsecθ+tanθ+C    secθtan2θdθ=12secθtanθ12lnsecθ+tanθ+C.\begin{aligned} \int \sec\theta\tan^2\theta \,\diff\theta &= \sec\theta\tan\theta - \int \sec^3\theta \,\diff\theta \\ &= \sec\theta\tan\theta - \int \sec\theta\p{\tan^2\theta + 1} \,\diff\theta \\ &= \sec\theta\tan\theta - \int \sec\theta \,\diff\theta - \int \sec\theta\tan^2\theta \,\diff\theta \\ \implies 2\int \sec\theta\tan^2\theta \,\diff\theta &= \sec\theta\tan\theta - \ln\abs{\sec\theta + \tan\theta} + C \\ \implies \int \sec\theta\tan^2\theta \,\diff\theta &= \frac{1}{2}\sec\theta\tan\theta - \frac{1}{2}\ln\abs{\sec\theta + \tan\theta} + C. \end{aligned}

Finally, we need to undo the substitution. We know that x+1=secθx + 1 = \sec\theta, and this tells us that

(x+1)21=tan2θ    tanθ=(x+1)21=x2+2x.\p{x + 1}^2 - 1 = \tan^2\theta \implies \tan\theta = \sqrt{\p{x + 1}^2 - 1} = \sqrt{x^2 + 2x}.

Substituting these in, we get

x2+2xdx=12secθtanθ12lnsecθ+tanθ+C=12(x+1)x2+2x12lnx+1+x2+2x+C.\begin{aligned} \int \sqrt{x^2 + 2x} \,\diff{x} &= \frac{1}{2}\sec\theta\tan\theta - \frac{1}{2}\ln\abs{\sec\theta + \tan\theta} + C \\ &= \boxed{\frac{1}{2}\p{x + 1}\sqrt{x^2 + 2x} - \frac{1}{2}\ln\abs{x + 1 + \sqrt{x^2 + 2x}} + C}. \end{aligned}
Example 5.

Calculate x2+1(x22x+2)2\displaystyle \int \frac{x^2 + 1}{\p{x^2 - 2x + 2}^2}.

Solution.

Like before, we want to complete the square. x22x+2=(x1)2+1x^2 - 2x + 2 = \p{x - 1}^2 + 1, so we can let x1=tanθx - 1 = \tan\theta, which gives

dx=sec2θdθx22x+2=(x1)2+1=sec2θx2+1=(tanθ+1)2+1=tan2θ+2tanθ+2.\begin{aligned} \diff{x} &= \sec^2\theta \,\diff\theta \\ x^2 - 2x + 2 &= \p{x - 1}^2 + 1 = \sec^2\theta \\ x^2 + 1 &= \p{\tan\theta + 1}^2 + 1 = \tan^2\theta + 2\tan\theta + 2. \end{aligned}

Substituting into the integral,

x2+1(x22x+2)2=tan2θ+2tanθ+2sec4θsec2θdθ=tan2θ+2tanθ+2sec2θdθ=(sin2θcos2θ+2sinθcosθ+2)cos2θdθ=sin2θ+2sinθcosθ+2cos2θdθ=1cos2θ2+2sinθcosθ+(1+cos2θ)dθ=12θ14sin2θ+sin2θ+θ+12sin2θ+C=32θ+14sin2θ+sin2θ+C=32θ+12sinθcosθ+sin2θ+C.\begin{aligned} \int \frac{x^2 + 1}{\p{x^2 - 2x + 2}^2} &= \int \frac{\tan^2\theta + 2\tan\theta + 2}{\sec^4\theta} \sec^2\theta \,\diff\theta \\ &= \int \frac{\tan^2\theta + 2\tan\theta + 2}{\sec^2\theta} \,\diff\theta \\ &= \int \p{\frac{\sin^2\theta}{\cos^2\theta} + 2\frac{\sin\theta}{\cos\theta} + 2} \cos^2\theta \,\diff\theta \\ &= \int \sin^2\theta + 2\sin\theta\cos\theta + 2\cos^2\theta \,\diff\theta \\ &= \int \frac{1 - \cos{2\theta}}{2} + 2\sin\theta\cos\theta + \p{1 + \cos{2\theta}} \,\diff\theta \\ &= \frac{1}{2}\theta - \frac{1}{4} \sin{2\theta} + \sin^2\theta + \theta + \frac{1}{2} \sin{2\theta} + C \\ &= \frac{3}{2}\theta + \frac{1}{4} \sin{2\theta} + \sin^2\theta + C \\ &= \frac{3}{2}\theta + \frac{1}{2} \sin\theta\cos\theta + \sin^2\theta + C. \end{aligned}

From our substitution, x1=tanθ    θ=arctan(x1)x - 1 = \tan\theta \implies \theta = \arctan\p{x - 1},

x22x+2=sec2θ    cos2θ=1x22x+2    cosθ=1x22x+2,\begin{aligned} x^2 - 2x + 2 = \sec^2\theta &\implies \cos^2\theta = \frac{1}{x^2 - 2x + 2} \\ &\implies \cos\theta = \frac{1}{\sqrt{x^2 - 2x + 2}}, \end{aligned}

and

sin2θ=1cos2θ=11x22x+2=x22x+1x22x+2    sinθ=x22x+1x22x+2=(x1)2x22x+2=x1x22x+2\begin{aligned} \sin^2\theta &= 1 - \cos^2\theta = 1 - \frac{1}{x^2 - 2x + 2} = \frac{x^2 - 2x + 1}{x^2 - 2x + 2} \\ \implies \sin\theta &= \sqrt{\frac{x^2 - 2x + 1}{x^2 - 2x + 2}} = \sqrt{\frac{\p{x - 1}^2}{x^2 - 2x + 2}} = \frac{x - 1}{\sqrt{x^2 - 2x + 2}} \end{aligned}

So, substituting all of these into our integral,

32θ+12sinθcosθ+sin2θ+C=32arctan(x1)+121x22x+2x1x22x+2+x22x+1x22x+2+C=32arctan(x1)+x12(x22x+2)+x22x+1x22x+2+C=32arctan(x1)+x12(x22x+2)+2x24x+22(x22x+2)+C=32arctan(x1)+2x23x+12x24x+4+C.\begin{aligned} &\frac{3}{2}\theta + \frac{1}{2} \sin\theta\cos\theta + \sin^2\theta + C \\ ={}& \frac{3}{2} \arctan\p{x - 1} + \frac{1}{2} \frac{1}{\sqrt{x^2 - 2x + 2}}\frac{x - 1}{\sqrt{x^2 - 2x + 2}} + \frac{x^2 - 2x + 1}{x^2 - 2x + 2} + C \\ ={}& \frac{3}{2} \arctan\p{x - 1} + \frac{x - 1}{2\p{x^2 - 2x + 2}} + \frac{x^2 - 2x + 1}{x^2 - 2x + 2} + C \\ ={}& \frac{3}{2} \arctan\p{x - 1} + \frac{x - 1}{2\p{x^2 - 2x + 2}} + \frac{2x^2 - 4x + 2}{2\p{x^2 - 2x + 2}} + C \\ ={}& \boxed{\frac{3}{2} \arctan\p{x - 1} + \frac{2x^2 - 3x + 1}{2x^2 - 4x + 4} + C}. \end{aligned}

Homework

Here are some hints for the problems this week:

8.1.69

This is just a volume of solids of revolution problem. You end up needing to calculate

0πx2sinxdx,\int_0^\pi x^2 \sin{x} \,\diff{x},

which you can do by integrating by parts twice.

8.1.97

For (a), you should end up with

In=12xn1sinx2n12Jn2Jn=12xn1cosx2+n12In2.\begin{aligned} I_n &= \frac{1}{2} x^{n-1} \sin{x^2} - \frac{n - 1}{2} J_{n-2} \\ J_n &= -\frac{1}{2} x^{n-1} \cos{x^2} + \frac{n - 1}{2} I_{n-2}. \end{aligned}

The idea for (b) is this: if you can calculate I1I_1, then you can calculate J3J_3, and if you can calculate J1J_1, then you can calculate I3I_3. Using the reduction formulas, you get the "chain" of calculations:

I1J3I5J7J1I3J5I7\begin{aligned} I_1 \to J_3 \to I_5 \to J_7 \to \cdots \\ J_1 \to I_3 \to J_5 \to I_7 \to \cdots \end{aligned}

So, if you can calculate I1I_1 and J1J_1, you can calculate InI_n and JnJ_n if nn is odd. Why can you calculate I1I_1 and J1J_1?

8.2.23

For this, you can try the reduction formulas, or you can just use the trig identity

cos2θ=1+cos2θ2\cos^2\theta = \frac{1 + \cos{2\theta}}{2}

twice. For example, after using it once, you get

cos4(3x+2)dx=(1+cos(6x+4)2)2dx=141+2cos(6x+4)+cos2(6x+4)dx.\begin{aligned} \int \cos^4\p{3x + 2} \,\diff{x} &= \int \p{\frac{1 + \cos\p{6x + 4}}{2}}^2 \,\diff{x} \\ &= \frac{1}{4} \int 1 + 2\cos\p{6x + 4} + \cos^2\p{6x + 4} \,\diff{x}. \end{aligned}