8.6 Practice problems

Tutorial Sheet 11 in full. Work each question before opening the solution.

Problem 8.1. [Tutorial Sheet 11] Find the following integrals. (a) \(\int \left (3t^2-t^{-1}\right )dt\), (b) \(\int \left (\frac {2+x}{x^3}+3\right )dx\), (d) \(\int \left (x^2+3\right )(x-1)\,dx\), (e) \(\int \frac {(2x+1)^2}{\sqrt {x}}\,dx\), (f) \(\int \left (3+\frac {\sqrt {x}+6x^3}{x}\right )dx\), (g) \(\int \sqrt {x}\left (\sqrt {x}+3\right )^2dx\).

Show solution

Solution. Every part needs rewriting as a sum of powers before the power rule can be applied.

(a). The \(t^{-1}\) term is the excluded case \(n=-1\), so it integrates to a logarithm: \[\int \left (3t^2-t^{-1}\right )dt=\frac {3t^3}{3}-\ln |t|+c=t^3-\ln |t|+c.\]

(b). Split the fraction, which is allowed because the denominator is a single term: \[\frac {2+x}{x^3}=\frac {2}{x^3}+\frac {x}{x^3}=2x^{-3}+x^{-2}.\] \[\int \left (2x^{-3}+x^{-2}+3\right )dx=\frac {2x^{-2}}{-2}+\frac {x^{-1}}{-1}+3x+c =-\frac {1}{x^2}-\frac {1}{x}+3x+c.\]

(d). Expand first: \[\left (x^2+3\right )(x-1)=x^3-x^2+3x-3,\] \[\int \left (x^3-x^2+3x-3\right )dx=\frac {x^4}{4}-\frac {x^3}{3}+\frac {3x^2}{2}-3x+c.\]

(e). Expand the numerator, then divide term by term by \(x^{\frac {1}{2}}\): \[\frac {(2x+1)^2}{\sqrt {x}}=\frac {4x^2+4x+1}{x^{\frac {1}{2}}} =4x^{\frac {3}{2}}+4x^{\frac {1}{2}}+x^{-\frac {1}{2}}.\] \[\int \left (4x^{\frac {3}{2}}+4x^{\frac {1}{2}}+x^{-\frac {1}{2}}\right )dx =\frac {4x^{\frac {5}{2}}}{\frac {5}{2}}+\frac {4x^{\frac {3}{2}}}{\frac {3}{2}} +\frac {x^{\frac {1}{2}}}{\frac {1}{2}}+c =\frac {8}{5}x^{\frac {5}{2}}+\frac {8}{3}x^{\frac {3}{2}}+2\sqrt {x}+c.\]

(f). \[\frac {\sqrt {x}+6x^3}{x}=x^{-\frac {1}{2}}+6x^2,\] so \[\int \left (3+x^{-\frac {1}{2}}+6x^2\right )dx=3x+2\sqrt {x}+2x^3+c.\]

(g). Expand the bracket, then multiply through: \[\sqrt {x}\left (x+6\sqrt {x}+9\right )=x^{\frac {3}{2}}+6x+9x^{\frac {1}{2}},\] \[\int \left (x^{\frac {3}{2}}+6x+9x^{\frac {1}{2}}\right )dx =\frac {2}{5}x^{\frac {5}{2}}+3x^2+6x^{\frac {3}{2}}+c.\]

Note 8.37. Note the missing part (c) — the sheet skips from (b) to (d). Nothing has been left out here.

Note 8.38. Part (a) is the only one where the \(n=-1\) case appears, and it is the reason \(\int x^n dx=\frac {x^{n+1}}{n+1}\) carries the condition \(n\neq -1\). Writing \(\frac {t^0}{0}\) is the error the condition exists to prevent.

Problem 8.2. [Tutorial Sheet 11] Find the following integrals. (a) \(\int \left (5e^x-4\sin x+2x^3\right )dx\), (b) \(\int 2(\sin x-\cos x+x)\,dx\), (c) \(\int \left (5e^x+4\cos x-\frac {2}{x^3}\right )dx\), (d) \(\int \sin (2x+1)\,dx\), (e) \(\int e^{4x-1}dx\), (f) \(\int \left (e^{2x}+1\right )^2dx\).

