Skip to content
Math Analysis 1

Solved integral exercises, from basic to exam level

Twenty-one exercises with solutions: basic integrals, parts, substitution, partial fractions, cyclic and trigonometric integrals, areas, volumes of revolution, integral functions, improper integrals, rms value and area under a parabola, with graphs.

Exercises on indefinite, definite and improper integrals of the kind set in Calculus 1 (Mathematical Analysis 1) courses, in three levels: basic, with basic integrals, composite forms, integration by parts and elementary partial fractions; intermediate, with cyclic integrals, rational functions with irreducible denominators or repeated roots, trigonometric substitutions; exam, with areas, volumes, integral functions, improper integrals and an application to electrical engineering. The result is given straight away; the full solution opens with a click. The proofs and tables are in the in-depth study linked at the top.

Basic level

Exercise 1. Basic integrals

Compute \displaystyle\int\left(3x^2 - \frac{2}{x} + e^x\right)dx.

Result: x^3 - 2\ln|x| + e^x + C.

Solution

The integral is linear: integrate term by term. \int 3x^2\,dx = x^3; \int\frac{2}{x}dx = 2\ln|x|; \int e^x\,dx = e^x.

The absolute value in the logarithm is needed because \frac{1}{x} is also defined for x \lt  0, and there the antiderivative is \ln(-x). Check: differentiating the result gives back the integrand.

Exercise 2. A composite form

Compute \displaystyle\int x\,e^{x^2}\,dx.

Result: \frac{1}{2}e^{x^2} + C.

Solution

The derivative of the exponent x^2 is 2x, which appears (up to the factor 2) in front of the exponential. With u = x^2, du = 2x\,dx:

    \[ \int x\,e^{x^2}dx = \frac{1}{2}\int e^u\,du = \frac{1}{2}e^{x^2} + C \]

It is the form \int g'e^g = e^g. Beware: \int e^{x^2}dx, without the x in front, cannot be expressed with elementary functions.

Exercise 3. By parts

Compute \displaystyle\int x\cos x\,dx.

Result: x\sin x + \cos x + C.

Solution

Differentiate the polynomial and integrate the cosine: f = x, g' = \cos x, so f' = 1, g = \sin x.

    \[ \int x\cos x\,dx = x\sin x - \int\sin x\,dx = x\sin x + \cos x + C \]

