Week 4 Discussion Notes

Table of Contents

Midterm Review

Selected Practice Exam Questions

Example 1.

Calculate π/6π/4xln(tanx2)sin2x2dx\displaystyle\int_{\sqrt{\pi/6}}^{\sqrt{\pi/4}} \frac{x\ln\p{\tan{x^2}}}{\sin{2x^2}} \,\diff{x}.

Solution.

First, we want to get rid of the 22 in the sine term so that all the angles match up. If you remember your trig identities,

sin2x2=2sin(x2)cos(x2).\sin{2x^2} = 2\sin\p{x^2}\cos\p{x^2}.

Let u=ln(tanx2)u = \ln\p{\tan{x^2}}, which gives

du=1tanx2sec2x22xdx=cosx2sinx21cos2x22xdx=2xsin(x2)cos(x2)dx.\begin{aligned} \diff{u} = \frac{1}{\tan{x^2}} \cdot \sec^2{x^2} \cdot 2x \,\diff{x} &= \frac{\cos{x^2}}{\sin{x^2}} \cdot \frac{1}{\cos^2{x^2}} \cdot 2x \,\diff{x} \\ &= \frac{2x}{\sin\p{x^2}\cos\p{x^2}} \,\diff{x}. \end{aligned}

Our new bounds will be

u(π6)=ln(tanπ6)=ln13=12ln3u(π4)=ln(tanπ4)=ln1=0.\begin{aligned} u\p{\sqrt{\frac{\pi}{6}}} &= \ln\p{\tan\frac{\pi}{6}} = \ln\frac{1}{\sqrt{3}} = -\frac{1}{2}\ln{3} \\ u\p{\sqrt{\frac{\pi}{4}}} &= \ln\p{\tan\frac{\pi}{4}} = \ln{1} = 0. \end{aligned}

Now we can do our substitution:

π/6π/4xln(tanx2)sin2x2dx=π/6π/4xln(tanx2)2sin(x2)cos(x2)dx=π/6π/4ln(tanx2)22x2sin(x2)cos(x2)dx=π/6π/4ln(tanx2)42xsin(x2)cos(x2)dx=12ln30u4du=u2812ln30=18(ln32)2=(ln3)232.\begin{aligned} \int_{\sqrt{\pi/6}}^{\sqrt{\pi/4}} \frac{x\ln\p{\tan{x^2}}}{\sin{2x^2}} \,\diff{x} &= \int_{\sqrt{\pi/6}}^{\sqrt{\pi/4}} \frac{x\ln\p{\tan{x^2}}}{2\sin\p{x^2}\cos\p{x^2}} \,\diff{x} \\ &= \int_{\sqrt{\pi/6}}^{\sqrt{\pi/4}} \ln\p{\tan{x^2}} \cdot \frac{2}{2} \cdot \frac{x}{2\sin\p{x^2}\cos\p{x^2}} \,\diff{x} \\ &= \int_{\sqrt{\pi/6}}^{\sqrt{\pi/4}} \frac{\ln\p{\tan{x^2}}}{4} \cdot \frac{2x}{\sin\p{x^2}\cos\p{x^2}} \,\diff{x} \\ &= \int_{-\frac{1}{2}\ln{3}}^0 \frac{u}{4} \,\diff{u} \\ &= \left. \frac{u^2}{8} \right\rvert_{-\frac{1}{2}\ln{3}}^0 \\ &= -\frac{1}{8}\p{-\frac{\ln{3}}{2}}^2 \\ &= \boxed{-\frac{\p{\ln{3}}^2}{32}}. \end{aligned}
Example 2.

Calculate 0π/8cos1(sin2x)dx\displaystyle\int_0^{\pi/8} \cos^{-1}\p{\sin{2x}} \,\diff{x}.

Solution.

This is actually a trig problem in disguise. It becomes a very easy problem if you remember that

sinθ=cos(π2θ).\sin{\theta} = \cos\p{\frac{\pi}{2} - \theta}.

You can either draw a picture or use the angle-sum identity to prove it. So, the integral becomes