Show solution

Solution. (a). \[5e^x-4(-\cos x)+\frac {2x^4}{4}+c=5e^x+4\cos x+\frac {x^4}{2}+c.\]

(b). \[2\left (-\cos x-\sin x+\frac {x^2}{2}\right )+c=-2\cos x-2\sin x+x^2+c.\]

(c). Write \(\frac {2}{x^3}\) as \(2x^{-3}\): \[5e^x+4\sin x-\frac {2x^{-2}}{-2}+c=5e^x+4\sin x+\frac {1}{x^2}+c.\]

(d). The inside is linear, so the answer is the ordinary one divided by the coefficient of \(x\): \[\int \sin (2x+1)\,dx=-\frac {1}{2}\cos (2x+1)+c.\]

(e). \[\int e^{4x-1}dx=\frac {1}{4}e^{4x-1}+c.\]

(f). Expand first — there is no rule for a squared bracket: \[\left (e^{2x}+1\right )^2=e^{4x}+2e^{2x}+1,\] \[\int \left (e^{4x}+2e^{2x}+1\right )dx=\frac {1}{4}e^{4x}+e^{2x}+x+c.\]

Note 8.39. Parts (d), (e) and (f) all use the same shortcut: when the inside of a function is linear, integrate as usual and divide by the coefficient of \(x\). It is the chain rule read backwards, and it works only because the inner derivative is a constant. For \(\int \sin \left (x^2\right )dx\) no such shortcut exists.

Note 8.40. In (f), \(\left (e^{2x}\right )^2=e^{4x}\) and not \(e^{4x^2}\) — the index multiplies, it does not square.

Problem 8.3. [Tutorial Sheet 11] Integrate by substitution. (a) \(\int (2x+1)^5dx\), (b) \(\int \frac {3}{(1-2x)^3}dx\), (c) \(\int x\sqrt {2x+5}\,dx\), (d) \(\int x\left (4+x^2\right )^{10}dx\), (e) \(\int \frac {2x}{x^2+1}dx\), (f) \(\int \frac {e^x}{1+e^x}dx\), (g) \(\int \frac {\cos x}{\sin x}dx\), (h) \(\int \frac {\sin x}{\cos x}dx\).

Show solution

Solution. (a). \(u=2x+1\), \(du=2\,dx\): \[\tfrac {1}{2}\int u^5du=\frac {u^6}{12}+c=\frac {(2x+1)^6}{12}+c.\]

(b). \(u=1-2x\), \(du=-2\,dx\): \[3\int u^{-3}\left (-\tfrac {1}{2}\,du\right )=-\tfrac {3}{2}\cdot \frac {u^{-2}}{-2}+c =\frac {3}{4u^2}+c=\frac {3}{4(1-2x)^2}+c.\]

(c). \(u=2x+5\), so \(x=\frac {u-5}{2}\) and \(dx=\frac {du}{2}\): \[\int \frac {u-5}{2}\sqrt {u}\cdot \frac {du}{2}=\tfrac {1}{4}\int \left (u^{\frac {3}{2}} -5u^{\frac {1}{2}}\right )du=\tfrac {1}{4}\left (\tfrac {2}{5}u^{\frac {5}{2}} -\tfrac {10}{3}u^{\frac {3}{2}}\right )+c\] \[=\frac {u^{\frac {3}{2}}}{30}\left (3u-25\right )+c =\frac {(2x+5)^{\frac {3}{2}}(6x-10)}{30}+c=\frac {(2x+5)^{\frac {3}{2}}(3x-5)}{15}+c.\]

(d). \(u=4+x^2\), \(du=2x\,dx\): \[\tfrac {1}{2}\int u^{10}du=\frac {u^{11}}{22}+c=\frac {\left (4+x^2\right )^{11}}{22}+c.\]

(e). The numerator is exactly the derivative of the denominator: \[\int \frac {2x}{x^2+1}dx=\ln \left (x^2+1\right )+c.\] No modulus is needed, since \(x^2+1>0\) always.