The opposite choice (f = \cos x, g' = x) would lead to \int x^2\sin x, which is more complicated: the rule is to differentiate the factor that simplifies.

Exercise 4. Partial fractions

Compute \displaystyle\int\frac{dx}{x^2 - 4}.

Result: \frac{1}{4}\ln\left|\frac{x - 2}{x + 2}\right| + C.

Solution

The denominator has \Delta \gt  0: x^2 - 4 = (x - 2)(x + 2). Look for \dfrac{1}{(x - 2)(x + 2)} = \dfrac{A}{x - 2} + \dfrac{B}{x + 2}, i.e. 1 = A(x + 2) + B(x - 2).

With x = 2: 1 = 4A, A = \frac{1}{4}. With x = -2: 1 = -4B, B = -\frac{1}{4}.

    \[ \int\frac{dx}{x^2 - 4} = \frac{1}{4}\ln|x - 2| - \frac{1}{4}\ln|x + 2| = \frac{1}{4}\ln\left|\frac{x - 2}{x + 2}\right| + C \]

Exercise 5. Definite integral and area

Compute \displaystyle\int_0^\pi\sin x\,dx and \displaystyle\int_0^{2\pi}\sin x\,dx. What is the area of the region between the graph of \sin x and the x axis for 0 \le x \le 2\pi?

Result: 2; 0; the area is 4.

Solution

Fundamental theorem: \int_0^\pi\sin x\,dx = [-\cos x]_0^\pi = -(-1) + 1 = 2.

On [0, 2\pi]: [-\cos x]_0^{2\pi} = -1 + 1 = 0. The integral is zero because it counts with sign: the part below the axis, between \pi and 2\pi, is -2 and cancels the part above.

The area, which is always positive, is the integral of the absolute value: \int_0^{2\pi}|\sin x|\,dx = 2 + 2 = 4. In area problems always study the sign of the function first.

Integral of sine over one period
Between 0 and pi sine is positive and the blue area counts with a plus sign; between pi and 2 pi it is negative and the red area counts with a minus sign. The two areas are equal and the integral over one period is zero.

Intermediate level

Exercise 6. The logarithm

Compute \displaystyle\int\ln x\,dx.

Result: x\ln x - x + C.

Solution

By parts with the factor-1 trick: f = \ln x, g' = 1, so f' = \frac{1}{x}, g = x.

    \[ \int\ln x\,dx = x\ln x - \int x\cdot\frac{1}{x}dx = x\ln x - x + C \]

The same trick works for \arctan x, \arcsin x and \ln(1 + x^2).

Exercise 7. A cyclic integral

Compute \displaystyle\int e^x\sin x\,dx.

Result: \frac{1}{2}e^x(\sin x - \cos x) + C.

Solution

Let I be the integral. By parts with f = \sin x, g' = e^x: I = e^x\sin x - \int e^x\cos x\,dx.

Again by parts with f = \cos x, g' = e^x: \int e^x\cos x\,dx = e^x\cos x + \int e^x\sin x\,dx = e^x\cos x + I.

Substituting: I = e^x\sin x - e^x\cos x - I, so 2I = e^x(\sin x - \cos x) and I = \frac{1}{2}e^x(\sin x - \cos x) + C.

Important: in both integrations by parts you must differentiate the same family of functions (here the trigonometric ones); switching at the second step brings you back to the original integral with a useless identity.

Exercise 8. Irreducible denominator

Compute \displaystyle\int\frac{2x + 3}{x^2 + 2x + 5}\,dx.

Result: \ln(x^2 + 2x + 5) + \frac{1}{2}\arctan\frac{x + 1}{2} + C.

Solution

\Delta = 4 - 20 \lt  0: the denominator does not factor. Make its derivative, 2x + 2, appear: 2x + 3 = (2x + 2) + 1.

    \[ \int\frac{2x + 2}{x^2 + 2x + 5}dx + \int\frac{dx}{x^2 + 2x + 5} \]

The first is \ln(x^2 + 2x + 5) (no absolute value: the argument is always positive). For the second complete the square: x^2 + 2x + 5 = (x + 1)^2 + 4, and the formula of the in-depth study (k = 2) gives \frac{1}{2}\arctan\frac{x + 1}{2}.

Exercise 9. A double root

Compute \displaystyle\int\frac{dx}{x(x + 1)^2}.

Result: \ln\left|\frac{x}{x + 1}\right| + \frac{1}{x + 1} + C.

Solution

With the double root -1 two fractions are needed: \dfrac{1}{x(x + 1)^2} = \dfrac{A}{x} + \dfrac{B}{x + 1} + \dfrac{C}{(x + 1)^2}, i.e. 1 = A(x + 1)^2 + Bx(x + 1) + Cx.

With x = 0: A = 1. With x = -1: 1 = -C, C = -1. Coefficient of x^2: 0 = A + B, so B = -1.

    \[ \int\left(\frac{1}{x} - \frac{1}{x + 1} - \frac{1}{(x + 1)^2}\right)dx = \ln|x| - \ln|x + 1| + \frac{1}{x + 1} + C \]

Typical mistake: writing only \frac{A}{x} + \frac{B}{(x + 1)^2}, forgetting the term \frac{B}{x + 1}: the system would have no solution.

Exercise 10. The square of sine

Compute \displaystyle\int\sin^2 x\,dx.

Result: \frac{x}{2} - \frac{\sin 2x}{4} + C.

Solution

Half-angle formula: \sin^2 x = \frac{1 - \cos 2x}{2}. So

    \[ \int\sin^2 x\,dx = \frac{x}{2} - \frac{1}{2}\int\cos 2x\,dx = \frac{x}{2} - \frac{\sin 2x}{4} + C \]

By parts one gets the same result as a cyclic integral. Over a whole period the mean of \sin^2 is \frac{1}{2}: this is the fact behind the rms value (exercise 20).

Exercise 11. The universal substitution

Compute \displaystyle\int\frac{dx}{2 + \cos x}.

Result: \frac{2}{\sqrt 3}\arctan\left(\frac{1}{\sqrt 3}\tan\frac{x}{2}\right) + C (for -\pi \lt  x \lt  \pi).

Solution

No shortcut: use t = \tan\frac{x}{2}, with \cos x = \frac{1 - t^2}{1 + t^2} and dx = \frac{2\,dt}{1 + t^2}.

    \[ 2 + \cos x = \frac{2 + 2t^2 + 1 - t^2}{1 + t^2} = \frac{3 + t^2}{1 + t^2} \]

    \[ \int\frac{dx}{2 + \cos x} = \int\frac{1 + t^2}{3 + t^2}\cdot\frac{2\,dt}{1 + t^2} = \int\frac{2\,dt}{t^2 + 3} = \frac{2}{\sqrt 3}\arctan\frac{t}{\sqrt 3} + C \]

On the whole line the antiderivative must be “joined up” at each odd multiple of \pi, where \tan\frac{x}{2} is undefined; for definite integrals over [0, 2\pi] it is better to use symmetry: \int_0^{2\pi}\frac{dx}{2 + \cos x} = 2\int_0^{\pi}\ldots = \frac{2\pi}{\sqrt 3}.

Exercise 12. The square root of 1 minus x squared

Compute \displaystyle\int\sqrt{1 - x^2}\,dx and deduce the area of the circle of radius 1.

Result: \frac{1}{2}\left(\arcsin x + x\sqrt{1 - x^2}\right) + C; area \pi.

Solution

With x = \sin t, t \in \left[-\frac{\pi}{2}, \frac{\pi}{2}\right], we have \sqrt{1 - x^2} = \cos t (positive in that interval) and dx = \cos t\,dt:

    \[ \int\cos^2 t\,dt = \frac{t}{2} + \frac{\sin 2t}{4} = \frac{t}{2} + \frac{\sin t\cos t}{2} \]

Back to x: t = \arcsin x, \sin t\cos t = x\sqrt{1 - x^2}.

The circle of radius 1 is four times the area between 0 and 1: 4\cdot\frac{1}{2}\left(\frac{\pi}{2} + 0\right) = \pi.

Geometric meaning of the antiderivative
The area under the circle between 0 and x is the sector S with angle t, which equals t over 2, plus the triangle T, which equals x times the square root of 1 minus x squared, over 2.

Exam level

Exercise 13. Area between two curves

Compute the area of the region bounded by the parabolas y = x^2 and y = 2 - x^2.

Result: \frac{8}{3}.

Solution

Intersections. x^2 = 2 - x^2, i.e. x = \pm 1. Between -1 and 1 the parabola 2 - x^2 is on top (at 0 it is 2, against 0).

Area. Integrate “top minus bottom”:

    \[ A = \int_{-1}^{1}\left[(2 - x^2) - x^2\right]dx = \int_{-1}^{1}(2 - 2x^2)\,dx = 2\int_0^1(2 - 2x^2)\,dx = 2\left(2 - \frac{2}{3}\right) = \frac{8}{3} \]

Symmetry was used: the integrand is even.

Region between two parabolas
The purple region lies between the parabola y equal to 2 minus x squared, above, and y equal to x squared, below; the two curves meet at minus 1 and 1.

Exercise 14. Volumes of revolution

Compute the volume of the solid obtained by rotating about the x axis the graph of y = \sqrt x for 0 \le x \le 4, and the one obtained by rotating an arch of y = \sin x for 0 \le x \le \pi.

Result: 8\pi; \frac{\pi^2}{2}.

Solution

Cut the solid into discs perpendicular to the axis, of radius f(x) and thickness dx: each has volume \pi f(x)^2\,dx. So

    \[ V = \pi\int_a^b f(x)^2\,dx \]

For \sqrt x: V = \pi\int_0^4 x\,dx = \pi\cdot 8 = 8\pi. It is a paraboloid, and the result is half the circumscribed cylinder (\pi\cdot 2^2\cdot 4 = 16\pi), as Archimedes found.

For sine: V = \pi\int_0^\pi\sin^2 x\,dx = \pi\cdot\frac{\pi}{2} = \frac{\pi^2}{2}, using exercise 10.

Solid of revolution divided into discs
Rotating the curve y equal to the square root of x about the x axis gives a paraboloid. The highlighted disc, of radius f of x and thickness d x, has volume pi times f of x squared times d x.

Exercise 15. By parts with arctangent

Compute \displaystyle\int_0^1 x\arctan x\,dx.

Result: \frac{\pi}{4} - \frac{1}{2} \approx 0.285.

Solution

By parts differentiating the arctangent: f = \arctan x, g' = x, g = \frac{x^2}{2}.

    \[ \int_0^1 x\arctan x\,dx = \left[\frac{x^2}{2}\arctan x\right]_0^1 - \frac{1}{2}\int_0^1\frac{x^2}{1 + x^2}dx \]

The first term is \frac{1}{2}\cdot\frac{\pi}{4} = \frac{\pi}{8}. In the second divide: \frac{x^2}{1 + x^2} = 1 - \frac{1}{1 + x^2}, with integral 1 - \frac{\pi}{4}.

Result: \frac{\pi}{8} - \frac{1}{2}\left(1 - \frac{\pi}{4}\right) = \frac{\pi}{4} - \frac{1}{2}.

Exercise 16. Substitution then parts

Compute \displaystyle\int e^{\sqrt x}\,dx.

Result: 2e^{\sqrt x}\left(\sqrt x - 1\right) + C.

Solution

With t = \sqrt x, i.e. x = t^2, dx = 2t\,dt: \int e^{\sqrt x}dx = \int 2t\,e^t\,dt.

By parts (f = 2t, g' = e^t): 2te^t - \int 2e^t\,dt = 2e^t(t - 1). Back to x: 2e^{\sqrt x}(\sqrt x - 1) + C.

Check by differentiating: 2e^{\sqrt x}\cdot\frac{1}{2\sqrt x}(\sqrt x - 1) + 2e^{\sqrt x}\cdot\frac{1}{2\sqrt x} = e^{\sqrt x}.

Exercise 17. Wallis integrals

Compute \displaystyle\int_0^{\pi/2}\sin^4 x\,dx in two ways.

Result: \frac{3\pi}{16}.

Solution

With the recurrence formula (in-depth study): I_4 = \frac{3}{4}I_2 = \frac{3}{4}\cdot\frac{1}{2}I_0 = \frac{3}{8}\cdot\frac{\pi}{2} = \frac{3\pi}{16}.

With trigonometric formulas: \sin^4 x = \left(\frac{1 - \cos 2x}{2}\right)^2 = \frac{1 - 2\cos 2x + \cos^2 2x}{4} = \frac{3 - 4\cos 2x + \cos 4x}{8}. Between 0 and \frac{\pi}{2} the integrals of \cos 2x and \cos 4x vanish, and what remains is \frac{3}{8}\cdot\frac{\pi}{2} = \frac{3\pi}{16}.

Exercise 18. Studying an integral function

Study F(x) = \displaystyle\int_0^x e^{-t^2}\,dt, given that \displaystyle\int_0^{+\infty}e^{-t^2}\,dt = \frac{\sqrt\pi}{2}. Then compute the derivative of G(x) = \displaystyle\int_0^{x^2}e^{-t^2}\,dt.

Result: F is odd, increasing, with an inflection point at 0 and asymptotes y = \pm\frac{\sqrt\pi}{2}; G'(x) = 2x\,e^{-x^4}.

Solution

Derivative. By the fundamental theorem F'(x) = e^{-x^2} \gt  0: F is increasing on all of \mathbb R. We study a function whose expression is unknown, only through its derivative.

Symmetry. The integrand is even, so F(-x) = \int_0^{-x}e^{-t^2}dt = -\int_0^{x}e^{-s^2}ds = -F(x) (with t = -s): F is odd, F(0) = 0.

Concavity. F''(x) = -2x\,e^{-x^2}: convex for x \lt  0, concave for x \gt  0, inflection point at 0 with slope F'(0) = 1.

Limits. As x \to +\infty, F(x) \to \frac{\sqrt\pi}{2} \approx 0.886 (given in the problem); by symmetry -\frac{\sqrt\pi}{2} at -\infty. Two horizontal asymptotes.

The composite function. G(x) = F(x^2), so G'(x) = F'(x^2)\cdot 2x = 2x\,e^{-x^4}.

The function \frac{2}{\sqrt\pi}F(x) is called the error function, \text{erf}(x): it is the probability that a normal random variable lies within a certain distance of its mean.

The integral function of e to the minus t squared
The dashed curve is the integrand; the blue curve is the integral function F, which always increases, has its inflection point at the origin and tends to plus and minus root pi over 2.

Exercise 19. An improper integral

Compute \displaystyle\int_1^{+\infty}\frac{\ln x}{x^2}\,dx.

Result: 1.

Solution

By definition it is \lim_{b\to+\infty}\int_1^b\frac{\ln x}{x^2}dx. By parts with f = \ln x, g' = x^{-2}, g = -\frac{1}{x}:

    \[ \int_1^b\frac{\ln x}{x^2}dx = \left[-\frac{\ln x}{x}\right]_1^b + \int_1^b\frac{dx}{x^2} = -\frac{\ln b}{b} + 1 - \frac{1}{b} \]

As b \to +\infty, \frac{\ln b}{b} \to 0 and \frac{1}{b} \to 0: the integral converges and equals 1.

Convergence could be predicted by comparison: \ln x \lt  \sqrt x for x \ge 1, so the integrand is less than x^{-3/2}, whose integral converges.

Exercise 20. The rms value

A current i(t) = I_m\sin\omega t flows in a resistor R. Compute the average power dissipated over one period, the rms value of the current, and the mean value of |i(t)|.

Result: P = \frac{1}{2}RI_m^2; I_{rms} = \frac{I_m}{\sqrt 2} \approx 0.707\,I_m; mean value \frac{2}{\pi}I_m \approx 0.637\,I_m.

Solution

Average power. p(t) = Ri^2 = RI_m^2\sin^2\omega t. The period is T = \frac{2\pi}{\omega}, and the average is

    \[ P = \frac{1}{T}\int_0^T RI_m^2\sin^2\omega t\,dt = RI_m^2\cdot\frac{1}{2} \]

because the mean of \sin^2 over a period is \frac{1}{2} (exercise 10, with the change u = \omega t).

rms value. It is the direct current that would dissipate the same power: RI_{rms}^2 = \frac{1}{2}RI_m^2, so I_{rms} = \frac{I_m}{\sqrt 2}. The 230 V of the mains is an rms value: the peak is 230\sqrt 2 \approx 325 V.

Rectified mean value. \frac{1}{T/2}\int_0^{T/2}I_m\sin\omega t\,dt = \frac{2}{T}\cdot\frac{2I_m}{\omega} = \frac{2}{\pi}I_m. Cheap meters measure this and multiply it by \frac{\pi}{2\sqrt 2} \approx 1.11: they give the right rms value only for sinusoidal signals.

The square of sine and its mean
The blue curve, sine squared, oscillates between 0 and 1 with half the period of sine, dashed in grey. The area under it over one period equals that of the rectangle of height one half.

Exercise 21. The area under a parabola in the first quadrant

The parabola f(t) = at^2 + bt + c meets the vertical axis at (0, \alpha) and the horizontal axis at (\beta, 0), with \alpha \gt  0 and \beta \gt  0. Compute the area of the region of the first quadrant between the parabola and the two axes in two cases: (A) the parabola is tangent to the horizontal axis at \beta; (B) the axis of symmetry of the parabola coincides with the vertical axis. Compare the results with the area of the rectangle with sides \alpha and \beta.

Result: (A) f(t) = \alpha\left(1 - \frac{t}{\beta}\right)^2, area \frac{\alpha\beta}{3}; (B) f(t) = \alpha\left(1 - \frac{t^2}{\beta^2}\right), area \frac{2}{3}\alpha\beta.

Solution

Why two cases are needed. There are three coefficients to find (a, b, c), and passing through (0, \alpha) and (\beta, 0) gives only two conditions: c = \alpha and a\beta^2 + b\beta + \alpha = 0. Without a third condition the parabola is not determined, and neither is the area. The two most natural conditions are tangency to the horizontal axis, case A, and symmetry about the vertical axis, case B.

Case A: tangent at \beta. If the horizontal axis is tangent at \beta, then \beta is a double root and the vertex is (\beta, 0): f(t) = a(t - \beta)^2. From f(0) = a\beta^2 = \alpha we get a = \frac{\alpha}{\beta^2}, so

    \[ f(t) = \frac{\alpha}{\beta^2}(t - \beta)^2 = \alpha\left(1 - \frac{t}{\beta}\right)^2,\qquad a = \frac{\alpha}{\beta^2},\ b = -\frac{2\alpha}{\beta},\ c = \alpha \]

f \ge 0 everywhere, so the area is the integral. With the substitution u = 1 - \frac{t}{\beta}, dt = -\beta\,du, and the limits t = 0 \to u = 1, t = \beta \to u = 0:

    \[ A = \int_0^\beta\alpha\left(1 - \frac{t}{\beta}\right)^2dt = \alpha\beta\int_0^1u^2\,du = \frac{\alpha\beta}{3} \]

Case B: symmetric about the vertical axis. Then b = 0 and the vertex is (0, \alpha): f(t) = \alpha + at^2, with f(\beta) = 0, i.e. a = -\frac{\alpha}{\beta^2}. So f(t) = \alpha\left(1 - \frac{t^2}{\beta^2}\right), positive between 0 and \beta:

    \[ A = \int_0^\beta\alpha\left(1 - \frac{t^2}{\beta^2}\right)dt = \alpha\left[t - \frac{t^3}{3\beta^2}\right]_0^\beta = \alpha\left(\beta - \frac{\beta}{3}\right) = \frac{2}{3}\alpha\beta \]

The comparison. The rectangle containing the region has area \alpha\beta. In case A the parabola fills one third of the rectangle, in case B two thirds: the two regions are complementary, because the parabola of case A, flipped (t \to \beta - t, f \to \alpha - f), gives exactly that of case B. The two-thirds result, the area of a parabolic segment relative to the circumscribed rectangle, was already known to Archimedes, who proved it without integrals by the method of exhaustion.

Numerical check. With \alpha = 3 and \beta = 2: case A f = \frac{3}{4}t^2 - 3t + 3, area 2; case B f = 3 - \frac{3}{4}t^2, area 4; rectangle 6.

Area under a parabola in the two cases
On the left case A: the parabola starts from alpha on the vertical axis and touches the horizontal axis at beta, where it has its vertex; the shaded area is one third of the rectangle alpha times beta. On the right case B: the parabola has its vertex at alpha and crosses the horizontal axis at beta; the shaded area is two thirds of the rectangle.
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
0
Would love your thoughts, please comment.x
()
x