0π/8cos1(sin2x)dx=0π/8cos1(cos(π22x))dx=0π/8π22xdx=(πx2x2)0π/8=π216π264=3π264.\begin{aligned} \int_0^{\pi/8} \cos^{-1}\p{\sin{2x}} \,\diff{x} &= \int_0^{\pi/8} \cos^{-1}\p{\cos\p{\frac{\pi}{2} - 2x}} \,\diff{x} \\ &= \int_0^{\pi/8} \frac{\pi}{2} - 2x \,\diff{x} \\ &= \left. \p{\frac{\pi x}{2} - x^2} \right\rvert_0^{\pi/8} \\ &= \frac{\pi^2}{16} - \frac{\pi^2}{64} \\ &= \boxed{\frac{3\pi^2}{64}}. \end{aligned}
Exercise 1.

Calculate 0π/2sin1(cosx)dx\displaystyle\int_0^{\pi/2} \sin^{-1}\p{\cos{x}} \,\diff{x}.

Example 3.

Calculate limxxsin1ex\displaystyle\lim_{x\to\infty} x\sin\frac{1}{e^x}.

Solution.

After a glance, this is of the form 0\infty \cdot 0. So, we can rewrite it and apply L'Hôpital's:

limxxsin1ex=limxsinex1x=Hlimxexcosex1x2=limxcosexx2ex=(limxcosex)(limxx2ex)=10=0.\begin{aligned} \lim_{x\to\infty} x\sin\frac{1}{e^x} &= \lim_{x\to\infty} \frac{\sin{e^{-x}}}{\frac{1}{x}} \\ &\overset{H}{=} \lim_{x\to\infty} \frac{-e^{-x}\cos{e^{-x}}}{-\frac{1}{x^2}} \\ &= \lim_{x\to\infty} \cos{e^{-x}} \cdot \frac{x^2}{e^x} \\ &= \p{\lim_{x\to\infty} \cos{e^{-x}}}\p{\lim_{x\to\infty} \frac{x^2}{e^x}} \\ &= 1 \cdot 0 \\ &= \boxed{0}. \end{aligned}

L'Hôpital's Rule Examples

Example 4.

Calculate limx02sinxsin2xsinxxcosx\displaystyle \lim_{x\to0} \frac{2\sin{x} - \sin{2x}}{\sin{x} - x\cos{x}}.

Solution.

The limit has the form 00\frac{0}{0}, so we can apply L'Hôpital's straight away:

limx02sinxsin2xsinxxcosx=Hlimx02cosx2cos2xcosxcosx+xsinx=limx02cosx2cos2xxsinx.\lim_{x\to0} \frac{2\sin{x} - \sin{2x}}{\sin{x} - x\cos{x}} \overset{H}{=} \lim_{x\to0} \frac{2\cos{x} - 2\cos{2x}}{\cos{x} - \cos{x} + x\sin{x}} = \lim_{x\to0} \frac{2\cos{x} - 2\cos{2x}}{x\sin{x}}.

You might be tempted to use L'Hôpital's again, but if you look ahead, you should see that you basically get your original limit back, so it won't be of any help. This means we have to try to calculate the limit as is. Like one of the problems before, we want to get rid of the 2x2x is the cosine in the numerator. If you recall, cos2x=2cos2x1\cos{2x} = 2\cos^2{x} - 1, so the numerator becomes 2cosx4cos2x+22\cos{x} - 4\cos^2{x} + 2. We're going to want to factor this, so if we let u=cosxu = \cos{x},

2cosx4cos2x+2=4u2+2u+2=2(2u2u1)=2(u1)(2u+1)=2(cosx1)(2cosx+1).\begin{aligned} 2\cos{x} - 4\cos^2{x} + 2 &= -4u^2 + 2u + 2 \\ &= -2\p{2u^2 - u - 1} \\ &= -2\p{u - 1}\p{2u + 1} \\ &= -2\p{\cos{x} - 1}\p{2\cos{x} + 1}. \end{aligned}

So, the limit becomes

limx02cosx2cos2xxsinx=limx02(cosx1)(2cosx+1)xsinx.\lim_{x\to0} \frac{2\cos{x} - 2\cos{2x}}{x\sin{x}} = \lim_{x\to0} \frac{-2\p{\cos{x} - 1}\p{2\cos{x} + 1}}{x\sin{x}}.

The 2cosx+12\cos{x} + 1 term goes to 33, so it's harmless here, which means we want to turn our attention to the other terms:

limx0cosx1xsinxcosx+1cosx+1=limx0sin2xx(cosx+1)sinx=limx0sinxx1cosx+1=(limx0sinxx)(limx01cosx+1)=112=12.\begin{aligned} \lim_{x\to0} \frac{\cos{x} - 1}{x\sin{x}} \cdot \frac{\cos{x} + 1}{\cos{x} + 1} &= \lim_{x\to0} \frac{-\sin^2{x}}{x\p{\cos{x} + 1}\sin{x}} \\ &= \lim_{x\to0} -\frac{\sin{x}}{x} \cdot \frac{1}{\cos{x} + 1} \\ &= -\p{\lim_{x\to0} \frac{\sin{x}}{x}} \p{\lim_{x\to0} \frac{1}{\cos{x} + 1}} \\ &= -1 \cdot \frac{1}{2} \\ &= -\frac{1}{2}. \end{aligned}

Finally, we can calculate our limit:

limx02(cosx1)(2cosx+1)xsinx=limx02cosx1xsinx(2cosx+1)=2(limx0cosx1xsinx)(limx02cosx+1)=2123=3.\begin{aligned} \lim_{x\to0} \frac{-2\p{\cos{x} - 1}\p{2\cos{x} + 1}}{x\sin{x}} &= \lim_{x\to0} -2 \cdot \frac{\cos{x} - 1}{x\sin{x}} \cdot \p{2\cos{x} + 1} \\ &= -2 \p{\lim_{x\to0} \frac{\cos{x} - 1}{x\sin{x}}} \p{\lim_{x\to0} 2\cos{x} + 1} \\ &= -2 \cdot -\frac{1}{2} \cdot 3 \\ &= \boxed{3}. \end{aligned}
Example 5.

Calculate limx0+(cscx)(cos1(x))/lnx\displaystyle \lim_{x\to0^+} \p{\csc{x}}^{\p{\cos^{-1}\p{x}}/\ln{x}}.

Solution.

This is of the form 0\infty^0, so let y=(cscx)(cos1x)/lnxy = \displaystyle \p{\csc{x}}^{\p{\cos^{-1}{x}}/\ln{x}}, which gives

lny=cos1xlnxln(cscx).\ln{y} = \frac{\cos^{-1}{x}}{\ln{x}} \ln\p{\csc{x}}.

The cos1x\cos^{-1}{x} term is harmless since it goes to π2\frac{\pi}{2}, so we need to look at the other terms.

limx0+ln(cscx)lnx=limx0+ln(sinx)lnx=Hlimx0+cosxsinx1x=limx0+cosxxsinx=(limx0+cosx)(limx0+xsinx)=11=1.\begin{aligned} \lim_{x\to0^+} \frac{\ln\p{\csc{x}}}{\ln{x}} = \lim_{x\to0^+} -\frac{\ln\p{\sin{x}}}{\ln{x}} &\overset{H}{=} \lim_{x\to0^+} -\frac{\frac{\cos{x}}{\sin{x}}}{\frac{1}{x}} \\ &= \lim_{x\to0^+} -\cos{x} \cdot \frac{x}{\sin{x}} \\ &= -\p{\lim_{x\to0^+} \cos{x}} \p{\lim_{x\to0^+} \frac{x}{\sin{x}}} \\ &= -1 \cdot 1 \\ &= -1. \end{aligned}

So, this means

limx0+lny=limx0+cos1xlnxln(cscx)=(limx0+cos1x)(limx0+ln(cscx)lnx)=π21=π2.\begin{aligned} \lim_{x\to0^+} \ln{y} &= \lim_{x\to0^+} \frac{\cos^{-1}{x}}{\ln{x}} \ln\p{\csc{x}} \\ &= \p{\lim_{x\to0^+} \cos^{-1}{x}} \p{\lim_{x\to0^+} \frac{\ln\p{\csc{x}}}{\ln{x}}} \\ &= \frac{\pi}{2} \cdot -1 \\ &= -\frac{\pi}{2}. \end{aligned}

Going back to our original limit, continuity of exe^x gives

limx0+y=limx0+elny=elimx0+lny=eπ/2.\begin{aligned} \lim_{x\to0^+} y &= \lim_{x\to0^+} e^{\ln{y}} \\ &= e^{\lim_{x\to0^+} \ln{y}} \\ &= \boxed{e^{-\pi/2}}. \end{aligned}
Example 6.

Calculate limx0+lnxcotx\displaystyle \lim_{x\to0^+} \frac{\ln{x}}{\cot{x}}.