(f). Again top is the derivative of bottom, since \(\frac {d}{dx}\left (1+e^x\right )=e^x\): \[\int \frac {e^x}{1+e^x}dx=\ln \left (1+e^x\right )+c.\]

(g). \(\frac {d}{dx}\sin x=\cos x\), so the same pattern: \[\int \frac {\cos x}{\sin x}dx=\ln |\sin x|+c.\]

(h). Here \(\frac {d}{dx}\cos x=-\sin x\), so a minus sign appears: \[u=\cos x,\ du=-\sin x\,dx\quad \implies \quad \int \frac {-du}{u}=-\ln |u|+c =-\ln |\cos x|+c.\] This is \(\int \tan x\,dx\).

Note 8.41. Parts (e) to (h) are all the same shape: \(\int \frac {f'(x)}{f(x)}dx=\ln |f(x)|+c\). Recognising it on sight saves writing out the substitution. The only care needed is the sign, which in (h) comes from the derivative of the cosine.

Note 8.42. Part (c) is the one where \(u\) does not absorb everything. The stray \(x\) has to be rewritten in terms of \(u\) using \(x=\frac {u-5}{2}\); leaving it as \(x\) makes the integral impossible to evaluate.

Problem 8.4. [Tutorial Sheet 11] Integrate by parts. (a) \(\int x\sin 2x\,dx\), (c) \(\int 3\ln x\,dx\), (d) \(\int x^2e^{-x}dx\), (e) \(\int x\cos 2x\,dx\), (f) \(\int e^x\sin 2x\,dx\), (g) \(\int e^x\cos 2x\,dx\), (h) \(\int xe^{2x}dx\).

Show solution

Solution. Throughout, \(\int u\,dv=uv-\int v\,du\).

(a). \(u=x\), \(dv=\sin 2x\,dx\), so \(du=dx\) and \(v=-\frac {1}{2}\cos 2x\): \[-\frac {x}{2}\cos 2x+\frac {1}{2}\int \cos 2x\,dx =-\frac {x}{2}\cos 2x+\frac {1}{4}\sin 2x+c.\]

(c). There is no standard integral for \(\ln x\), so take \(u=3\ln x\) and \(dv=dx\), giving \(du=\frac {3}{x}dx\) and \(v=x\): \[3x\ln x-\int x\cdot \frac {3}{x}dx=3x\ln x-3x+c=3x(\ln x-1)+c.\]

(d). Apply the formula twice. First \(u=x^2\), \(dv=e^{-x}dx\), so \(du=2x\,dx\) and \(v=-e^{-x}\): \[-x^2e^{-x}+2\int xe^{-x}dx.\] For the remaining integral, \(u=x\) and \(v=-e^{-x}\): \[\int xe^{-x}dx=-xe^{-x}+\int e^{-x}dx=-xe^{-x}-e^{-x}.\] Combining, \[-x^2e^{-x}+2\left (-xe^{-x}-e^{-x}\right )+c=-e^{-x}\left (x^2+2x+2\right )+c.\]

(e). \(u=x\), \(v=\frac {1}{2}\sin 2x\): \[\frac {x}{2}\sin 2x-\frac {1}{2}\int \sin 2x\,dx=\frac {x}{2}\sin 2x+\frac {1}{4}\cos 2x+c.\]

(f) and (g). These two are done together, because neither factor ever becomes simpler and the integral returns to itself. Write \[I=\int e^x\sin 2x\,dx,\qquad J=\int e^x\cos 2x\,dx.\] Taking \(u=e^x\) and \(dv=\sin 2x\,dx\) in \(I\), so \(v=-\frac {1}{2}\cos 2x\): \[I=-\tfrac {1}{2}e^x\cos 2x+\tfrac {1}{2}\int e^x\cos 2x\,dx =-\tfrac {1}{2}e^x\cos 2x+\tfrac {1}{2}J.\] Similarly, with \(u=e^x\) and \(dv=\cos 2x\,dx\), so \(v=\frac {1}{2}\sin 2x\): \[J=\tfrac {1}{2}e^x\sin 2x-\tfrac {1}{2}\int e^x\sin 2x\,dx =\tfrac {1}{2}e^x\sin 2x-\tfrac {1}{2}I.\] Substituting the second into the first: \[I=-\tfrac {1}{2}e^x\cos 2x+\tfrac {1}{2}\left (\tfrac {1}{2}e^x\sin 2x -\tfrac {1}{2}I\right )=-\tfrac {1}{2}e^x\cos 2x+\tfrac {1}{4}e^x\sin 2x-\tfrac {1}{4}I.\] Collecting the \(I\) terms, \[\tfrac {5}{4}I=\tfrac {1}{4}e^x\left (\sin 2x-2\cos 2x\right )\quad \implies \quad I=\frac {e^x\left (\sin 2x-2\cos 2x\right )}{5}+c.\] Putting that back into the expression for \(J\): \[J=\frac {e^x\left (2\sin 2x+\cos 2x\right )}{5}+c.\]

(h). \(u=x\), \(dv=e^{2x}dx\), so \(v=\frac {1}{2}e^{2x}\): \[\frac {x}{2}e^{2x}-\frac {1}{2}\int e^{2x}dx=\frac {x}{2}e^{2x}-\frac {1}{4}e^{2x}+c =\frac {e^{2x}(2x-1)}{4}+c.\]

Note 8.43. Parts (f) and (g) look impossible at first, because integrating by parts turns each into the other and neither gets simpler. The way through is to treat the two as simultaneous equations in \(I\) and \(J\) and solve. Applying the formula a third time just returns to where you started.

Note 8.44. Part (c) is the case where the usual rule is reversed. Normally the algebraic factor is taken as \(u\); here \(\ln x\) must be, because there is no standard integral for it and its derivative \(\frac {1}{x}\) is simple. Note that \(dv=dx\) and \(v=x\) is a legitimate choice.

Problem 8.5. [Tutorial Sheet 11] Integrate using partial fractions. (a) \(\int \frac {3x+5}{(x+1)(x+2)}dx\), (b) \(\int \frac {3x-1}{(2x+1)(x-2)}dx\), (c) \(\int \frac {2x-6}{(x+3)(x-1)}dx\), (d) \(\int \frac {x^3+2x^2+2}{x(x+1)}dx\), (e) \(\int \frac {x^2}{x^2-4}dx\), (f) \(\int \frac {17-5x}{(3x+2)(2-x)^2}dx\).

Show solution

Solution. (a). \(3x+5=A(x+2)+B(x+1)\). At \(x=-1\): \(2=A\). At \(x=-2\): \(-1=-B\), so \(B=1\). \[\int \left (\frac {2}{x+1}+\frac {1}{x+2}\right )dx=2\ln |x+1|+\ln |x+2|+c.\]

(b). \(3x-1=A(x-2)+B(2x+1)\). At \(x=2\): \(5=5B\), so \(B=1\). At \(x=-\frac {1}{2}\): \(-\frac {5}{2}=-\frac {5}{2}A\), so \(A=1\). \[\int \left (\frac {1}{2x+1}+\frac {1}{x-2}\right )dx=\tfrac {1}{2}\ln |2x+1|+\ln |x-2|+c.\] The \(\frac {1}{2}\) appears because the derivative of \(2x+1\) is \(2\).

(c). \(2x-6=A(x-1)+B(x+3)\). At \(x=1\): \(-4=4B\), so \(B=-1\). At \(x=-3\): \(-12=-4A\), so \(A=3\). \[\int \left (\frac {3}{x+3}-\frac {1}{x-1}\right )dx=3\ln |x+3|-\ln |x-1|+c.\]

(d). The numerator has degree \(3\) and the denominator degree \(2\), so divide first. With \(x(x+1)=x^2+x\), \[\frac {x^3+2x^2+2}{x^2+x}=x+1+\frac {-x+2}{x^2+x}.\] Now \(-x+2=A(x+1)+Bx\). At \(x=0\): \(2=A\). At \(x=-1\): \(3=-B\), so \(B=-3\). \[\int \left (x+1+\frac {2}{x}-\frac {3}{x+1}\right )dx =\frac {x^2}{2}+x+2\ln |x|-3\ln |x+1|+c.\]

(e). Equal degrees, so divide: \[\frac {x^2}{x^2-4}=1+\frac {4}{x^2-4}=1+\frac {4}{(x-2)(x+2)}.\] Then \(4=A(x+2)+B(x-2)\) gives \(A=1\) at \(x=2\) and \(B=-1\) at \(x=-2\): \[\int \left (1+\frac {1}{x-2}-\frac {1}{x+2}\right )dx=x+\ln |x-2|-\ln |x+2|+c.\]

(f). As printed the denominator reads \((3x+2x)(2-x)^2\), which would collapse to \(5x(2-x)^2\); that is plainly a typo for \((3x+2)(2-x)^2\), and the question is worked in that form. (The part is also labelled “(b)” a second time on the sheet.)

A repeated linear factor needs one term for each power: \[\frac {17-5x}{(3x+2)(2-x)^2}=\frac {A}{3x+2}+\frac {B}{2-x}+\frac {C}{(2-x)^2},\] \[17-5x=A(2-x)^2+B(3x+2)(2-x)+C(3x+2).\] At \(x=2\): \(17-10=7=8C\), so \(C=\frac {7}{8}\). At \(x=-\frac {2}{3}\): \(17+\frac {10}{3}=\frac {61}{3}=A\left (\frac {8}{3}\right )^2 =\frac {64A}{9}\), so \(A=\frac {183}{64}\). Comparing coefficients of \(x^2\): \(0=A-3B\), so \(B=\frac {A}{3}=\frac {61}{64}\).

Now integrate, noting \(\int \frac {dx}{2-x}=-\ln |2-x|\) and \(\int \frac {dx}{(2-x)^2}=\frac {1}{2-x}\): \[\int \left (\frac {183}{64(3x+2)}+\frac {61}{64(2-x)}+\frac {7}{8(2-x)^2}\right )dx\] \[=\frac {183}{64}\cdot \frac {1}{3}\ln |3x+2|-\frac {61}{64}\ln |2-x| +\frac {7}{8}\cdot \frac {1}{2-x}+c\] \[=\frac {61}{64}\ln |3x+2|-\frac {61}{64}\ln |2-x|+\frac {7}{8(2-x)}+c.\]

Note 8.45. The signs in (f) are the difficulty. Because the factor is \(2-x\) rather than \(x-2\), its derivative is \(-1\), so \(\int \frac {dx}{2-x}\) carries a minus and \(\int \frac {dx}{(2-x)^2}\) comes out as \(+\frac {1}{2-x}\). Checking each by differentiating back takes seconds and is worth doing.

Note 8.46. Parts (d) and (e) both needed division before anything else. Checking the degrees is the first step in every partial-fraction question, not an afterthought.

Problem 8.6. [Tutorial Sheet 11] Evaluate. (a) \(\int _2^5x^3dx\), (b) \(\int _1^3\frac {3}{x^2}dx\), (c) \(\int _1^3\frac {x^3+2x^2}{x}dx\).

Show solution

Solution. (a). \[\int _2^5x^3dx=\left [\frac {x^4}{4}\right ]_2^5=\frac {625}{4}-\frac {16}{4} =\frac {609}{4}=152.25.\]

(b). \[\int _1^33x^{-2}dx=\left [\frac {3x^{-1}}{-1}\right ]_1^3 =\left [-\frac {3}{x}\right ]_1^3=-1-(-3)=2.\]

(c). Divide through first: \[\frac {x^3+2x^2}{x}=x^2+2x,\] \[\int _1^3\left (x^2+2x\right )dx=\left [\frac {x^3}{3}+x^2\right ]_1^3 =\left (9+9\right )-\left (\tfrac {1}{3}+1\right )=18-\tfrac {4}{3}=\frac {50}{3}.\]

Note 8.47. The instruction printed above this question — “Integrate the following integrals using by parts formular” — is left over from question 4 and does not apply. None of these three needs integration by parts.

Problem 8.7. [Tutorial Sheet 11] Find the area between the curve \(y=f(x)\), the \(x\)-axis and the lines \(x=a\) and \(x=b\). (a) \(f(x)=-3x^2+17x-10\), \(a=1\), \(b=3\); (b) \(f(x)=2x^3+7x^2-4x\), \(a=-3\), \(b=-1\); (c) \(f(x)=-x^4+7x^3-11x^2+5x\), \(a=0\), \(b=4\).

Show solution

Solution.

Note 8.48. First check whether the curve crosses the axis inside the interval. If it does, the integral must be split at each crossing and the sizes added; if it does not, one integral suffices. Factorising is the quickest way to find out.

(a). \(-3x^2+17x-10=-(3x-2)(x-5)\), with roots \(\frac {2}{3}\) and \(5\). Neither lies in \((1,3)\), so there is no crossing, and testing \(x=2\) gives \(-12+34-10=12>0\): the curve is above the axis throughout. \[A=\int _1^3\left (-3x^2+17x-10\right )dx=\left [-x^3+\frac {17x^2}{2}-10x\right ]_1^3\] \[=\left (-27+\tfrac {153}{2}-30\right )-\left (-1+\tfrac {17}{2}-10\right ) =\tfrac {39}{2}-\left (-\tfrac {5}{2}\right )=22.\] \[\therefore \quad A=22 \text { square units}.\]

(b). \(2x^3+7x^2-4x=x(x+4)(2x-1)\), with roots \(-4\), \(0\) and \(\frac {1}{2}\). None lies in \((-3,-1)\), and at \(x=-2\) the value is \(-16+28+8=20>0\): above the axis throughout. \[A=\int _{-3}^{-1}\left (2x^3+7x^2-4x\right )dx =\left [\frac {x^4}{2}+\frac {7x^3}{3}-2x^2\right ]_{-3}^{-1}\] \[=\left (\tfrac {1}{2}-\tfrac {7}{3}-2\right ) -\left (\tfrac {81}{2}-63-18\right )=-\tfrac {23}{6}-\left (-\tfrac {81}{2}\right ) =\frac {-23+243}{6}=\frac {220}{6}=\frac {110}{3}.\] \[\therefore \quad A=\frac {110}{3}=36\tfrac {2}{3} \text { square units}.\]

(c). Factorise: \[-x^4+7x^3-11x^2+5x=-x\left (x^3-7x^2+11x-5\right )=-x(x-5)(x-1)^2.\] The roots are \(0\), \(1\) (repeated) and \(5\). Only \(0\) and \(1\) lie in \([0,4]\), and \(x=0\) is an endpoint.

The root at \(x=1\) is repeated, so the curve touches the axis there without crossing it. Testing either side confirms this: at \(x=0.5\) the value is \(-0.5(-4.5)(0.25)=0.5625>0\), and at \(x=2\) it is \(-2(-3)(1)=6>0\). The curve stays above the axis on the whole interval, so no split is needed. \[A=\int _0^4\left (-x^4+7x^3-11x^2+5x\right )dx =\left [-\frac {x^5}{5}+\frac {7x^4}{4}-\frac {11x^3}{3}+\frac {5x^2}{2}\right ]_0^4\] \[=-\frac {1024}{5}+\frac {1792}{4}-\frac {704}{3}+\frac {80}{2}-0 =-204.8+448-234.667+40=48.533.\] Exactly, \[A=\frac {728}{15}=48\tfrac {8}{15} \text { square units}.\]

Note 8.49. Part (c) is the interesting one. A repeated root looks like a crossing when the roots are simply listed, and splitting the integral at \(x=1\) would be the natural reflex. Doing so is not wrong — \(\frac {23}{60}+\frac {963}{20}=\frac {728}{15}\), the same total — but it is unnecessary work, and it matters because had the two pieces been of opposite sign, adding them without taking sizes would have given the wrong answer. Checking the sign either side is what settles it.

Questions on this section

Stuck on something here? Ask below and it stays attached to this topic.