Skip to main content

Integration — Diagnostic Tests

Unit Tests

Tests edge cases, boundary conditions, and common misconceptions for integration.

UT-1: Integration by Parts — Cyclic Integral Trap

Question:

(a) Evaluate e2xsinxdx\displaystyle\int e^{2x}\sin x\,dx.

(b) A student sets up I=e2xsinxdxI = \int e^{2x}\sin x\,dx, applies integration by parts twice, and gets I=(something)II = \text{(something)} - I, then concludes I=0I = 0. Explain the error.

[Difficulty: hard. Tests cyclic integration by parts and the algebraic step of collecting the II terms.]

Solution:

(a) Let I=e2xsinxdxI = \displaystyle\int e^{2x}\sin x\,dx.

First application: u=e2xu = e^{2x}, dv=sinxdxdv = \sin x\,dx. Then du=2e2xdxdu = 2e^{2x}\,dx, v=cosxv = -\cos x.

I=e2xcosx+2e2xcosxdxI = -e^{2x}\cos x + \int 2e^{2x}\cos x\,dx

Second application on e2xcosxdx\int e^{2x}\cos x\,dx: u=e2xu = e^{2x}, dv=cosxdxdv = \cos x\,dx. Then du=2e2xdxdu = 2e^{2x}\,dx, v=sinxv = \sin x.

e2xcosxdx=e2xsinx2e2xsinxdx=e2xsinxI\int e^{2x}\cos x\,dx = e^{2x}\sin x - \int 2e^{2x}\sin x\,dx = e^{2x}\sin x - I

Substitute back:

I=e2xcosx+2e2xsinx2II = -e^{2x}\cos x + 2e^{2x}\sin x - 2I

3I=e2x(2sinxcosx)3I = e^{2x}(2\sin x - \cos x)

I=e2x(2sinxcosx)3+CI = \frac{e^{2x}(2\sin x - \cos x)}{3} + C

(b) The student's error is that when they got I=(something)II = \text{(something)} - I, they incorrectly concluded I=0I = 0. The correct step is to add II to both sides to get 2I=(something)2I = \text{(something)}, then divide by 22 (or in this case 33). The cyclic nature of the integral means II appears on both sides, but this does not mean I=0I = 0 — it means II can be solved for algebraically.


UT-2: Partial Fractions with Irreducible Quadratic

Question:

(a) Express 3x1(x+1)(x2+1)\dfrac{3x - 1}{(x + 1)(x^2 + 1)} in partial fractions.

(b) Hence evaluate 3x1(x+1)(x2+1)dx\displaystyle\int \frac{3x - 1}{(x + 1)(x^2 + 1)}\,dx.

(c) A student attempts to split the denominator as Ax+1+Bx2+1\dfrac{A}{x + 1} + \dfrac{B}{x^2 + 1} and gets A=3A = 3, B=1B = -1. Show that this is incorrect.

[Difficulty: hard. Tests partial fraction decomposition with an irreducible quadratic factor and the correct form of the decomposition.]

Solution:

(a) Since x2+1x^2 + 1 is irreducible (discriminant =4<0= -4 \lt 0), the correct form is:

3x1(x+1)(x2+1)=Ax+1+Bx+Cx2+1\frac{3x - 1}{(x + 1)(x^2 + 1)} = \frac{A}{x + 1} + \frac{Bx + C}{x^2 + 1}

3x1=A(x2+1)+(Bx+C)(x+1)3x - 1 = A(x^2 + 1) + (Bx + C)(x + 1)

3x1=Ax2+A+Bx2+Bx+Cx+C3x - 1 = Ax^2 + A + Bx^2 + Bx + Cx + C

3x1=(A+B)x2+(B+C)x+(A+C)3x - 1 = (A + B)x^2 + (B + C)x + (A + C)

Comparing coefficients:

  • x2x^2: A+B=0A + B = 0 \quad (i)
  • xx: B+C=3B + C = 3 \quad (ii)
  • constant: A+C=1A + C = -1 \quad (iii)

From (i): B=AB = -A. From (iii): C=1AC = -1 - A.

Substitute into (ii): A+(1A)=3    2A1=3    2A=4    A=2-A + (-1 - A) = 3 \implies -2A - 1 = 3 \implies -2A = 4 \implies A = -2.

Then B=2B = 2 and C=1(2)=1C = -1 - (-2) = 1.

3x1(x+1)(x2+1)=2x+1+2x+1x2+1\frac{3x - 1}{(x + 1)(x^2 + 1)} = \frac{-2}{x + 1} + \frac{2x + 1}{x^2 + 1}

(b)

3x1(x+1)(x2+1)dx=2x+1dx+2x+1x2+1dx\int \frac{3x - 1}{(x + 1)(x^2 + 1)}\,dx = \int \frac{-2}{x + 1}\,dx + \int \frac{2x + 1}{x^2 + 1}\,dx

=2lnx+1+2xx2+1dx+1x2+1dx= -2\ln\lvert x + 1 \rvert + \int \frac{2x}{x^2 + 1}\,dx + \int \frac{1}{x^2 + 1}\,dx

=2lnx+1+ln(x2+1)+arctanx+C= -2\ln\lvert x + 1 \rvert + \ln(x^2 + 1) + \arctan x + C

(c) If the student uses Ax+1+Bx2+1\dfrac{A}{x + 1} + \dfrac{B}{x^2 + 1}, then:

3x1=A(x2+1)+B(x+1)=Ax2+A+Bx+B3x - 1 = A(x^2 + 1) + B(x + 1) = Ax^2 + A + Bx + B

Comparing coefficients: A=0A = 0 (from x2x^2 term), B=3B = 3 (from xx term), and A+B=3=1A + B = 3 = -1 (from constant term), which is a contradiction (313 \neq -1). This shows the form Bx2+1\dfrac{B}{x^2 + 1} is incorrect — the numerator must be linear: Bx+Cx2+1\dfrac{Bx + C}{x^2 + 1}.


UT-3: Improper Integral — Convergence with Parameter

Question:

(a) Determine whether 11xpdx\displaystyle\int_1^{\infty} \frac{1}{x^p}\,dx converges or diverges, stating the condition on pp.

(b) Evaluate 011xdx\displaystyle\int_0^1 \frac{1}{\sqrt{x}}\,dx and explain why it converges despite the integrand being unbounded.

(c) A student claims that since 1x\dfrac{1}{\sqrt{x}} \to \infty as x0+x \to 0^+, the integral must diverge. Explain the error.

[Difficulty: hard. Tests improper integrals at both endpoints and the pp-test for convergence.]

Solution:

(a)

11xpdx=limb1bxpdx\int_1^{\infty} \frac{1}{x^p}\,dx = \lim_{b \to \infty}\int_1^b x^{-p}\,dx

Case p1p \neq 1:

=limb[x1p1p]1b=limb(b1p1p11p)= \lim_{b \to \infty}\left[\frac{x^{1-p}}{1-p}\right]_1^b = \lim_{b \to \infty}\left(\frac{b^{1-p}}{1-p} - \frac{1}{1-p}\right)

  • If p>1p \gt 1: 1p<01 - p \lt 0, so b1p0b^{1-p} \to 0 and the integral converges to 1p1\dfrac{1}{p - 1}.
  • If p<1p \lt 1: 1p>01 - p \gt 0, so b1pb^{1-p} \to \infty and the integral diverges.

Case p=1p = 1:

11xdx=limblnb=(diverges)\int_1^{\infty} \frac{1}{x}\,dx = \lim_{b \to \infty}\ln b = \infty \quad \text{(diverges)}

The integral converges if and only if p>1p \gt 1.

(b)

011xdx=lima0+a1x1/2dx=lima0+[2x]a1=lima0+(22a)=2\int_0^1 \frac{1}{\sqrt{x}}\,dx = \lim_{a \to 0^+}\int_a^1 x^{-1/2}\,dx = \lim_{a \to 0^+}\left[2\sqrt{x}\right]_a^1 = \lim_{a \to 0^+}(2 - 2\sqrt{a}) = 2