Solution.

The limit has the indeterminate form \frac{\infty}{\infty}, so we can use L'Hôpital's right away.

limx0+lnxcotx=Hlimx0+1xcsc2x=limx0+sinxxsinx=(limx0+sinxx)(limx0+sinx)=10=0.\begin{aligned} \lim_{x\to0^+} \frac{\ln{x}}{\cot{x}} &\overset{H}{=} \lim_{x\to0^+} \frac{\frac{1}{x}}{-\csc^2{x}} \\ &= \lim_{x\to0^+} -\frac{\sin{x}}{x} \cdot \sin{x} \\ &= -\p{\lim_{x\to0^+} \frac{\sin{x}}{x}} \p{\lim_{x\to0^+} \sin{x}} \\ &= -1 \cdot 0 \\ &= \boxed{0}. \end{aligned}
Example 7.

Calculate limx0+(sinxx)1/x2\displaystyle \lim_{x\to0^+} \p{\frac{\sin{x}}{x}}^{1/x^2}.

Solution.

This is of the form 11^\infty, so like before, we're gonna set y=(sinxx)1/x2y = \p{\frac{\sin{x}}{x}}^{1/x^2}. Then

lny=1x2ln(sinxx)=ln(sinxx)x2.\ln{y} = \frac{1}{x^2} \ln\p{\frac{\sin{x}}{x}} = \frac{\ln\p{\frac{\sin{x}}{x}}}{x^2}.

When x0+x \to 0^+, we get the indeterminate form 00\frac{0}{0}, so by L'Hôpital's

limx0+lny=limx0+ln(sinxx)x2=limx0+lnsinxlnxx2=Hlimx0+cosxsinx1x2x=limx0+xcosxxsinxsinxxsinx2x=limx0+xcosxsinx2x2sinx=Hlimx0+cosxxsinxcosx4xsinx+2x2cosx=limx0+xsinx4xsinx+2x2cosx=limx0+sinx4sinx+2xcosx1x1x=limx0+sinxx4sinxx+2cosx=14+2=16.\begin{aligned} \lim_{x\to0^+} \ln{y} = \lim_{x\to0^+} \frac{\ln\p{\frac{\sin{x}}{x}}}{x^2} &= \lim_{x\to0^+} \frac{\ln{\sin{x} - \ln{x}}}{x^2} \\ &\overset{H}{=} \lim_{x\to0^+} \frac{\frac{\cos{x}}{\sin{x}} - \frac{1}{x}}{2x} \\ &= \lim_{x\to0^+} \frac{\frac{x\cos{x}}{x\sin{x}} - \frac{\sin{x}}{x\sin{x}}}{2x} \\ &= \lim_{x\to0^+} \frac{x\cos{x} - \sin{x}}{2x^2\sin{x}} \\ &\overset{H}{=} \lim_{x\to0^+} \frac{\cos{x} - x\sin{x} - \cos{x}}{4x\sin{x} + 2x^2\cos{x}} \\ &= \lim_{x\to0^+} \frac{-x\sin{x}}{4x\sin{x} + 2x^2\cos{x}} \\ &= \lim_{x\to0^+} \frac{-\sin{x}}{4\sin{x} + 2x\cos{x}} \cdot \frac{\frac{1}{x}}{\frac{1}{x}}\\ &= \lim_{x\to0^+} \frac{-\frac{\sin{x}}{x}}{4\frac{\sin{x}}{x} + 2\cos{x}} \\ &= \frac{-1}{4 + 2} \\ &= -\frac{1}{6}. \end{aligned}

Finally, going back to the original limit, we get

limx0+y=limx0+elny=elimx0+lny=e1/6.\begin{aligned} \lim_{x\to0^+} y &= \lim_{x\to0^+} e^{\ln{y}} \\ &= e^{\lim_{x\to0^+} \ln{y}} \\ &= \boxed{e^{-1/6}}. \end{aligned}
Example 8.

Calculate limx0sin1xx2cscx\displaystyle \lim_{x\to0} \frac{\sin^{-1}{x}}{x^2\csc{x}}.

Solution.

First, we're going to rewrite the limit as

limx0sin1xx2cscx=limx0sin1xxsinxx.\lim_{x\to0} \frac{\sin^{-1}{x}}{x^2\csc{x}} = \lim_{x\to0} \frac{\sin^{-1}{x}}{x} \cdot \frac{\sin{x}}{x}.

