Part 10: Integrals of Piecewise & Special Functions

A definitive guide to tackling discontinuity, floor functions, max/min functions, and Riemann-Stieltjes concepts.

Theoretical Foundations: The Philosophy of Decomposition

The integration of piecewise functions is a test of analytical rigor and strategic thinking. The core challenge lies not in the integration itself, but in the deconstruction of complex, implicitly defined functions into a sequence of simpler forms. This module emphasizes the primacy of graphical intuition as a problem-solving and validation tool.

The Cornerstone Property: Additivity of Intervals

The entire analytical framework rests on a single, powerful property of definite integrals.

Additivity of the Integral

If a function ff is integrable on a closed interval containing the points a,b,a, b, and cc, then:

∫abf(x) dx=∫acf(x) dx+∫cbf(x) dx\int_a^b f(x) \, dx = \int_a^c f(x) \, dx + \int_c^b f(x) \, dx

For a piecewise function, the points of subdivision cc are chosen to be the β€œbreak points” where the function’s definition changes. This decomposes a complex integral into a sum of simpler integrals.

The Cast of Characters: Implicitly Piecewise Functions

Competitive examinations favor functions whose piecewise nature is implicit. The challenge is to first discover the definition.

  • Absolute Value ∣f(x)∣|f(x)|: Breaks occur at the roots of f(x)=0f(x)=0.
  • Floor Function ⌊f(x)βŒ‹\lfloor f(x) \rfloor: Creates jump discontinuities at each xx-value where f(x)f(x) attains an integer value.
  • Fractional Part Function {f(x)}=f(x)βˆ’βŒŠf(x)βŒ‹\{f(x)\} = f(x) - \lfloor f(x) \rfloor: Also has jump discontinuities where f(x)f(x) is an integer.
  • Max/Min Functions max⁑(f,g),min⁑(f,g)\max(f,g), \min(f,g): The definition switches at points of intersection where f(x)=g(x)f(x)=g(x). They have the powerful analytical representations: max⁑(f,g)=f+g+∣fβˆ’g∣2andmin⁑(f,g)=f+gβˆ’βˆ£fβˆ’g∣2\max(f,g) = \frac{f+g+|f-g|}{2} \quad \text{and} \quad \min(f,g) = \frac{f+g-|f-g|}{2}

The Visual Paradigm: Graphical Analysis

For implicitly defined functions, graphical analysis is the most critical step. A sketch provides a visual map of the problem, confirms the number and approximate location of break points, and serves as a powerful sanity check for the analytical calculations.

Tip

A problem like evaluating ∫010⌊10x/(x+1)βŒ‹β€‰dx\int_0^{10} \lfloor \sqrt{10x/(x+1)} \rfloor \, dx is transformed from a tedious algebraic exercise (n≀…<n+1n \le \sqrt{\dots} < n+1) into an intuitive geometric problem of summing the areas of rectangles whose boundaries are visually identified.


The Strategist’s Arsenal: The Art of Splitting the Domain

The Critical Point Protocol

A universal, systematic protocol for deconstructing any integral of this type.

  1. Identify the β€œSwitches”: For each special function in the integrand, find all points within the interval [a,b][a, b] where its definition changes. This is the crucial analytical step. For ⌊f(x)βŒ‹\lfloor f(x) \rfloor, solve f(x)=kf(x) = k for all relevant integers kk. For max⁑(f,g)\max(f,g), solve f(x)=g(x)f(x) = g(x).
  2. Collect and Order: Gather all unique critical points from all functions within [a,b][a, b] and order them: a<c1<c2<β‹―<ck<ba < c_1 < c_2 < \dots < c_k < b.
  3. Decompose the Integral: Split the original integral into a sum of sub-integrals over [a,c1],[c1,c2],…,[ck,b][a, c_1], [c_1, c_2], \dots, [c_k, b].
  4. Simplify and Solve: Within each sub-interval, every special function now has a simple, explicit algebraic definition. Substitute these definitions and solve the resulting (usually much easier) integrals.

Advanced Tactics

  • Leveraging Periodicity: For integrals of periodic functions like {x}\{x\} over large intervals (e.g., ∫0100f({x}) dx\int_0^{100} f(\{x\}) \, dx), the strategic approach is not to split at every integer. Instead, use the property ∫0nTg(t) dt=n∫0Tg(t) dt\int_0^{nT} g(t) \, dt = n\int_0^T g(t) \, dt for a periodic function g(t)g(t).
  • Symmetry First, Split Later: Before launching into the splitting protocol, always check for global symmetries over intervals like [βˆ’a,a][-a, a]. An integrand may be even or odd as a whole, allowing for immediate simplification to 2∫0a…2\int_0^a \dots or 00, completely bypassing the need for splitting.

