Porisma

Worked solution

Integrate a periodic piecewise function

f(x)=xexf(x)=xe^x for 0<x≤10<x\le1, and f(x)=e(2−x)f(x)=e(2-x) for 1<x≤21<x\le2. Also f(x)=f(x+2)f(x)=f(x+2) for all real xx.

(i) Sketch y=f(x)y=f(x) for −2<x≤4-2<x\le4.

(ii) Find ∫−13f(x) dx\displaystyle\int_{-1}^{3}f(x)\,dx exactly.

[2015/MJC/I/2]

CJC · Discussion · Question 4

Answer

∫−13f(x)dx=2+e\displaystyle\int_{-1}^{3}f(x)dx=2+e; sketch repeats every two units.

(i) Repeat the fundamental two-unit pattern

On each period the graph rises as xexxe^x from height 00 to height ee, then falls along a straight line to height 00. Repeat this with period 22: peaks are (−1,e)(-1,e), (1,e)(1,e) and (3,e)(3,e), and zero values occur at even integers. The point at x=−2x=-2 is excluded and the point at x=4x=4 included.

How did this part go?

(ii) Use two complete periods

The interval [−1,3][-1,3] has length 44, so the integral is 2∫02f(x)dx=2[∫01xexdx+e/2]2\int_0^2f(x)dx=2[\int_0^1xe^x dx+e/2]. Integration by parts gives ∫01xexdx=[xex]01−∫01exdx=e−(e−1)=1\int_0^1xe^x dx=[xe^x]_0^1-\int_0^1e^x dx=e-(e-1)=1. Hence the required value is 2+e2+e.

How did this part go?

Compare your sketch

Expand diagram

Use the scrollbars or arrow keys to inspect details.

Periodic graph on minus 2 < x <= 4: curved rises from even-integer zeros to peaks at (minus 1,e),(1,e),(3,e), followed by straight descending segments. Open point at (minus 2,0), closed point at (4,0).
Periodic graph on minus 2 < x <= 4: curved rises from even-integer zeros to peaks at (minus 1,e),(1,e),(3,e), followed by straight descending segments. Open point at (minus 2,0), closed point at (4,0).
Periodic graph on minus 2 < x <= 4: curved rises from even-integer zeros to peaks at (minus 1,e),(1,e),(3,e), followed by straight descending segments. Open point at (minus 2,0), closed point at (4,0).

Common mistakes

Repeat the curved rising segment and the straight falling segment, keeping the stated endpoint inclusion.

Read the hint