We know that limx0sinxx=1\lim_{x\to0} \frac{\sin{x}}{x} = 1, so we only have to worry about the other factor. It has the form 00\frac{0}{0}, so we can use L'Hôpital's:

limx0sin1xx=Hlimx011x21=1.\lim_{x\to0} \frac{\sin^{-1}{x}}{x} \overset{H}{=} \lim_{x\to0} \frac{\frac{1}{\sqrt{1 - x^2}}}{1} = 1.

So, we get

limx0sin1xxsinxx=(limx0sin1xx)(limx0sinxx)=11=1.\lim_{x\to0} \frac{\sin^{-1}{x}}{x} \cdot \frac{\sin{x}}{x} = \p{\lim_{x\to0} \frac{\sin^{-1}{x}}{x}} \p{\lim_{x\to0} \frac{\sin{x}}{x}} = 1 \cdot 1 = \boxed{1}.

Integration By Parts

Statement

I don't think this is on the midterm, but I covered some of it anyway (if we had enough time). As a quick review, here's the statement of integration by parts:

Theorem (integration by parts)

If uu and vv are functions, then

udv=uvvdu.\int u \,\diff{v} = uv - \int v \,\diff{u}.

Given an integral, you're free to choose uu and dv\diff{v} however you like. However, the main issue after applying the formula is the integral term vdu\int v \,\diff{u}, so before you start, try to think about what vduv \,\diff{u} looks like.

The way I remember the formula is that you pick one thing to differentiate (uu) and one thing to integrate (dv\diff{v}). Then you integrate first to get uvuv and then differentiate after to get vduv \,\diff{u}.

Examples

Example 9.

Calculate cos1xdx\displaystyle \int \cos^{-1}{x} \,\diff{x}.

Solution.

Even though there's only one term, we can still use integration by parts because cos1x=cos1x1\cos^{-1}{x} = \cos^{-1}{x} \cdot 1. Choose dv=cos1xdx\diff{v} = \cos^{-1}{x} \,\diff{x} isn't going to do anything for us because we don't know how to integrate it (yet), so we need to let u=cos1xu = \cos^{-1}{x} and dv=dx\diff{v} = \diff{x} instead. Then

du=dx1x2andv=x.\diff{u} = -\frac{\diff{x}}{\sqrt{1 - x^2}} \quad\text{and}\quad v = x.

So if we integrate by parts, we get

cos1xdx=xcos1xx1x2dx=xcos1x+x1x2dx=xcos1x1x2+C.\begin{aligned} \int \cos^{-1}{x} \,\diff{x} &= x\cos^{-1}{x} - \int -\frac{x}{\sqrt{1 - x^2}} \,\diff{x} \\ &= x\cos^{-1}{x} + \int \frac{x}{\sqrt{1 - x^2}} \,\diff{x} \\ &= \boxed{x\cos^{-1}{x} - \sqrt{1 - x^2} + C}. \end{aligned}

(To calculate the integral, you can use u=1x2u = 1 - x^2.)

Example 10.

Calculate lnxx3dx\displaystyle \int \frac{\ln{x}}{x^3} \,\diff{x}.

Solution.

I want to differentiate lnx\ln{x} because it gives me 1x\frac{1}{x}, which plays nicely with all the other terms. So, we want to choose u=lnxu = \ln{x} and dv=1x3dx\diff{v} = \frac{1}{x^3} \,\diff{x}, which gives

du=dxxandv=12x2.\diff{u} = \frac{\diff{x}}{x} \quad\text{and}\quad v = -\frac{1}{2x^2}.

Then the integral becomes

lnxx3dx=lnx2x2dx2x3=lnx2x2+dx2x3=lnx2x214x2+C=(2lnx14x2)+C.\begin{aligned} \int \frac{\ln{x}}{x^3} \,\diff{x} &= -\frac{\ln{x}}{2x^2} - \int -\frac{\diff{x}}{2x^3} \\ &= -\frac{\ln{x}}{2x^2} + \int \frac{\diff{x}}{2x^3} \\ &= -\frac{\ln{x}}{2x^2} - \frac{1}{4x^2} + C \\ &= \boxed{-\p{\frac{2\ln{x} - 1}{4x^2}} + C}. \end{aligned}
Example 11.

