Q.By using the properties of definite integrals, evaluate the integral ∫28∣x−5∣dx
🔒You're viewing a preview — the full solution, concept, methods & PYQ mapping are locked.
🔒 Start your 10-day free trial to unlock the full solution →Concept understanding — Definite Integral Piecewise
Integrating a Piecewise Function
A piecewise function follows different rules on different parts of its domain — for example
f(x)={x,2−x,0≤x≤11<x≤2
To find a definite integral ∫abf(x)dx of such a function, you cannot use a single antiderivative across the whole interval, because there is no single formula for f over [a,b]. The key idea is to split the integral at every point where the rule changes and integrate each piece with its own formula.
The additivity property
The tool that makes this legal is the interval-additivity of the definite integral: for any point c between a and b,
∫abf(x)dx=∫acf(x)dx+∫cbf(x)dx.
So you place the split points exactly where the definition of f switches, and on each sub-interval you substitute the rule that applies there.
The method
- Find the break points — the x-values where the piecewise rule changes (and note whether any lie inside [a,b]).
- Split ∫ab into one integral per sub-interval.
- On each piece, replace f by its formula there and integrate normally.
- Add the results.
Example. For the f above,
∫02f(x)dx=∫01xdx+∫12(2−x)dx=[2x2]01+[2x−2x2]12=21+21=1.
Functions defined with ∣x∣ or the greatest-integer function [x] are secretly piecewise. To evaluate ∫−22∣x∣dx, write ∣x∣=−x on [−2,0] and ∣x∣=x on [0,2], then split at 0. …
The key idea is that the absolute value function creates a piecewise expression, so we split the integral at the point where the expression inside changes sign.
Step 1: Find where x−5=0. This gives x=5, which lies inside the interval [2,8].
Step 2: Write ∣x−5∣ as a piecewise function:
∣x−5∣={−(x−5)=5−x,x−5,2≤x≤55≤x≤8
Step 3: Split and evaluate the integral:
∫28∣x−5∣dx=∫25(5−x)dx+∫58(x−5)dx
Compute each: …
The integral ∫28∣x−5∣dx is evaluated by splitting the interval at the point where the expression inside the absolute value changes sign, x=5. The result is 9.
The absolute value function ∣x−5∣ is not a simple polynomial — it has a sharp corner at x=5. This means the function behaves differently on either side of that point. For x<5, the expression x−5 is negative, so ∣x−5∣=−(x−5)=5−x. For x≥5, it is non-negative, so ∣x−5∣=x−5.
Because the integrand changes its algebraic form at x=5, we cannot integrate it as a single expression from 2 to 8. Instead, we split the integral at the point where the definition changes. This is a standard technique: whenever you see an absolute value inside a definite integral, locate where the expression inside becomes zero, and break the integral there.
Here is the step-by-step solution:
-
Find the splitting point.
Set x−5=0, which gives x=5. This point lies inside the interval [2,8], so we must split the integral at x=5.
-
Write the piecewise definition of ∣x−5∣.
∣x−5∣={5−x,x−5,if x≤5if x≥5
- Split the integral at x=5.
∫28∣x−5∣dx=∫25(5−x)dx+∫58(x−5)dx
- Evaluate the first integral.
∫25(5−x)dx=[5x−2x2]25
At x=5: 5(5)−225=25−12.5=12.5
At x=2: 5(2)−24=10−2=8
Subtract: 12.5−8=4.5
- Evaluate the second integral.
∫58(x−5)dx=[2x2−5x]58
At x=8: 264−40=32−40=−8
At x=5: 225−25=12.5−25=−12.5
Subtract: (−8)−(−12.5)=−8+12.5=4.5
- Add the two results. …
Method: Integrating an absolute value — split where the inside changes sign
∣expression∣ is a piecewise function, so break the interval at the point where the inside is zero and integrate each piece with the correct sign.
Steps
Step 1: Find the break point.
Solve inside=0. If that value lies inside the limits, it is the split point; if it lies outside, no split is needed.
Step 2: Write the piecewise definition.
∣x−k∣={−(x−k),x−k,x<kx≥k. …
Common Mistakes
Mistake 1: Forgetting to split at x=5.
Why it's wrong: ∣x−5∣ is piecewise about x=5; integrating x−5 straight from 2 to 8 gives 0, which is clearly wrong for a positive area. Correct approach: split into ∫25(5−x)+∫58(x−5).
Mistake 2: Using the wrong branch on each side. …
Showing the 12 most recent of 66 on this concept.
- JEE Main 2026Set 2026-04-02-s14 marksMCQQ.Let [·] denote the greatest integer function. Then the value of ∫(0 to 3) (e^x + e^−x)/[x]! dx is : (A) e^2 + e^3 − 1/e^2 − 1/e^3 (B) (1/2)(e^2 + e^3 − 1/e^2 − 1/e^3) (C) e^2 + e^3 − 1/(2e^2) − 1/(2e^3) (D) (1/2)(e^2 + e^3) − 1/e^2 − 1/e^3
›Reveal solutionSolution
Breaking the integral at the integer points where [x] jumps turns it into two pieces, each with constant denominator; the result simplifies to 21(e2+e3−e−2−e−3).
The greatest integer function [x] is constant on each unit interval [n,n+1), so the trick for any integral involving [x] is to break the range at integers first — only then does the integrand become an ordinary continuous function on each piece.
- On (0,1): [x]=0⇒[x]!=0!=1.
- On (1,2): [x]=1⇒[x]!=1!=1.
- On (2,3): [x]=2⇒[x]!=2!=2.
- So ∫03[x]!ex+e−xdx=∫01(ex+e−x)dx+∫12(ex+e−x)dx+21∫23(ex+e−x)dx=∫02(ex+e−x)dx+21∫23(ex+e−x)dx.
∫(ex+e−x)dx=ex−e−x+C …
- JEE Main 2026Set 2026-01-21-s14 marksQ.6∫_0^π |(sin 3x + sin 2x + sin x)| dx is equal to ____.
›Reveal solutionSolution
Factoring f(x) reveals it changes sign at x=π/2 and 2π/3 within (0,π); piecewise integration gives ∫0π∣f∣dx=17/6, so 6 times that is 17.
Factoring the sum of sines first makes the sign analysis of the integrand tractable.
- f(x)=sin3x+sin2x+sinx=(sin3x+sinx)+sin2x=2sin2xcosx+sin2x=sin2x(2cosx+1)=2sinxcosx(2cosx+1).
- On (0,π), sinx>0 always, so sign(f)=sign(cosx(2cosx+1)), which changes at x=π/2 (where cosx=0) and x=2π/3 (where cosx=−1/2): f>0 on (0,π/2), f<0 on (π/2,2π/3), f>0 on (2π/3,π). …
- JEE Main 2026Set 2026-04-04-s14 marksMCQQ.The area of the region {(x, y): y ≤ π − |x|, y ≤ |x sin x|, y ≥ 0} is: (A) 1 + π²/8 (B) 2 + π²/4 (C) π²/8 − 1 (D) 4 + π²/2
›Reveal solutionSolution
The two upper-boundary curves cross exactly at x=π/2; integrating the smaller one on each side and doubling for symmetry gives area 2+π2/4.
With two competing upper bounds (y≤π−∣x∣ and y≤∣xsinx∣), the region's true upper boundary is whichever is SMALLER at each x — finding where they cross is the essential first step before any integration.
- Both bounding functions are even, so compute the area for x≥0 and double.
- For x∈[0,π], sinx≥0, so ∣xsinx∣=xsinx.
- Check the crossing point: at x=π/2, π−x=π/2 and xsinx=(π/2)(1)=π/2 — equal! This is the exact crossover.
- For x<π/2 (e.g. x=0.5): xsinx≈0.24<π−x≈2.64 — so xsinx is the binding (smaller) upper bound.
- For x>π/2 (e.g. x=2π/3): π−x≈1.05<xsinx≈1.81 — so π−x is binding here. …
- JEE Main 2026Set 2026-04-04-s14 marksMCQQ.Let ∫ from −2 to 2 of (|sin x| + [x sin x]) dx = 2(3 − cos 2) + β, where [·] is the greatest integer function. Then β sin(β/2) equals: (A) 1 (B) 2 (C) 4 (D) 8
›Reveal solutionSolution
The floor function's single jump point x0 (defined by x0sinx0=1) never needs to be solved explicitly, because β=−2x0 combines with sin(β/2)=−sinx0 to give exactly βsin(β/2)=2x0sinx0=2 by the very definition of x0.
The cleverness here is recognizing that even though x0 (where xsinx=1) has no closed form, the SPECIFIC combination the question asks for cancels perfectly using x0's own defining equation — no numerical solving is actually needed.
- ∣sinx∣ is even and non-negative on [−2,2] (since 2<π): ∫−22∣sinx∣dx=2∫02sinxdx=2[1−cos2]=2−2cos2.
- g(x)=xsinx is even, and on [0,2] its derivative sinx+xcosx stays positive (checked at several points), so g increases monotonically from g(0)=0 to g(2)=2sin2≈1.818.
- Since g never reaches 2, [g(x)] takes only the values 0 (for x<x0) and 1 (for x≥x0), where x0 is the unique point with x0sinx0=1. …
- JEE Main 2026Set 2026-04-06-s24 marksMCQQ.The value of the integral ∫₋₁¹ (x³+|x|+1)/(x²+2|x|+1) dx is equal to : (A) 3 log_e 2 (B) 2 log_e 2 (C) 5 log_e 3 (D) 3 log_e 3
›Reveal solutionSolution
Factor the denominator as a perfect square, then split the numerator into an odd piece (which vanishes on a symmetric interval) and an even piece.
- Denominator: x^2+2|x|+1=(|x|+1)^2 since x^2=|x|^2.
- f(x)=\dfrac{x^3+|x|+1}{(|x|+1)^2}=\dfrac{x^3}{(|x|+1)^2}+\dfrac{|x|+1}{(|x|+1)^2}=\dfrac{x^3}{(|x|+1)^2}+\dfrac{1}{|x|+1} …
- JEE Main 2026Set 2026-04-08-s24 marksMCQQ.Let f(x) = { 1/3 , x ≤ π/2 ; b(1-sinx)/(π-2x)² , x > π/2 }. If f is continuous at x=π/2, then the value of ∫₀^(3b-6) |x²+2x-3| dx is : (A) 5 (B) 2 (C) 3 (D) 4
›Reveal solutionSolution
Find b from the continuity condition (a 0/0 limit resolved via the half-angle identity), get the upper limit 3b-6=2, then integrate the absolute value by splitting at the sign-change point x=1.
Step-by-step:
- Let x=π/2+h, h→0⁺. Then sinx=cos h, so 1-sinx=1-cos h=2sin²(h/2); and π-2x=-2h, so (π-2x)²=4h².
- lim_{h→0} (1-sinx)/(π-2x)² = lim 2sin²(h/2)/(4h²) = (1/2)·[sin(h/2)/h]² = (1/2)·(1/4) = 1/8.
- Continuity at x=π/2: b·(1/8) = 1/3 ⇒ b = 8/3.
- 3b-6 = 3(8/3)-6 = 8-6 = 2. …
- JEE Main 2026Set 2026-01-22-s14 marksMCQQ.The value of ∫ from -π/2 to π/2 of (1/([x] + 4)) dx, where [·] denotes the greatest integer function, is (A) (1/60)(π - 7) (B) (1/60)(21π - 1) (C) (7/60)(3π - 1) (D) (7/60)(π - 3)
›Reveal solutionSolution
Breaking the integral at integer boundaries and summing the four constant-denominator pieces gives 607(3π−1).
- On [−π/2,−1), [x]=−2, length =π/2−1, contributes 2π/2−1.
- On [−1,0), [x]=−1, length =1, contributes 31.
- On [0,1), [x]=0, length =1, contributes 41.
- On [1,π/2), [x]=1, length =π/2−1, contributes 5π/2−1.
Total =(π/2−1)(21+51)+31+41 …
- JEE Main 2026Set 2026-01-22-s24 marksMCQQ.Let f(x) = [x]² − [x+3] − 3, x ∈ R, where [·] is the greatest integer function. Then (A) ∫₀² f(x) dx = −6 (B) f(x) = 0 for finitely many values of x (C) f(x) > 0 only for x ∈ [4, ∞) (D) f(x) < 0 only for x ∈ [−1, 3)
›Reveal solutionSolution
f(x)=([x]−3)([x]+2) is negative exactly when [x]∈{−1,0,1,2}, i.e. x∈[−1,3).
- f(x)=[x]2−[x+3]−3=[x]2−([x]+3)−3=[x]2−[x]−6=([x]−3)([x]+2), constant on each interval [n,n+1).
f<0⟺−2<n<3⟺n∈{−1,0,1,2}
- These four integer values of n=[x] correspond to x∈[−1,0)∪[0,1)∪[1,2)∪[2,3)=[−1,3), matching option (D) exactly.
- Checking (A): on [0,2), f=−6 throughout (both n=0,1 give f=−6), so ∫02fdx=−12=−6 — false. …
- JEE Main 2026Set 2026-01-22-s24 marksQ.Let [·] be the greatest integer function. If α = ∫₀^64 (x^(1/3) − [x^(1/3)]) dx, then (1/π) ∫₀^(απ) (sin²θ / (sin⁶θ + cos⁶θ)) dθ is equal to _____.
›Reveal solutionSolution
α=36, and the trig integral also evaluates to exactly 36 over the resulting range.
- ∫064x1/3dx=43(64)4/3=43(256)=192.
- ∫064[x1/3]dx: on [n3,(n+1)3), [x1/3]=n; summing n=0,1,2,3 gives 0(1)+1(7)+2(19)+3(37)=0+7+38+111=156.
α=192−156=36
- For the second integral, write sin6θ+cos6θ=1−3sin2θcos2θ=1−43sin22θ; by symmetry ∫0π/2sin2θ/(⋯)dθ=∫0π/2cos2θ/(⋯)dθ, and their sum is ∫0π/21/(1−43sin22θ)dθ=π/2 (via the standard ∫0π/2dϕ/(a2cos2ϕ+b2sin2ϕ)=π/(2ab) identity), …
- JEE Main 2026Set 2026-01-24-s24 marksMCQQ.Let f(alpha) denote the area of the region in the first quadrant bounded by x = 0, x = 1, y^2 = x and y = |alpha.x - 5| - |1 - alpha.x| + alpha.x^2. Then (f(0) + f(1)) is equal to (A) 12 (B) 7 (C) 9 (D) 14
›Reveal solutionSolution
Evaluating the bounding curve at α=0 and α=1 gives two 'area between curves' integrals that sum to exactly 7.
Plugging in each specific value of α collapses the complicated absolute-value expression for y into a simple curve, after which the area is a standard integral against y=x.
- At α=0: y=∣0−5∣−∣1−0∣+0=5−1=4 (a constant line).
f(α)=∫01[ybound(x)−x]dx
- f(0)=∫01(4−x)dx=4−32=310.
- At α=1 (for x∈[0,1]): y=∣x−5∣−∣1−x∣+x2=(5−x)−(1−x)+x2=4+x2.
- f(1)=∫01[(4+x2)−x]dx=4+31−32=311. …
- JEE Main 2026Set 2026-01-28-s14 marksQ.The value of Σ_(r=1)^20 ( | √( π ( ∫_0^r x |sin πx| dx ) ) | ) is _____.
›Reveal solutionSolution
Each unit interval contributes an odd multiple of 1/π to the integral, so ∫0rx∣sinπx∣dx=r2/π exactly; multiplying by π and taking the square root just recovers r, so the whole sum collapses to 1+2+⋯+20=210.
- On [0,1], sinπx≥0, so ∣sinπx∣=sinπx. Using integration by parts:
∫xsinπxdx=−πxcosπx+π2sinπx
- ∫01xsinπxdx=[−πxcosπx+π2sinπx]01=π1 (since cosπ=−1,sinπ=0).
- On [1,2], sinπx≤0, so ∣sinπx∣=−sinπx. Using the same antiderivative F(x)=−πxcosπx+π2sinπx:
∫12xsinπxdx=F(2)−F(1)=(−π2)−(π1)=−π3⇒∫12x∣sinπx∣dx=π3
- On [2,3], sine is positive again: ∫23xsinπxdx=F(3)−F(2)=π3−(−π2)=π5.
Sum of the first r odd numbers: 1+3+5+⋯+(2r−1)=r2.
- The pattern of per-interval contributions is π1,π3,π5,…,π2r−1 — the odd numbers over π. Summing over r intervals: …
- JEE Main 2026Set 2026-01-28-s24 marksMCQQ.Let [] denote the greatest integer function. Then ∫_{-π/2}^{π/2} (12(3+[x]))/(3+[sin x]+[cos x]) dx is equal to: (A) 13π + 1 (B) 12π + 5 (C) 11π + 2 (D) 15π + 4
›Reveal solutionSolution
Breaking the interval at the integer-crossing points of x,sinx,cosx turns the integrand piecewise-constant on each of four pieces, summing to 11π+2.
Both [x] and [sinx]+[cosx] only change value at specific points inside [−π/2,π/2], so the whole integral reduces to a sum of constant-integrand pieces.
- [−π/2,−1): [x]=−2; here sinx∈(−1,−0.84] so [sinx]=−1, and cosx∈[0,0.54) so [cosx]=0 — denominator 3−1=2. Integrand =12(3−2)/2=6. Length =π/2−1.
- [−1,0): [x]=−1; same [sinx]+[cosx]=−1, denominator 2. Integrand =12(2)/2=12. Length =1. …
🎓Unlock everything free for 10 days
- ✓Full step-by-step solutions
- ✓Concept-first explanations
- ✓Methods, shortcuts & mistakes
- ✓PYQ mapping + timed mock tests
Full access for 10 days. No credit card required.