The integral converges to 22. Although the integrand is unbounded at x=0x = 0, the area under the curve is finite because the singularity is integrable (the exponent 12>1-\frac{1}{2} \gt -1).

(c) The student confuses the behaviour of the integrand with the behaviour of the integral. An unbounded integrand does not necessarily produce a divergent integral. The key question is whether the area accumulates to a finite value. For 1x\frac{1}{\sqrt{x}} near x=0x = 0, the function grows, but slowly enough that the total area remains bounded. The pp-test shows that 01xpdx\int_0^1 x^{-p}\,dx converges when p<1p \lt 1.


Integration Tests

Tests synthesis of integration with other topics.

IT-1: Area Between Curves with Trigonometry

Question:

Find the total area enclosed by the curves y=sinxy = \sin x and y=cosxy = \cos x for 0xπ0 \le x \le \pi.

[Difficulty: hard. Combines curve sketching, intersection finding, and definite integration with absolute value.]

Solution:

Find intersection points in [0,π][0, \pi]:

sinx=cosx    tanx=1    x=π4\sin x = \cos x \implies \tan x = 1 \implies x = \frac{\pi}{4}

In [0,π][0, \pi], this is the only intersection.

Check which curve is on top:

  • For 0<x<π40 \lt x \lt \frac{\pi}{4}: cosx>sinx\cos x \gt \sin x (e.g., at x=0x = 0: cos0=1>0=sin0\cos 0 = 1 \gt 0 = \sin 0).
  • For π4<x<π\frac{\pi}{4} \lt x \lt \pi: sinx>cosx\sin x \gt \cos x (e.g., at x=π2x = \frac{\pi}{2}: sinπ2=1>0=cosπ2\sin\frac{\pi}{2} = 1 \gt 0 = \cos\frac{\pi}{2}).

Area=0π/4(cosxsinx)dx+π/4π(sinxcosx)dx\text{Area} = \int_0^{\pi/4}(\cos x - \sin x)\,dx + \int_{\pi/4}^{\pi}(\sin x - \cos x)\,dx

=[sinx+cosx]0π/4+[cosxsinx]π/4π= \left[\sin x + \cos x\right]_0^{\pi/4} + \left[-\cos x - \sin x\right]_{\pi/4}^{\pi}

First integral: sinπ4+cosπ4(sin0+cos0)=22+221=21\sin\frac{\pi}{4} + \cos\frac{\pi}{4} - (\sin 0 + \cos 0) = \frac{\sqrt{2}}{2} + \frac{\sqrt{2}}{2} - 1 = \sqrt{2} - 1.

Second integral: (cosπsinπ)(cosπ4sinπ4)=(10) ⁣(2222)=1+2(-\cos\pi - \sin\pi) - (-\cos\frac{\pi}{4} - \sin\frac{\pi}{4}) = (1 - 0) - \!\left(-\frac{\sqrt{2}}{2} - \frac{\sqrt{2}}{2}\right) = 1 + \sqrt{2}.

Area=(21)+(1+2)=22\text{Area} = (\sqrt{2} - 1) + (1 + \sqrt{2}) = 2\sqrt{2}


IT-2: Volume of Revolution with Substitution (with Algebra)

Question:

The region bounded by y=1x+1y = \dfrac{1}{\sqrt{x + 1}}, x=0x = 0, x=3x = 3, and the xx-axis is rotated 360°360\degree about the xx-axis. Find the volume generated.

[Difficulty: hard. Combines volume of revolution with algebraic substitution and definite integral evaluation.]

Solution:

V=π03(1x+1)2dx=π031x+1dxV = \pi\int_0^3 \left(\frac{1}{\sqrt{x+1}}\right)^2 dx = \pi\int_0^3 \frac{1}{x + 1}\,dx

=π[ln(x+1)]03=π(ln4ln1)=πln4=2πln2= \pi\Big[\ln(x + 1)\Big]_0^3 = \pi(\ln 4 - \ln 1) = \pi \ln 4 = 2\pi \ln 2