STEP I 2000 8

Note that e^x > 0 for all real x. So for -1 \le x \le 0 we have xe^x \le 0, so that |xe^x| = -xe^x. For 0 \le x \le 1, we have xe^x \ge 0 so |xe^x| = xe^x. So:

\begin{align*}\int_{-1}^1 |xe^x| \mathrm dx & = \int_{-1}^0 |xe^x| \mathrm dx + \int_0^1 |xe^x| \mathrm dx \\ & = -\int_{-1}^0 xe^x \mathrm dx + \int_0^1 xe^x \mathrm dx\end{align*}

We can use IBP for these integrals. Using the notation:

\displaystyle \int uv' = uv - \int u'v

use u = x, v' = e^x so that u' = 1 and v = e^x. Then:

\displaystyle \int xe^x \mathrm dx = xe^x - \int e^x \mathrm dx = xe^x - e^x = (x - 1)e^x

Then:

\begin{align*}\int_{-1}^1 |xe^x| \mathrm dx & = -\left[(x - 1)e^x\right]_{-1}^0 + \left[(x - 1)e^x\right]_0^1 \\ & = -\left(-e^0 - (-1 - 1)e^{-1}\right) + \left((1 - 1)e^1 - (0 - 1)e^0\right) \\ & = 1 - 2e^{-1} + 1 \\ & = 2 - 2e^{-1}\end{align*}

(i)

We investigate the zeroes of x^3 - 2x^2 - x + 2. Note that 1 - 2 - 1 + 2 = 0, so (x - 1) is a factor.

Set x^3 - 2x^2 - x + 2 = (x-1)(x^2 + Ax + B). Then x^3 - 2x^2 - x + 2 = x^3 + (A - 1)x^2 + (B - A)x - B. So A = -1 and B = -2.

We can then factorise: x^3 - 2x^2 - x + 2 = (x-1)(x^2 - x - 2) = (x - 1)(x + 1)(x - 2).

We can read from this that for 0 \le x \le 1, we’ll have (x - 1) \le 0 and (x - 2) < 0 and x + 1 > 0, so x^3 - 2x^2 - x + 2 > 0. So we’ll have |x^3 - 2x^2 - x + 2| \ge 0, and so |x^3 - 2x^2 - x + 2| = x^3 - 2x^2 - x + 2.

For 1 \le x \le 2, only (x - 2) out of these three factors will non-positive, so we’ll have |x^3 - 2x^2 -x + 2| \le 0 and so |x^3 - 2x^2 - x + 2| = -(x^3 - 2x^2 - x + 2).

For x > 2 all of these factors are positive so |x^3 - 2x^2 - x + 2| = x^3 - 2x^2 - x + 2. Then:

\begin{align*}\int_0^4 |x^3 - 2x^2 - x + 2| \mathrm dx & = \int_0^1 |x^3 - 2x^2 - x + 2| \mathrm dx + \int_1^2 |x^3 - 2x^2 - x + 2| \mathrm dx \\ & + \int_2^4 |x^3 - 2x^2 - x + 2| \mathrm dx \\ & = \int_0^1 (x^3 - 2x^2 - x + 2) \mathrm dx - \int_1^2 (x^3 - 2x^2 - x + 2) \mathrm dx \\ &+ \int_2^4 (x^3 - 2x^2 - x + 2) \mathrm dx \\ & = \left[\frac {x^4} 4 - \frac 2 3 x^3 - \frac {x^2} 2 + 2x\right]_0^1 - \left[\frac {x^4} 4 - \frac 2 3 x^3 - \frac {x^2} 2 + 2x\right]_1^2 \\ & + \left[\frac {x^4} 4 - \frac 2 3 x^3 - \frac {x^2} 2 + 2x\right]_2^4 \\ & = \frac 1 4 - \frac 2 3 - \frac 1 2 + 2 - \left(\frac {2^4} 4 - \frac 2 3 \times 2^3 - \frac {2^2} 2 + 2 \times 2\right) \\ & + \left(\frac 1 4 - \frac 2 3 - \frac 1 2 + 2\right) + \frac {4^4} 4 - \frac 2 3 \times 4^3 - \frac {4^2} 2 + 4 \times 2 \\ & - \left(\frac {2^4} 4 - \frac 2 3 \times 2^3 - \frac {2^2} 2 + 2 \times 2\right) \\ &= \frac {133} 6\end{align*}

(ii)

From addition formulae:

\displaystyle \sin x + \cos x = \sqrt 2 \sin \left(x + \frac \pi 4\right)

So:

\begin{align*}\int_{-\pi}^\pi |\sin x + \cos x| \mathrm dx & = \int_{-\pi}^\pi \left|\sqrt 2 \sin \left(x + \frac \pi 4\right)\right| \mathrm dx \\ & = \sqrt 2 \int_{-\frac {3 \pi} 4}^{\frac {5 \pi} 4} |\sin \theta| \mathrm d\theta\end{align*}

Here we substitute \theta = x + \dfrac \pi 4.

For -\dfrac {3 \pi} 4 \le \theta \le 0, we have that \sin \theta \le 0, so |\sin \theta| = -\sin \theta.

For 0 \le \theta \le \pi we have \sin \theta \ge 0 so |\sin \theta| = \sin \theta.

Finally for \pi \le \theta \le \dfrac {5 \pi} 4 we have \sin \theta \le 0 so |\sin \theta| = -\sin \theta, so:

\begin{align*}\sqrt 2 \int_{-\frac {3 \pi} 4}^{\frac {5 \pi} 4} |\sin \theta| \mathrm d\theta & = \sqrt 2 \left(-\int_{-\frac {3 \pi} 4}^0 \sin \theta \mathrm d\theta + \int_0^\pi \sin \theta \mathrm d\theta - \int_\pi^{\frac {5 \pi} 4} \sin \theta \mathrm d\theta\right) \\ & = \sqrt 2 \left(\cos 0 - \cos \left(-\frac {3 \pi} 4\right) - \cos \pi + \cos 0 + \cos \left(\frac {5 \pi} 4\right) - \cos \pi\right) \\ & = 4 \sqrt 2\end{align*}

A pretty exhausting question that has a lot of room for arithmetic errors.

2 Likes

:champagne: :champagne: :champagne: :champagne: :champagne: :champagne: