MatheramaMatherama
← Area Under Curves
Area Under Curves·Section 6·23 min read

Piecewise Functions, GIF, FPF, Modulus, and Max/Min Regions

In all our earlier problems, each boundary curve had a single formula all the way across the region. But very often, a curve changes its formula depending on where xx lies—either because it is defined piecewise by cases (as we saw in Chapter 11, Piecewise Defined Functions), or because it contains special functions like:

  • the Greatest Integer Function (GIF), [x][x] (also written ⌊x⌋\lfloor x \rfloor),
  • the Fractional Part Function (FPF), {x}=x−[x]\{x\} = x - [x],
  • Modulus expressions, ∣f(x)∣|f(x)|, or
  • Maximum and Minimum functions, max⁡(f(x),g(x))\max(f(x), g(x)) and min⁡(f(x),g(x))\min(f(x), g(x)).

Once you learn how to split the xx-axis cleanly at every point where a formula switches, these intimidating curves break down into ordinary polynomials, lines, and simple rectangles and triangles!


1. General Piecewise Functions§

A piecewise function uses different algebraic formulas on different intervals of xx. For example:

f(x)={x2,0≤x≤13−x2,1<x≤3f(x) = \begin{cases} x^2, & 0 \le x \le 1 \\ 3 - \frac{x}{2}, & 1 < x \le 3 \end{cases}

Notice that at the switching point x=1x = 1, f(x)f(x) does not even have to be continuous—here the graph jumps from height 11 up to height 2.52.5!

Area under a general piecewise function split at x = 1

The Rule for Any Piecewise Region§

To find the area bounded by a piecewise curve over [a,b][a, b]:

  1. Mark every breakpoint c1,c2,…,ckc_1, c_2, \dots, c_k inside (a,b)(a, b) where the formula changes (either top curve, bottom curve, or both).
  2. Split the integral at every breakpoint—even if there is a jump discontinuity! (Remember from Chapter 24 that a single vertical jump line has zero width and contributes zero area.)
  3. Integrate each sub-interval separately using the formula valid on that sub-interval, and add the positive areas:
A=A1+A2=∫01x2 dx+∫13(3−x2) dx=13+(2.5+1.52×2)=13+4=133 sq. units.A = A_1 + A_2 = \int_0^1 x^2\,dx + \int_1^3 \left(3 - \frac{x}{2}\right)\,dx = \frac{1}{3} + \left(\frac{2.5 + 1.5}{2} \times 2\right) = \frac{1}{3} + 4 = \frac{13}{3}\text{ sq. units.}

2. Greatest Integer Function (GIF), [x]§

Recall that [x][x] (the Greatest Integer Function) denotes the largest integer less than or equal to xx.

  • For 0≤x<10 \le x < 1, [x]=0[x] = 0.
  • For 1≤x<21 \le x < 2, [x]=1[x] = 1.
  • Watch out for negative numbers! For −1≤x<0-1 \le x < 0, [x]=−1[x] = -1 (NOT 00!), and for −2≤x<−1-2 \le x < -1, [x]=−2[x] = -2.

Geometrically, on every interval [n,n+1)[n, n + 1) between consecutive integers, [x][x] is a flat horizontal step of constant height nn. That means finding area under [x][x] requires zero integration—you are just adding areas of rectangles!

How to Handle [g(x)] (GIF Inside Another Function)§

What if [x][x] is replaced by [x2][x^2], [x][\sqrt{x}], [2x][2x], or [2sin⁡x][2\sin x]?

  • If g(x)g(x) is strictly increasing or strictly decreasing on [a,b][a, b], finding its range [g(a),g(b)][g(a), g(b)] immediately tells you every integer kk that g(x)g(x) crosses, and each equation g(x)=kg(x) = k has at most one root.
  • Whenever g(x)g(x) has turns (local maxima or minima), finding just the endpoint values can miss intermediate peaks or valleys and hit the same integer level multiple times. Always use the graphical horizontal-line method instead:
  1. Draw the graph of y=g(x)y = g(x) carefully over the interval [a,b][a, b].
  2. Draw horizontal lines at every integer value on the yy-axis (y=…,−1,0,1,2,3,…y = \dots, -1, 0, 1, 2, 3, \dots) spanning the height of the curve. Think of each pair of consecutive lines y=ky = k and y=k+1y = k + 1 as the floor (y=ky = k) and ceiling (y=k+1y = k + 1) of one storey of a building.
  3. Drop vertical lines down to the xx-axis from every point where y=g(x)y = g(x) intersects a floor or ceiling line. These xx-values (x1,x2,…x_1, x_2, \dots) split [a,b][a, b] into sub-intervals.
  4. Drop every portion of the curve onto its floor: any piece of y=g(x)y = g(x) lying inside the band between floor kk and ceiling k+1k + 1 (meaning k≤g(x)<k+1k \le g(x) < k + 1) loses its extra fractional height above kk and falls straight down onto floor kk, turning into a flat horizontal step at y=ky = k! Notice that floor always means the lower integer line—so for negative values too, a portion lying between floor −2-2 and ceiling −1-1 (−2≤g(x)<−1-2 \le g(x) < -1) drops down onto floor −2-2, never up to −1-1.

Graphical method for [g(x)] using horizontal integer lines on a curve with turns

Look closely at how this floor-and-ceiling idea reads directly off the figure above:

  • On [x1,x2][x_1, x_2], the upper arch of y=g(x)y = g(x) lies between floor 22 and ceiling 33 (2≤g(x)<32 \le g(x) < 3), so that entire curved bump falls onto floor 22 ([g(x)]=2[g(x)] = 2), forming the green rectangle of height 22.
  • On [a,x1)[a, x_1), (x2,x3](x_2, x_3], and [x4,b][x_4, b], the curve lies between floor 11 and ceiling 22 (1≤g(x)<21 \le g(x) < 2), so every one of those pieces falls onto floor 11 ([g(x)]=1[g(x)] = 1).
  • On (x3,x4)(x_3, x_4), the valley dips between floor 00 and ceiling 11 (0≤g(x)<10 \le g(x) < 1), so it drops all the way onto floor 00 ([g(x)]=0[g(x)] = 0), contributing zero height.

For a strictly increasing curve like y=[x2]y = [x^2] on [0,2][0, 2] below, x2x^2 rises monotonically from 00 to 44, crossing the horizontal lines y=1,2,3,4y = 1, 2, 3, 4 once each at x=1, 2, 3, 2x = 1, \, \sqrt{2}, \, \sqrt{3}, \, 2. So the area under y=[x2]y = [x^2] on [0,2][0, 2] is immediately the sum of four rectangles:

Step rectangles of y = [x^2] over [0, 2]

A=0(1−0)+1(2−1)+2(3−2)+3(2−3)=5−2−3 sq. units.A = 0(1 - 0) + 1(\sqrt{2} - 1) + 2(\sqrt{3} - \sqrt{2}) + 3(2 - \sqrt{3}) = 5 - \sqrt{2} - \sqrt{3}\text{ sq. units.}

3. Fractional Part Function (FPF), {x}§

By definition, the Fractional Part Function is the leftover decimal part after removing the integer part:

{x}=x−[x]\{x\} = x - [x]

Look carefully at what {x}\{x\} looks like on each unit interval [n,n+1)[n, n + 1) (where n∈Zn \in \mathbb{Z}):

  • Since [x]=n[x] = n on [n,n+1)[n, n + 1), we have {x}=x−n\{x\} = x - n—a straight line segment of slope 11, starting at (n,0)(n, 0) and climbing to an open circle at (n+1,1)(n + 1, 1)!
  • On negative intervals too, it keeps the exact same pattern: for x∈[−1,0)x \in [-1, 0), [x]=−1[x] = -1, so {x}=x−(−1)=x+1\{x\} = x - (-1) = x + 1, which climbs from (−1,0)(-1, 0) up to (0,1)(0, 1)!
  • Because {x+1}={x}\{x + 1\} = \{x\}, the fractional part function is periodic with period 11, and satisfies 0≤{x}<10 \le \{x\} < 1 everywhere.

Graph of the fractional part function y = {x} on [-1, 3] showing unit right triangles

Notice the huge geometric shortcut: over any single unit interval [n,n+1][n, n + 1], the area under y={x}y = \{x\} is just a right triangle of base 11 and height 11, with area 12\frac{1}{2}!

How to Handle {f(x)}: Convert It to GIF§

What if a function like x2x^2, 2x2x, or 2sin⁡x2\sin x sits inside the fractional part braces—for example, y={x2}y = \{x^2\} or y={2sin⁡x}y = \{2\sin x\}?

Instead of trying to guess the shape of {f(x)}\{f(x)\} directly, just convert it to GIF! Since 0≤{f(x)}<10 \le \{f(x)\} < 1 everywhere, {f(x)}\{f(x)\} never goes below the xx-axis, so writing {f(x)}=f(x)−[f(x)]\{f(x)\} = f(x) - [f(x)] immediately gives the area on [a,b][a, b] as:

A=∫ab{f(x)} dx=∫abf(x) dx−∫ab[f(x)] dxA = \int_a^b \{f(x)\}\,dx = \int_a^b f(x)\,dx - \int_a^b [f(x)]\,dx

Notice why this solves almost every FPF area problem cleanly:

  1. No sign-flipping is needed for {f(x)}\{f(x)\} itself, because 0≤{f(x)}<10 \le \{f(x)\} < 1 stays non-negative everywhere.
  2. One smooth integral plus one floor problem: ∫abf(x) dx\int_a^b f(x)\,dx is an ordinary integral over [a,b][a, b] with no breakpoints at all, while ∫ab[f(x)] dx\int_a^b [f(x)]\,dx is handled by the horizontal floor-and-ceiling method from Section 2.
  3. (Geometric picture) Subtracting [f(x)][f(x)] simply lowers every piece of y=f(x)y = f(x) sitting between floor kk and ceiling k+1k + 1 down by kk units, stacking all the leftover pieces neatly inside the horizontal strip 0≤y<10 \le y < 1.

For example, we already found in Section 2 that ∫02[x2] dx=5−2−3\int_0^2 [x^2]\,dx = 5 - \sqrt{2} - \sqrt{3}. So the area under y={x2}y = \{x^2\} on [0,2][0, 2] takes one line—without ever sketching {x2}\{x^2\}:

A=∫02{x2} dx=∫02x2 dx−∫02[x2] dx=83−(5−2−3)=2+3−73 sq. units.A = \int_0^2 \{x^2\}\,dx = \int_0^2 x^2\,dx - \int_0^2 [x^2]\,dx = \frac{8}{3} - \big(5 - \sqrt{2} - \sqrt{3}\big) = \sqrt{2} + \sqrt{3} - \frac{7}{3}\text{ sq. units.}

4. Modulus Expressions§

By definition, for any function f(x)f(x):

∣f(x)∣={f(x),when f(x)≥0−f(x),when f(x)<0|f(x)| = \begin{cases} f(x), & \text{when } f(x) \ge 0 \\ -f(x), & \text{when } f(x) < 0 \end{cases}

Rather than solving messy inequalities by hand, draw y=f(x)y = f(x) first and label the two kinds of branches right on the picture:

  1. Mark the xx-intercepts where f(x)=0f(x) = 0.
  2. Keep every portion on or above the xx-axis (f(x)≥0f(x) \ge 0) untouched—that branch has equation y=f(x)y = f(x).
  3. Reflect every portion below the xx-axis (f(x)<0f(x) < 0) straight upward across the xx-axis—that flipped branch has equation y=−f(x)y = -f(x).

Graph of y = |x^2 - 1| showing kept f(x) branches and reflected -f(x) branch

Quick Example: Find the area bounded by y=∣x2−1∣y = |x^2 - 1|, the xx-axis, and the lines x=−2x = -2 and x=2x = 2.

Look at y=f(x)=x2−1y = f(x) = x^2 - 1 plotted above: it crosses the xx-axis at x=−1x = -1 and x=1x = 1, dipping below the axis between −1-1 and 11. Reading the labeled branches directly from the graph (and using yy-axis symmetry on [0,2][0, 2]):

  • On [0,1][0, 1], the arch is the reflected portion: y=−f(x)=1−x2y = -f(x) = 1 - x^2.
  • On [1,2][1, 2], the outer arm lies above the axis: y=f(x)=x2−1y = f(x) = x^2 - 1.

So the total area is immediately:

A=2[∫01(1−x2) dx+∫12(x2−1) dx]=2[(x−x33)01+(x33−x)12]=2[23+(23−(−23))]=2(23+43)=4 sq. units.A = 2\left[\int_0^1 (1 - x^2)\,dx + \int_1^2 (x^2 - 1)\,dx\right] = 2\left[\left(x - \frac{x^3}{3}\right)_0^1 + \left(\frac{x^3}{3} - x\right)_1^2\right] = 2\left[\frac{2}{3} + \left(\frac{2}{3} - \left(-\frac{2}{3}\right)\right)\right] = 2\left(\frac{2}{3} + \frac{4}{3}\right) = 4\text{ sq. units.}

5. Maximum and Minimum Functions: max(f, g) and min(f, g)§

Given two continuous functions f(x)f(x) and g(x)g(x):

  • max⁡(f(x),g(x))\max\big(f(x), g(x)\big) picks whichever curve is higher at each xx (the upper envelope).
  • min⁡(f(x),g(x))\min\big(f(x), g(x)\big) picks whichever curve is lower at each xx (the lower envelope).

How to Sketch and Integrate max and min§

Trying to figure out max⁡(f,g)\max(f, g) or min⁡(f,g)\min(f, g) by solving inequalities like f(x)≥g(x)f(x) \ge g(x) algebraically is slow and unnecessary—especially with trig or multiple intersecting curves. By sketching the graphs first, you can read the exact answer with your eyes:

  1. Draw both graphs y=f(x)y = f(x) and y=g(x)y = g(x) on the same axes.

  2. Solve f(x)=g(x)f(x) = g(x) to find and mark every intersection point where the curves switch places.

  3. Read the top and bottom curves straight off the picture: between any two consecutive intersections, simply look at the sketch to see which curve sits higher and which sits lower—no inequality solving needed:

    • Trace the upper curve everywhere for max⁡(f,g)\max(f, g).
    • Trace the lower curve everywhere for min⁡(f,g)\min(f, g).

Comparing y = max(sin x, cos x) and y = min(sin x, cos x) on [0, pi/2]

(Handy identity: Notice that max⁡(f,g)−min⁡(f,g)=∣f(x)−g(x)∣\max(f, g) - \min(f, g) = |f(x) - g(x)|, while max⁡(f,g)+min⁡(f,g)=f(x)+g(x)\max(f, g) + \min(f, g) = f(x) + g(x)! So if you need the area between max⁡(f,g)\max(f, g) and min⁡(f,g)\min(f, g) on [a,b][a, b], it is simply ∫ab∣f(x)−g(x)∣ dx\int_a^b |f(x) - g(x)|\,dx!)


Worked Examples§

Example 1: General Piecewise Function With Both Axes and Corners

Find the area bounded by the curve y=f(x)y = f(x), the xx-axis, and the lines x=−1x = -1 and x=2x = 2, where:

f(x)={1−x,−1≤x≤0x2+1,0<x≤2f(x) = \begin{cases} 1 - x, & -1 \le x \le 0 \\ x^2 + 1, & 0 < x \le 2 \end{cases}

Solution: Check the sign of f(x)f(x) on both pieces:

  • On [−1,0][-1, 0], 1−x≥1>01 - x \ge 1 > 0.
  • On (0,2](0, 2], x2+1≥1>0x^2 + 1 \ge 1 > 0.

Since f(x)>0f(x) > 0 everywhere on [−1,2][-1, 2], we simply split the integral at the formula-switching point x=0x = 0 as shown below:

Piecewise curve y = f(x) and shaded regions A1 and A2

A=A1+A2=∫−10(1−x) dx+∫02(x2+1) dx=[x−x22]−10+[x33+x]02=(0−(−1−12))+(83+2)=32+143=376 sq. units.A = A_1 + A_2 = \int_{-1}^{0} (1 - x)\,dx + \int_0^2 (x^2 + 1)\,dx = \left[x - \frac{x^2}{2}\right]_{-1}^{0} + \left[\frac{x^3}{3} + x\right]_0^2 = \left(0 - \left(-1 - \frac{1}{2}\right)\right) + \left(\frac{8}{3} + 2\right) = \frac{3}{2} + \frac{14}{3} = \frac{37}{6}\text{ sq. units.}

Example 2: Piecewise Curve Using GIF — Area Under y = [sqrt(x)]

Find the area bounded by y=[x]y = [\sqrt{x}], the xx-axis, and the lines x=0x = 0 and x=9x = 9.

Solution: As xx goes from 00 to 99, x\sqrt{x} climbs from 00 to 33. It hits integers at:

  • x=0  ⟹  x=0\sqrt{x} = 0 \implies x = 0
  • x=1  ⟹  x=1\sqrt{x} = 1 \implies x = 1
  • x=2  ⟹  x=4\sqrt{x} = 2 \implies x = 4
  • x=3  ⟹  x=9\sqrt{x} = 3 \implies x = 9

On each interval between these breakpoints, [x][\sqrt{x}] is constant:

  • x∈[0,1)  ⟹  [x]=0x \in [0, 1) \implies [\sqrt{x}] = 0 (width 11, height 00).
  • x∈[1,4)  ⟹  [x]=1x \in [1, 4) \implies [\sqrt{x}] = 1 (width 33, height 11).
  • x∈[4,9)  ⟹  [x]=2x \in [4, 9) \implies [\sqrt{x}] = 2 (width 55, height 22).

Step rectangles for y = [sqrt(x)] over [0, 9]

Adding the three rectangular step areas gives:

A=0(1)+1(4−1)+2(9−4)=0+3+10=13 sq. units.A = 0(1) + 1(4 - 1) + 2(9 - 4) = 0 + 3 + 10 = 13\text{ sq. units.}

Example 3: Non-Monotonic Curve Inside GIF — Area Under y = [2 sin x]

Find the area bounded by y=[2sin⁡x]y = [2\sin x], the xx-axis, and the lines x=0x = 0 and x=πx = \pi.

Solution: Notice what happens if you only look at the endpoints: 2sin⁡(0)=02\sin(0) = 0 and 2sin⁡(π)=02\sin(\pi) = 0, even though the curve rises well above 00 in between! Because g(x)=2sin⁡xg(x) = 2\sin x has a turn (a maximum) inside [0,π][0, \pi], we sketch y=2sin⁡xy = 2\sin x first and draw horizontal integer lines at y=0,1,2y = 0, 1, 2:

  • y=0y = 0 meets the curve at x=0x = 0 and x=πx = \pi.
  • y=1y = 1 cuts 2sin⁡x=1  ⟹  sin⁡x=122\sin x = 1 \implies \sin x = \frac{1}{2} at two points: x=π6x = \frac{\pi}{6} and x=5π6x = \frac{5\pi}{6}.
  • y=2y = 2 just touches the peak at the single point x=π2x = \frac{\pi}{2}.

Dropping vertical lines from these intersections and dropping each piece onto its floor splits [0,π][0, \pi] as follows:

  • x∈[0,π6)x \in \big[0, \frac{\pi}{6}\big): lies between floor 00 and ceiling 11 (0≤2sin⁡x<10 \le 2\sin x < 1), so it falls to floor 0  ⟹  [2sin⁡x]=00 \implies [2\sin x] = 0 (height 00).
  • x∈[π6,5π6]x \in \big[\frac{\pi}{6}, \frac{5\pi}{6}\big] with x≠π2x \neq \frac{\pi}{2}: lies between floor 11 and ceiling 22 (1≤2sin⁡x<21 \le 2\sin x < 2), so it falls to floor 1  ⟹  [2sin⁡x]=11 \implies [2\sin x] = 1 (height 11).
  • x=π2x = \frac{\pi}{2}: just touches floor 22, so [2sin⁡x]=2[2\sin x] = 2, which is a single point of zero width and contributes 00 to the area.
  • x∈(5π6,π]x \in \big(\frac{5\pi}{6}, \pi\big]: lies between floor 00 and ceiling 11 (0≤2sin⁡x<10 \le 2\sin x < 1), so it falls to floor 0  ⟹  [2sin⁡x]=00 \implies [2\sin x] = 0 (height 00).

Graphical floor-and-ceiling steps for y = [2 sin x] on [0, pi]

So the entire non-zero region is a single rectangle of height 11 over [π6,5π6]\big[\frac{\pi}{6}, \frac{5\pi}{6}\big]:

A=1×(5π6−π6)=2π3 sq. units.A = 1 \times \left(\frac{5\pi}{6} - \frac{\pi}{6}\right) = \frac{2\pi}{3}\text{ sq. units.}

Example 4: Area Under a Fractional Part Transformation y = {2x}

Find the area bounded by y={2x}y = \{2x\}, the xx-axis, and the lines x=0x = 0 and x=3x = 3.

Solution: First look at the period of {2x}\{2x\}. Replacing xx by x+12x + \frac{1}{2} turns {2(x+12)}={2x+1}={2x}\{2(x + \tfrac{1}{2})\} = \{2x + 1\} = \{2x\}. So {2x}\{2x\} repeats every 12\frac{1}{2} unit!

Over each half-unit interval [0,12),[12,1),…,[52,3)\big[0, \frac{1}{2}\big), \big[\frac{1}{2}, 1\big), \dots, \big[\frac{5}{2}, 3\big), the graph is a straight triangle starting at height 00 and rising up to height 11, with base 12\frac{1}{2} and height 11. Across [0,3][0, 3] there are 3÷12=63 \div \frac{1}{2} = 6 identical triangles:

Graph of y = {2x} on [0, 3] showing six half-unit triangles

A=6×(12×12×1)=64=32 sq. units.A = 6 \times \left(\frac{1}{2} \times \frac{1}{2} \times 1\right) = \frac{6}{4} = \frac{3}{2}\text{ sq. units.}

(Or directly by scaling: since {u}\{u\} has area 32\frac{3}{2} on [0,3][0, 3]—or 33 on [0,6][0, 6]—horizontally compressing {x}\{x\} by 22 gives ∫03{2x} dx=12∫06{u} du=12(6×12)=32\int_0^3 \{2x\}\,dx = \frac{1}{2}\int_0^6 \{u\}\,du = \frac{1}{2}(6 \times \frac{1}{2}) = \frac{3}{2}!)


Example 5: Region Bounded by an Inequality With GIF — [x] + [y]

Find the area of the region R={(x,y):1≤[x]+[y]≤2,  0≤x≤2,  0≤y≤2}R = \big\{(x, y) : 1 \le [x] + [y] \le 2, \; 0 \le x \le 2, \; 0 \le y \le 2\big\}.

Solution: Because 0≤x≤20 \le x \le 2 and 0≤y≤20 \le y \le 2, the integers [x][x] and [y][y] divide the [0,2]×[0,2][0, 2] \times [0, 2] square into unit 1×11 \times 1 squares: [x]∈{0,1,2}[x] \in \{0, 1, 2\} and [y]∈{0,1,2}[y] \in \{0, 1, 2\} (note x=2x = 2 and y=2y = 2 are just boundary lines of zero area).

Check which interior 1×11 \times 1 squares satisfy 1≤[x]+[y]≤21 \le [x] + [y] \le 2:

  • [x]=0, [y]=0[x] = 0, \, [y] = 0 (the square [0,1)×[0,1)[0, 1) \times [0, 1)): [x]+[y]=0[x] + [y] = 0 (excluded).
  • [x]=1, [y]=0[x] = 1, \, [y] = 0 (the square [1,2)×[0,1)[1, 2) \times [0, 1)): [x]+[y]=1[x] + [y] = 1 (included).
  • [x]=0, [y]=1[x] = 0, \, [y] = 1 (the square [0,1)×[1,2)[0, 1) \times [1, 2)): [x]+[y]=1[x] + [y] = 1 (included).
  • [x]=1, [y]=1[x] = 1, \, [y] = 1 (the square [1,2)×[1,2)[1, 2) \times [1, 2)): [x]+[y]=2[x] + [y] = 2 (included).

Unit squares satisfying 1 <= [x] + [y] <= 2 inside [0, 2] x [0, 2]

Exactly 3 unit squares satisfy the condition, so:

A=3×(1×1)=3 sq. units.A = 3 \times (1 \times 1) = 3\text{ sq. units.}

Example 6: Multi-Modulus Bucket Function

Find the area bounded by the curve y=∣x−1∣+∣x−2∣+∣x−3∣y = |x - 1| + |x - 2| + |x - 3| and the line y=4y = 4.

Solution: The critical points where the modulus terms vanish are x=1,2,3x = 1, 2, 3. Write the piecewise formula interval by interval:

  • For x<1x < 1: −(x−1)−(x−2)−(x−3)=6−3x-(x - 1) - (x - 2) - (x - 3) = 6 - 3x.
  • For 1≤x<21 \le x < 2: (x−1)−(x−2)−(x−3)=4−x(x - 1) - (x - 2) - (x - 3) = 4 - x.
  • For 2≤x<32 \le x < 3: (x−1)+(x−2)−(x−3)=x(x - 1) + (x - 2) - (x - 3) = x.
  • For x≥3x \ge 3: (x−1)+(x−2)+(x−3)=3x−6(x - 1) + (x - 2) + (x - 3) = 3x - 6.

Check the corner values: (1,3)(1, 3), (2,2)(2, 2), (3,3)(3, 3), all lying below y=4y = 4. Now find where the outer wings meet y=4y = 4:

  • Left wing (x<1x < 1): 6−3x=4  ⟹  x=236 - 3x = 4 \implies x = \frac{2}{3}.
  • Right wing (x≥3x \ge 3): 3x−6=4  ⟹  x=1033x - 6 = 4 \implies x = \frac{10}{3}.

Area between multi-modulus curve y = |x-1|+|x-2|+|x-3| and y = 4

Using symmetry about the vertical line x=2x = 2 (integrate from x=2x = 2 to 103\frac{10}{3} and double it!):

A=2[∫23(4−x) dx+∫310/3(4−(3x−6)) dx]=2[∫23(4−x) dx+∫310/3(10−3x) dx]A = 2 \left[ \int_2^3 (4 - x)\,dx + \int_3^{10/3} \big(4 - (3x - 6)\big)\,dx \right] = 2 \left[ \int_2^3 (4 - x)\,dx + \int_3^{10/3} (10 - 3x)\,dx \right]

Notice both pieces are clean right/trapezoid geometry:

∫23(4−x) dx=2+12(1)=32,∫310/3(10−3x) dx=1+02(13)=16\int_2^3 (4 - x)\,dx = \frac{2 + 1}{2}(1) = \frac{3}{2}, \qquad \int_3^{10/3} (10 - 3x)\,dx = \frac{1 + 0}{2}\left(\frac{1}{3}\right) = \frac{1}{6}

Thus:

A=2(32+16)=3+13=103 sq. units.A = 2\left(\frac{3}{2} + \frac{1}{6}\right) = 3 + \frac{1}{3} = \frac{10}{3}\text{ sq. units.}

Example 7: Mixed Modulus, GIF, and FPF — y = |[x]| + {x}

Find the area bounded by the curve y=∣[x]∣+{x}y = |[x]| + \{x\}, the horizontal line y=2y = 2, and the vertical lines x=−1x = -1 and x=2x = 2.

Solution: Split [−1,2)[-1, 2) at every integer breakpoint (−1,0,1,2-1, 0, 1, 2) and evaluate [x][x], ∣[x]∣|[x]|, and {x}=x−[x]\{x\} = x - [x] carefully on each piece—especially on the negative interval [−1,0)[-1, 0)!

  • On [−1,0)[-1, 0): [x]=−1  ⟹  ∣[x]∣=1[x] = -1 \implies |[x]| = 1, and {x}=x−(−1)=x+1\{x\} = x - (-1) = x + 1. Therefore, y=1+(x+1)=x+2y = 1 + (x + 1) = x + 2 (rising from 11 at x=−1x = -1 up to 22 at x=0x = 0).
  • On [0,1)[0, 1): [x]=0  ⟹  ∣[x]∣=0[x] = 0 \implies |[x]| = 0, and {x}=x\{x\} = x. Therefore, y=xy = x (rising from 00 to 11).
  • On [1,2)[1, 2): [x]=1  ⟹  ∣[x]∣=1[x] = 1 \implies |[x]| = 1, and {x}=x−1\{x\} = x - 1. Therefore, y=1+(x−1)=xy = 1 + (x - 1) = x (continuing smoothly from 11 up to 22!).

Area between mixed curve y = |[x]| + {x} and y = 2 on [-1, 2]

Look at the figure: the entire curve stays at or below y=2y = 2, forming two simple triangles below y=2y = 2!

  • Left triangle A1A_1 on [−1,0][-1, 0]: base 11, height 2−1=1  ⟹  A1=12(1)(1)=122 - 1 = 1 \implies A_1 = \frac{1}{2}(1)(1) = \frac{1}{2}.
  • Right triangle A2A_2 on [0,2][0, 2]: base 22, height 2−0=2  ⟹  A2=12(2)(2)=22 - 0 = 2 \implies A_2 = \frac{1}{2}(2)(2) = 2.

Total area:

A=12+2=52 sq. units.A = \frac{1}{2} + 2 = \frac{5}{2}\text{ sq. units.}

Example 8: Mixed GIF and Modulus — y = [x] + |x - 1|

Find the area bounded by y=[x]+∣x−1∣y = [x] + |x - 1|, the xx-axis, and the lines x=0x = 0 and x=2x = 2.

Solution: The integer breakpoints are 0,1,20, 1, 2 (and x=1x = 1 is also where ∣x−1∣|x - 1| switches sign!).

  • On [0,1)[0, 1): [x]=0[x] = 0 and ∣x−1∣=1−x|x - 1| = 1 - x, so y=1−x≥0y = 1 - x \ge 0.
  • On [1,2)[1, 2): [x]=1[x] = 1 and ∣x−1∣=x−1|x - 1| = x - 1, so y=1+(x−1)=x≥0y = 1 + (x - 1) = x \ge 0.

Splitting at x=1x = 1:

A=∫01(1−x) dx+∫12x dx=12+[x22]12=12+32=2 sq. units.A = \int_0^1 (1 - x)\,dx + \int_1^2 x\,dx = \frac{1}{2} + \left[\frac{x^2}{2}\right]_1^2 = \frac{1}{2} + \frac{3}{2} = 2\text{ sq. units.}

Example 9: Mixed Modulus and GIF in Two Variables — |x| - [x]

Find the area bounded by the curve y=∣x∣−[x]y = |x| - [x], the xx-axis, and the lines x=−2x = -2 and x=2x = 2.

Solution: Notice how ∣x∣|x| switches at 00 while [x][x] jumps at −2,−1,0,1,2-2, -1, 0, 1, 2:

  • On [−2,−1)[-2, -1): ∣x∣=−x|x| = -x and [x]=−2  ⟹  y=−x−(−2)=2−x[x] = -2 \implies y = -x - (-2) = 2 - x (a trapezoid from height 44 down to 33, width 11, area =4+32=72= \frac{4 + 3}{2} = \frac{7}{2}).
  • On [−1,0)[-1, 0): ∣x∣=−x|x| = -x and [x]=−1  ⟹  y=−x−(−1)=1−x[x] = -1 \implies y = -x - (-1) = 1 - x (a trapezoid from height 22 down to 11, width 11, area =2+12=32= \frac{2 + 1}{2} = \frac{3}{2}).
  • On [0,2)[0, 2): ∣x∣=x|x| = x, so y=x−[x]={x}y = x - [x] = \{x\}! Across [0,1)[0, 1) and [1,2)[1, 2), this gives two unit triangles of area 12\frac{1}{2} each (area=1\text{area} = 1).

Adding all three parts:

A=72+32+1=5+1=6 sq. units.A = \frac{7}{2} + \frac{3}{2} + 1 = 5 + 1 = 6\text{ sq. units.}

Example 10: Inequality With Both GIF and FPF

Find the area of the region R={(x,y):{x}≤y≤[x]+1,  0≤x≤2}R = \big\{(x, y) : \{x\} \le y \le [x] + 1, \; 0 \le x \le 2\big\}.

Solution: Split [0,2][0, 2] at x=1x = 1:

On [0,1)[0, 1): {x}=x\{x\} = x and [x]+1=1[x] + 1 = 1. Since x≤1x \le 1, every strip runs from y=xy = x to y=1y = 1:

A1=∫01(1−x) dx=12A_1 = \int_0^1 (1 - x)\,dx = \frac{1}{2}

On [1,2)[1, 2): {x}=x−1\{x\} = x - 1 and [x]+1=2[x] + 1 = 2. Since x−1<2x - 1 < 2, every strip runs from y=x−1y = x - 1 to y=2y = 2:

A2=∫12(2−(x−1)) dx=∫12(3−x) dx=[3x−x22]12=4−52=32A_2 = \int_1^2 \big(2 - (x - 1)\big)\,dx = \int_1^2 (3 - x)\,dx = \left[3x - \frac{x^2}{2}\right]_1^2 = 4 - \frac{5}{2} = \frac{3}{2}

Total area =12+32=2 sq. units.= \frac{1}{2} + \frac{3}{2} = 2\text{ sq. units.}


Example 11: Minimum of Absolute Value and Downward Parabola

Find the area bounded by the curve y=min⁡(∣x∣, 2−x2)y = \min\big(|x|, \, 2 - x^2\big) and the xx-axis.

Solution: First check symmetry: replacing xx by −x-x keeps both ∣x∣|x| and 2−x22 - x^2 unchanged, so the graph is even (yy-axis symmetric). Let us analyze x≥0x \ge 0, where ∣x∣=x|x| = x.

Find where y=xy = x intersects y=2−x2y = 2 - x^2:

x=2−x2  ⟹  x2+x−2=0  ⟹  (x+2)(x−1)=0  ⟹  x=1(x≥0)x = 2 - x^2 \implies x^2 + x - 2 = 0 \implies (x + 2)(x - 1) = 0 \implies x = 1 \quad (x \ge 0)

Also y=2−x2y = 2 - x^2 hits the xx-axis at x=2x = \sqrt{2} (and stays negative for x>2x > \sqrt{2}, so the bounded region above y=0y = 0 stops at x=2x = \sqrt{2}). Looking directly at the graph on [0,2][0, \sqrt{2}]:

  • From x=0x = 0 to 11, the straight line y=xy = x lies below the parabola y=2−x2y = 2 - x^2, so min⁡(∣x∣,2−x2)=x\min(|x|, 2 - x^2) = x.
  • From x=1x = 1 to 2\sqrt{2}, the parabola plunges below the line down to the xx-axis, so min⁡(∣x∣,2−x2)=2−x2\min(|x|, 2 - x^2) = 2 - x^2.

Bounded dome under y = min(|x|, 2 - x^2) and the x-axis

By symmetry, double the [0,2][0, \sqrt{2}] area:

A=2[∫01x dx+∫12(2−x2) dx]=2[12+(2x−x33)12]A = 2 \left[ \int_0^1 x\,dx + \int_1^{\sqrt{2}} (2 - x^2)\,dx \right] = 2 \left[ \frac{1}{2} + \left(2x - \frac{x^3}{3}\right)_1^{\sqrt{2}} \right]

Computing the second bracket:

(22−223)−(2−13)=423−53\left(2\sqrt{2} - \frac{2\sqrt{2}}{3}\right) - \left(2 - \frac{1}{3}\right) = \frac{4\sqrt{2}}{3} - \frac{5}{3}

Therefore:

A=2(12+423−53)=2(423−76)=82−73 sq. units.A = 2\left(\frac{1}{2} + \frac{4\sqrt{2}}{3} - \frac{5}{3}\right) = 2\left(\frac{4\sqrt{2}}{3} - \frac{7}{6}\right) = \frac{8\sqrt{2} - 7}{3}\text{ sq. units.}

Example 12: Area Between max(sin x, cos x) and min(sin x, cos x)

Find the area bounded by y=max⁡(sin⁡x,cos⁡x)y = \max(\sin x, \cos x) and y=min⁡(sin⁡x,cos⁡x)y = \min(\sin x, \cos x) between x=0x = 0 and x=πx = \pi.

Solution: Instead of trying to compare sin⁡x\sin x and cos⁡x\cos x with inequalities, simply draw both y=sin⁡xy = \sin x and y=cos⁡xy = \cos x on [0,π][0, \pi] and find their intersection point:

sin⁡x=cos⁡x  ⟹  tan⁡x=1  ⟹  x=π4in [0,π]\sin x = \cos x \implies \tan x = 1 \implies x = \frac{\pi}{4} \quad \text{in } [0, \pi]

Graphs of max(sin x, cos x) and min(sin x, cos x) on [0, pi]

Now just look at the graph—your eyes instantly tell you which curve is max⁡\max (on top) and which is min⁡\min (on bottom), without solving a single inequality:

  • From 00 to π4\frac{\pi}{4}: cos⁡x\cos x rides on top (max⁡\max) while sin⁡x\sin x stays on the bottom (min⁡\min), so the vertical height between them is cos⁡x−sin⁡x\cos x - \sin x.
  • From π4\frac{\pi}{4} to π\pi: after crossing at (π4,12)\big(\frac{\pi}{4}, \frac{1}{\sqrt{2}}\big), sin⁡x\sin x stays on top (max⁡\max) while cos⁡x\cos x drops to the bottom (min⁡\min), so the vertical height between them is sin⁡x−cos⁡x\sin x - \cos x.

Splitting at the intersection x=π4x = \frac{\pi}{4}:

A=∫0π/4(upper−lower) dx+∫π/4π(upper−lower) dx=∫0π/4(cos⁡x−sin⁡x) dx+∫π/4π(sin⁡x−cos⁡x) dxA = \int_0^{\pi/4} (\text{upper} - \text{lower})\,dx + \int_{\pi/4}^{\pi} (\text{upper} - \text{lower})\,dx = \int_0^{\pi/4} (\cos x - \sin x)\,dx + \int_{\pi/4}^{\pi} (\sin x - \cos x)\,dx

Evaluate each integral:

[sin⁡x+cos⁡x]0π/4+[−cos⁡x−sin⁡x]π/4π=(22−1)+(1−(−22))=(2−1)+(1+2)=22 sq. units.\Big[\sin x + \cos x\Big]_0^{\pi/4} + \Big[-\cos x - \sin x\Big]_{\pi/4}^{\pi} = \left(\frac{2}{\sqrt{2}} - 1\right) + \left(1 - \left(-\frac{2}{\sqrt{2}}\right)\right) = (\sqrt{2} - 1) + (1 + \sqrt{2}) = 2\sqrt{2}\text{ sq. units.}

Example 13: Bounded Region Using max(x^2, 1 - x^2) and a Horizontal Line

Find the area bounded by the curve y=max⁡(x2,1−x2)y = \max(x^2, 1 - x^2) and the line y=2y = 2.

Solution: Sketch both standard parabolas on the same axes—y=x2y = x^2 opening upward from (0,0)(0, 0) and y=1−x2y = 1 - x^2 opening downward from (0,1)(0, 1)—together with the horizontal line y=2y = 2. Both curves are symmetric about the yy-axis.

Find the intersection points:

  • Where the two parabolas cross each other:
x2=1−x2  ⟹  2x2=1  ⟹  x=±12(at y=12)x^2 = 1 - x^2 \implies 2x^2 = 1 \implies x = \pm\frac{1}{\sqrt{2}} \quad \text{(at } y = \frac{1}{2}\text{)}
  • Where the outer rising branches meet y=2y = 2:
x2=2  ⟹  x=±2x^2 = 2 \implies x = \pm\sqrt{2}

Graph of y = max(x^2, 1 - x^2) and y = 2 showing all intersection points

Look at how clear the picture makes it—no inequality checking is needed at all! Just trace the higher (upper) curve of the two parabolas on the right half x≥0x \ge 0:

  • From x=0x = 0 to 12\frac{1}{\sqrt{2}}, the downward arch y=1−x2y = 1 - x^2 visibly sits above y=x2y = x^2, forming the middle hump of max⁡(x2,1−x2)\max(x^2, 1 - x^2).
  • From x=12x = \frac{1}{\sqrt{2}} to 2\sqrt{2}, the upward parabola y=x2y = x^2 rises above y=1−x2y = 1 - x^2, forming the outer wall up to y=2y = 2.

Using yy-axis symmetry, the enclosed area below y=2y = 2 and above max⁡(x2,1−x2)\max(x^2, 1 - x^2) is:

A=2[∫01/2(2−(1−x2)) dx+∫1/22(2−x2) dx]=2[∫01/2(1+x2) dx+∫1/22(2−x2) dx]A = 2 \left[ \int_0^{1/\sqrt{2}} \big(2 - (1 - x^2)\big)\,dx + \int_{1/\sqrt{2}}^{\sqrt{2}} (2 - x^2)\,dx \right] = 2 \left[ \int_0^{1/\sqrt{2}} (1 + x^2)\,dx + \int_{1/\sqrt{2}}^{\sqrt{2}} (2 - x^2)\,dx \right]

Evaluate each piece cleanly:

∫01/2(1+x2) dx=[x+x33]01/2=12+162=762\int_0^{1/\sqrt{2}} (1 + x^2)\,dx = \left[x + \frac{x^3}{3}\right]_0^{1/\sqrt{2}} = \frac{1}{\sqrt{2}} + \frac{1}{6\sqrt{2}} = \frac{7}{6\sqrt{2}} ∫1/22(2−x2) dx=[2x−x33]1/22=(22−223)−(22−162)=423−1162=16−1162=562\int_{1/\sqrt{2}}^{\sqrt{2}} (2 - x^2)\,dx = \left[2x - \frac{x^3}{3}\right]_{1/\sqrt{2}}^{\sqrt{2}} = \left(2\sqrt{2} - \frac{2\sqrt{2}}{3}\right) - \left(\frac{2}{\sqrt{2}} - \frac{1}{6\sqrt{2}}\right) = \frac{4\sqrt{2}}{3} - \frac{11}{6\sqrt{2}} = \frac{16 - 11}{6\sqrt{2}} = \frac{5}{6\sqrt{2}}

Adding the two integrals and multiplying by 22:

A=2(762+562)=2(1262)=42=22 sq. units.A = 2\left(\frac{7}{6\sqrt{2}} + \frac{5}{6\sqrt{2}}\right) = 2\left(\frac{12}{6\sqrt{2}}\right) = \frac{4}{\sqrt{2}} = 2\sqrt{2}\text{ sq. units.}
Section 6 of 7 · Area Under Curves

Mark this section complete when you have worked through its proofs.