Masterclass: Solved Examples

1. The Analytical Max/Min Identity

Problem Medium

Evaluate I=βˆ«βˆ’12max⁑(x,x3) dxI = \int_{-1}^2 \max(x, x^3) \, dx.

Hint 1

A standard approach is to solve x=x3x = x^3 to find the intersection points (βˆ’1,0,1-1, 0, 1), then graphically determine which function is larger on each sub-interval.

Hint 2 (Analytical)

Use the identity max⁑(f,g)=f+g+∣fβˆ’g∣2\max(f,g) = \frac{f+g + |f-g|}{2}.

View Solution

Using the analytical identity:

I=βˆ«βˆ’12x+x3+∣xβˆ’x3∣2 dx=12βˆ«βˆ’12(x+x3) dx+12βˆ«βˆ’12∣xβˆ’x3βˆ£β€‰dxI = \int_{-1}^2 \frac{x + x^3 + |x - x^3|}{2} \, dx = \frac{1}{2} \int_{-1}^2 (x + x^3) \, dx + \frac{1}{2} \int_{-1}^2 |x - x^3| \, dx

1. Evaluate the First Integral:

12[x22+x44]βˆ’12=218\frac{1}{2} \left[ \frac{x^2}{2} + \frac{x^4}{4} \right]_{-1}^2 = \frac{21}{8}

2. Analyze and Split the Absolute Value Integral: The roots of xβˆ’x3=x(1βˆ’x)(1+x)x - x^3 = x(1-x)(1+x) are at βˆ’1,0,1-1, 0, 1.

βˆ«βˆ’12∣xβˆ’x3βˆ£β€‰dx=βˆ«βˆ’10(x3βˆ’x)dx+∫01(xβˆ’x3)dx+∫12(x3βˆ’x)dx\int_{-1}^2 |x - x^3| \, dx = \int_{-1}^0 (x^3-x)dx + \int_0^1 (x-x^3)dx + \int_1^2 (x^3-x)dx

Evaluating these yields 14+14+94=114\frac{1}{4} + \frac{1}{4} + \frac{9}{4} = \frac{11}{4}.

3. Combine Results:

I=218+12(114)=328=4I = \frac{21}{8} + \frac{1}{2}\left(\frac{11}{4}\right) = \frac{32}{8} = 4

2. The JEE Advanced Composite Challenge (JEE 2015)

Problem Hard

Let f(x)=⌊xβŒ‹f(x) = \lfloor x \rfloor for x≀2x \le 2 and f(x)=0f(x) = 0 for x>2x > 2. If I=βˆ«βˆ’12xf(x2)2+f(x+1) dxI = \int_{-1}^{2} \frac{x f(x^2)}{2 + f(x+1)} \, dx, find the value of (4Iβˆ’1)(4I - 1).

View Solution

We must systematically determine the definition of the integrand over sub-intervals of [βˆ’1,2][-1, 2].

1. Identify Critical Points:

  • f(x2)f(x^2) changes when x2x^2 crosses integers or reaches 2: x∈{βˆ’1,0,1,2}x \in \{ -1, 0, 1, \sqrt{2} \}.
  • f(x+1)f(x+1) changes when x+1x+1 crosses integers: x∈{βˆ’1,0,1}x \in \{ -1, 0, 1 \}.
  • Ordered critical points: βˆ’1,0,1,2,2-1, 0, 1, \sqrt{2}, 2.

2. Table-Based Analysis:

Interval⌊x2βŒ‹\lfloor x^2 \rfloor⌊x+1βŒ‹\lfloor x+1 \rfloorIntegrand Definition
[βˆ’1,0)[-1, 0)0000xβ‹…02+0=0\frac{x \cdot 0}{2+0} = 0
[0,1)[0, 1)0011xβ‹…02+1=0\frac{x \cdot 0}{2+1} = 0
[1,2)[1, \sqrt{2})11f=0f=0 (arg >2>2)xβ‹…12+0=x2\frac{x \cdot 1}{2+0} = \frac{x}{2}
[2,2][\sqrt{2}, 2]f=0f=0 (arg β‰₯2\ge 2)f=0f=000

3. Deconstruct and Integrate: The integrand is non-zero only on [1,2)[1, \sqrt{2}).

I=∫12x2 dx=[x24]12=24βˆ’14=14I = \int_1^{\sqrt{2}} \frac{x}{2} \, dx = \left[ \frac{x^2}{4} \right]_1^{\sqrt{2}} = \frac{2}{4} - \frac{1}{4} = \frac{1}{4}

4. Final Calculation: 4Iβˆ’1=4(1/4)βˆ’1=04I - 1 = 4(1/4) - 1 = 0.

3. The Improper Fractional Part

Problem Hard

Evaluate I=∫01{1/x} dxI = \int_0^1 \{1/x\} \, dx.

Hint

The integrand f(x)={1/x}f(x)=\{1/x\} oscillates infinitely fast as x→0+x \to 0^+. Try substitution u=1/xu = 1/x.

View Solution

1. Substitution: Let u=1/xu = 1/x, so dx=βˆ’du/u2dx = -du/u^2. Limits become ∞\infty to 11.

I=∫1∞{u}u2 duI = \int_1^\infty \frac{\{u\}}{u^2} \, du

2. Decomposition into a Series:

I=βˆ‘k=1∞∫kk+1uβˆ’ku2 duI = \sum_{k=1}^\infty \int_k^{k+1} \frac{u-k}{u^2} \, du

3. Integrate:

∫kk+1(1uβˆ’ku2)du=[ln⁑u+ku]kk+1=ln⁑(1+1k)βˆ’1k+1\int_k^{k+1} \left(\frac{1}{u} - \frac{k}{u^2}\right) du = \left[ \ln u + \frac{k}{u} \right]_k^{k+1} = \ln\left(1+\frac{1}{k}\right) - \frac{1}{k+1}

4. Summation: Using the Euler-Mascheroni constant Ξ³\gamma:

I=lim⁑Nβ†’βˆžβˆ‘k=1N[ln⁑(k+1)βˆ’ln⁑kβˆ’1k+1]=1βˆ’Ξ³I = \lim_{N\to\infty} \sum_{k=1}^N \left[\ln(k+1) - \ln k - \frac{1}{k+1}\right] = 1 - \gamma

4. The Riemann-Stieltjes Integral

Problem Advanced

Evaluate I=∫03cos⁑(Ο€x/2) d(⌊xβŒ‹2βˆ’βŒŠxβŒ‹)I = \int_0^3 \cos(\pi x/2) \, d(\lfloor x \rfloor^2 - \lfloor x \rfloor).

View Solution

This is a Riemann-Stieltjes integral. The integrator Ξ±(x)=⌊xβŒ‹2βˆ’βŒŠxβŒ‹\alpha(x) = \lfloor x \rfloor^2 - \lfloor x \rfloor is a step function. The integral becomes a sum: βˆ‘f(k)⋅Δαk\sum f(k) \cdot \Delta\alpha_k.

1. Jump Points: Integers 1,2,31, 2, 3.

2. Jump Sizes (Δαk\Delta\alpha_k):

  • At x=1x=1: (12βˆ’1)βˆ’(0βˆ’0)=0(1^2-1) - (0-0) = 0.
  • At x=2x=2: (22βˆ’2)βˆ’(12βˆ’1)=2(2^2-2) - (1^2-1) = 2.
  • At x=3x=3: (32βˆ’3)βˆ’(22βˆ’2)=4(3^2-3) - (2^2-2) = 4.

3. Evaluate:

I=f(1)(0)+f(2)(2)+f(3)(4)I = f(1)(0) + f(2)(2) + f(3)(4)I=cos⁑(Ο€/2)β‹…0+cos⁑(Ο€)β‹…2+cos⁑(3Ο€/2)β‹…4=0βˆ’2+0=βˆ’2I = \cos(\pi/2)\cdot 0 + \cos(\pi)\cdot 2 + \cos(3\pi/2)\cdot 4 = 0 - 2 + 0 = -2

5. Theoretical Challenge (Leibniz + Absolute Value)

Problem Advanced

Let g(x)=∫01∣xβˆ’t∣f(t) dtg(x) = \int_0^1 |x-t|f(t) \, dt. Show that gβ€²β€²(x)=2f(x)g''(x) = 2f(x) for x∈(0,1)x \in (0,1).

View Solution

1. Split the Integral at t=xt=x:

g(x)=∫0x(xβˆ’t)f(t) dt+∫x1(tβˆ’x)f(t) dtg(x) = \int_0^x (x-t)f(t) \, dt + \int_x^1 (t-x)f(t) \, dt

2. Differentiate (gβ€²(x)g'(x)): Using Leibniz rule, the boundary terms cancel.

gβ€²(x)=∫0xf(t) dtβˆ’βˆ«x1f(t) dtg'(x) = \int_0^x f(t) \, dt - \int_x^1 f(t) \, dt

3. Differentiate Again (gβ€²β€²(x)g''(x)):

gβ€²β€²(x)=f(x)βˆ’(βˆ’f(x))=2f(x)g''(x) = f(x) - (-f(x)) = 2f(x)

6. The Number Theory Crossover

Problem Medium

Let Ο€(x)\pi(x) be the prime-counting function. Evaluate I=∫010Ο€(x) dxI = \int_0^{10} \pi(x) \, dx.

View Solution

Ο€(x)\pi(x) is a step function that increases by 1 at every prime number.

  • [0,2)[0, 2): Ο€(x)=0\pi(x)=0
  • [2,3)[2, 3): Ο€(x)=1\pi(x)=1 (Width 1)
  • [3,5)[3, 5): Ο€(x)=2\pi(x)=2 (Width 2)
  • [5,7)[5, 7): Ο€(x)=3\pi(x)=3 (Width 2)
  • [7,10][7, 10]: Ο€(x)=4\pi(x)=4 (Width 3)
I=(1Γ—1)+(2Γ—2)+(3Γ—2)+(4Γ—3)=1+4+6+12=23I = (1 \times 1) + (2 \times 2) + (3 \times 2) + (4 \times 3) = 1 + 4 + 6 + 12 = 23

Exploring Frontiers

The Riemann-Stieltjes Integral

The methods used to integrate floor functions are practical applications of the Riemann-Stieltjes integral, ∫abf(x) dΞ±(x)\int_a^b f(x) \, d\alpha(x). If we choose Ξ±(x)=⌊xβŒ‹\alpha(x) = \lfloor x \rfloor, the integral collapses into a discrete sum of the values of f(x)f(x) at each jump point, weighted by the size of the jump.

Connection to Fourier Series

Piecewise functions are central to the theory of Fourier Series. A periodic piecewise function, like the sawtooth wave (f(x)={x}f(x) = \{x\}) or the square wave, can be represented as an infinite sum of smooth sine and cosine waves. The strategy of β€œsplitting the domain” is fundamental to calculating the coefficients by integrating the function’s pieces against sine and cosine terms.


The Crucible: Advanced Unsolved Problems

  1. Problem: Evaluate ∫01000exβˆ’βŒŠxβŒ‹β€‰dx\int_0^{1000} e^{x-\lfloor x \rfloor} \, dx.
  2. Problem: Evaluate ∫0Ο€/2⌊2sin⁑(x+Ο€/4)βŒ‹β€‰dx\int_0^{\pi/2} \lfloor \sqrt{2} \sin(x + \pi/4) \rfloor \, dx.
  3. Problem: Evaluate ∫1∞{x}x2 dx\int_1^\infty \frac{\{x\}}{x^2} \, dx.
  4. Problem: Evaluate ∫0n⌊xβŒ‹β€‰dx\int_0^n \lfloor \sqrt{x} \rfloor \, dx where nn is a perfect square, n=m2n=m^2.
  5. Problem: Evaluate βˆ«βˆ’11(x3+sin⁑x)β‹…sgn(cos⁑(Ο€x)) dx\int_{-1}^1 (x^3 + \sin x) \cdot \text{sgn}(\cos(\pi x)) \, dx.
  6. Problem: Evaluate βˆ«βˆ’55({x}βˆ’1/2)cos⁑2(Ο€x) dx\int_{-5}^5 (\{x\} - 1/2) \cos^2(\pi x) \, dx.
  7. Problem: Let f(x)=x2βˆ’βŒŠxβŒ‹2f(x) = x^2 - \lfloor x \rfloor^2. Evaluate ∫03f(x) dx\int_0^3 f(x) \, dx.
  8. Problem: Evaluate the improper integral ∫01{1/x} dx\int_0^1 \{1/x\} \, dx.
  9. Yuki’s Integration Challenge: Evaluate the Riemann-Stieltjes integral I=∫02min⁑(x,{x}2) d⌊xβŒ‹I = \int_0^2 \min(x, \{x\}^2) \, d\lfloor x \rfloor.