Calculate e2xsinxdx\displaystyle \int e^{2x} \sin{x} \,\diff{x}.

Solution.

This is one of those problems that requires multiple uses of integration by parts and a trick. Here, your choice of uu and dv\diff{v} don't really matter, so I'm going to set u=e2xu = e^{2x} and dv=sinxdx\diff{v} = \sin{x} \,\diff{x}, which gives

du=2e2xdxandv=cosx.\diff{u} = 2e^{2x} \,\diff{x} \quad\text{and}\quad v = -\cos{x}.

After the first application of integration by parts, we get

e2xsinxdx=e2xcosx2e2xcosxdx=e2xcosx+2e2xcosxdx.\begin{aligned} \int e^{2x} \sin{x} \,\diff{x} &= -e^{2x} \cos{x} - \int -2e^{2x} \cos{x} \,\diff{x} \\ &= -e^{2x} \cos{x} + \int 2e^{2x} \cos{x} \,\diff{x}. \end{aligned}

We're gonna do the same thing, except with dv=cosxdx\diff{v} = \cos{x} \,\diff{x} this time, so we get

e2xsinxdx=e2xcosx+(2e2xsinx4e2xsinxdx)=e2xcosx+2e2xsinx4e2xsinxdx.\begin{aligned} \colorbox{red}{$\displaystyle\int e^{2x} \sin{x} \,\diff{x}$} &= -e^{2x} \cos{x} + \p{2e^{2x} \sin{x} - \int 4e^{2x} \sin{x} \,\diff{x}} \\ &= -e^{2x} \cos{x} + 2e^{2x} \sin{x} - 4\colorbox{red}{$\displaystyle\int e^{2x} \sin{x} \,\diff{x}$}. \end{aligned}

Notice that we get the same integral on both sides, so we can just solve for it. If we add 4e2xsinxdx4\int e^{2x} \sin{x} \,\diff{x} to both sides, we get

5e2xsinxdx=e2xcosx+2e2xsinx+C    e2xsinxdx=15e2xcosx+25e2xsinx+C.\begin{aligned} 5\int e^{2x} \sin{x} \,\diff{x} &= -e^{2x} \cos{x} + 2e^{2x} \sin{x} + C \\ \implies \int e^{2x} \sin{x} \,\diff{x} &= \boxed{-\frac{1}{5}e^{2x}\cos{x} + \frac{2}{5}e^{2x}\sin{x} + C}. \end{aligned}
Example 12.

Calculate xsinxcosxdx\displaystyle \int x \sin{x} \cos{x} \,\diff{x}.

Solution.

This problem can be made a lot easier if you remember your trig identities:

sin2x=2sinxcosx    sinxcosx=sin2x2,\sin{2x} = 2\sin{x} \cos{x} \implies \sin{x}\cos{x} = \frac{\sin{2x}}{2},

so the integral becomes

xsinxcosxdx=12xsin2xdx.\int x \sin{x} \cos{x} \,\diff{x} = \frac{1}{2} \int x \sin{2x} \,\diff{x}.

When doing integration by parts, we don't want to set dv=xdx\diff{v} = x \,\diff{x} because we'll end up with something like x2cos2xx^2 \cos{2x}, which is harder. Instead, we'll set u=xu = x and dv=sin2xdx\diff{v} = \sin{2x} \,\diff{x}, which gives

du=dxandv=cos2x2.\diff{u} = \diff{x} \quad\text{and}\quad v = -\frac{\cos{2x}}{2}.

So, the integral becomes

12xsin2xdx=12(12xcos2x12cos2xdx)=12(12xcos2x+12cos2xdx)=12(12xcos2x+14sin2x)+C=14xcos2x+18sin2x+C.\begin{aligned} \frac{1}{2} \int x \sin{2x} \,\diff{x} &= \frac{1}{2} \p{-\frac{1}{2} x\cos{2x} - \int -\frac{1}{2}\cos{2x} \,\diff{x}} \\ &= \frac{1}{2} \p{-\frac{1}{2} x\cos{2x} + \int \frac{1}{2}\cos{2x} \,\diff{x}} \\ &= \frac{1}{2} \p{-\frac{1}{2} x\cos{2x} + \frac{1}{4}\sin{2x}} + C \\ &= \boxed{-\frac{1}{4} x\cos{2x} + \frac{1}{8}\sin{2x} + C}. \end{aligned}