Q.Evaluate ∫−12x3−xdx
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.
Never integrate straight across a break point with one formula. The single most common error is using ∫02xdx for the whole thing above — that ignores the second rule and gives the wrong area.
Because the value of the function at the single break point does not affect area, it doesn't matter which piece "owns" the boundary; the split still gives the correct total.
Integrating a piecewise-defined function by splitting at every break point is a direct application of the interval-additivity property taught in the NCERT Class 12 Integrals chapter, and it's a recurring CBSE board question whenever |x| or the greatest-integer function appears inside a definite integral. Students searching 'definite integral of piecewise function examples' or 'integration of modulus function class 12' will find this split-at-the-break-point method is exactly the approach board model solutions follow.
The key idea is that the absolute value forces us to split the integral at the points where x3−x=0, i.e., where the expression changes sign.
Step 1: Find the roots.
x3−x=x(x−1)(x+1)=0 gives x=−1,0,1. On [−1,2], the sign changes at 0 and 1.
Step 2: Determine the sign of x3−x on each subinterval.
- On (−1,0): test x=−0.5 → (−0.5)3−(−0.5)=−0.125+0.5=0.375>0.
- On (0,1): test x=0.5 → 0.125−0.5=−0.375<0.
- On (1,2): test x=1.5 → 3.375−1.5=1.875>0.
Thus ∣x3−x∣=x3−x on [−1,0] and [1,2], and equals −(x3−x)=x−x3 on [0,1].
Step 3: Write and evaluate the sum of integrals.
∫−12∣x3−x∣dx=∫−10(x3−x)dx+∫01(x−x3)dx+∫12(x3−x)dx
Compute each:
∫(x3−x)dx=4x4−2x2
- From −1 to 0: [0]−[41−21]=0−(−41)=41.
- From 1 to 2: [416−24]−[41−21]=(4−2)−(−41)=2+41=49.
- For ∫(x−x3)dx=2x2−4x4 from 0 to 1: [21−41]−0=41.
Sum: 41+41+49=411.
The value is 411.
Split the interval where x3−x=x(x−1)(x+1) changes sign. The value is 411.
The integrand x3−x=x(x−1)(x+1) has zeros at x=−1,0,1. Its sign on [−1,2] is:
- [−1,0]: positive, so ∣x3−x∣=x3−x;
- [0,1]: negative, so ∣x3−x∣=−(x3−x);
- [1,2]: positive, so ∣x3−x∣=x3−x.
With ∫(x3−x)dx=4x4−2x2=F(x):
F(x)=4x4−2x2,F(−1)=−41, F(0)=0, F(1)=−41, F(2)=2.
∫−10(x3−x)dx=F(0)−F(−1)=41,
∫01−(x3−x)dx=−(F(1)−F(0))=41,
∫12(x3−x)dx=F(2)−F(1)=2+41=49.
Adding: 41+41+49=411.
∫−12x3−xdx=411.
Method: Splitting a Definite Integral of an Absolute Value
Use this when the integrand contains ∣f(x)∣: break the interval at the points where f changes sign, and drop the modulus with the correct sign on each piece.
Steps
Step 1: Find where f(x)=0 inside the interval.
Factor f and locate its roots. For ∣x3−x∣=∣x(x−1)(x+1)∣, the roots are x=−1,0,1.
Step 2: Determine the sign of f on each subinterval.
Test a point in each piece. On [−1,0], f>0 so ∣f∣=f; on [0,1], f<0 so ∣f∣=−f; on [1,2], f>0 so ∣f∣=f.
Step 3: Integrate each piece with its sign and add.
Compute ∫ of the signed expression over each subinterval and sum the (non-negative) contributions:
∫−12∣x3−x∣dx=41+41+49=411.
Common Mistakes
Mistake 1: Integrating ∣x3−x∣ as x3−x over the whole interval.
Why it's wrong: ignoring the sign changes lets positive and negative areas cancel, giving too small a value. Correct approach: split at the roots and use ∣f∣ correctly.
Mistake 2: Getting the sign of f wrong on a subinterval.
Why it's wrong: on [0,1], x3−x<0, so ∣f∣=−(x3−x); using +f there flips a term. Correct approach: test the sign on each piece.
Mistake 3: Missing a root inside the interval.
Why it's wrong: overlooking x=0 merges two pieces of opposite sign. Correct approach: find all zeros of f in [a,b] before splitting.
Showing the 12 most recent of 15 on this concept.
- KEAM 2022Set eng-2022-P2-B14 marksMCQQ.The value of ∫−12(x−2∣x∣)dx is equal to (A) 2−1 (B) 2−3 (C) 2−5 (D) 2−7 (E) 2−9
›Reveal solutionSolution
The integral equals −27.
Concept and Intuition
The absolute value forces a split of the domain at x=0, where ∣x∣ changes formula.
Step-by-Step Solution
- For x<0: ∣x∣=−x, so x−2∣x∣=x+2x=3x.
- For x≥0: ∣x∣=x, so x−2∣x∣=x−2x=−x.
- ∫−103xdx=3[2x2]−10=3(0−21)=−23.
- ∫02(−x)dx=−[2x2]02=−2.
- Sum =−23−2=−27.
Common Mistakes
- Not splitting the integral at x=0.
- Using ∣x∣=x on the negative part.
✓Final answerThe correct option is (D) — 2−7.
ANSWER: D
- KEAM 2026Set eng-2026-04184 marksMCQQ.The value of ∫033x2−3dx is equal to (A) 16 (B) 18 (C) 20 (D) 22 (E) 24
›Reveal solutionSolution
Split at x=1 where x2−1 changes sign; the two pieces give 3⋅322=22.
Write ∫03∣3x2−3∣dx=3∫03∣x2−1∣dx. Since x2−1<0 on [0,1] and >0 on [1,3]:
∫01(1−x2)dx=[x−3x3]01=1−31=32,
∫13(x2−1)dx=[3x3−x]13=(9−3)−(31−1)=6+32=320.
Sum =32+320=322; multiplying by 3 gives 22.
✓Final answerThe correct option is (D).
- KEAM 2024Set eng-2024-06074 marksMCQQ.The value of ∫03∣x−2∣dx is equal to (A) 32 (B) 23 (C) 25 (D) 52 (E) 29
›Reveal solutionSolution
Split the absolute value at x=2 and integrate each piece.
For 0≤x≤2, ∣x−2∣=2−x; for 2≤x≤3, ∣x−2∣=x−2:
∫02(2−x)dx=[2x−2x2]02=4−2=2,
∫23(x−2)dx=[2x2−2x]23=(29−6)−(2−4)=−23+2=21.
Total =2+21=25.
✓Final answerThe correct option is (C).
- KEAM 2026Set eng-2026-04224 marksMCQQ.The value of ∫−21x∣x∣dx is equal to (A) −1 (B) −2 (C) 1 (D) 2 (E) 3
›Reveal solutionSolution
Split at 0 since ∣x∣/x=−1 for x<0 and +1 for x>0.
For x<0, x∣x∣=−1; for x>0, x∣x∣=+1.
∫−20(−1)dx=−2 and ∫01(1)dx=1.
Sum =−2+1=−1.
✓Final answerThe correct option is (A).
- KEAM 2025Set eng-2025-04264 marksMCQQ.∫−22∣x+3∣dx= (A) 14 (B) 16 (C) 8 (D) 10 (E) 12
›Reveal solutionSolution
x+3>0 throughout [−2,2], so drop the absolute value and integrate.
For x∈[−2,2], x+3≥1>0, hence ∣x+3∣=x+3.
∫−22(x+3)dx=[2x2+3x]−22=(2+6)−(2−6)=8−(−4)=12.
✓Final answerThe correct option is (E).
- KEAM 2024Set eng-2024-06084 marksMCQQ.∫−24x2∣x∣dx is equal to (A) 72 (B) 68 (C) 64 (D) 48 (E) 37
›Reveal solutionSolution
x2∣x∣=−x3 for x<0 and x3 for x>0; the two parts give 4+64=68.
Split the integral at x=0 where ∣x∣ changes form:
∫−24x2∣x∣dx=∫−20x2(−x)dx+∫04x2(x)dx=∫−20(−x3)dx+∫04x3dx.
Evaluate each:
∫−20(−x3)dx=[−4x4]−20=0−(−416)=4,
∫04x3dx=[4x4]04=4256=64.
Total =4+64=68.
✓Final answerThe correct option is (B).
- KEAM 2025Set eng-2025-04254 marksMCQQ.The value of ∫−11∣x−3∣dx is equal to (A) 5 (B) 6 (C) −5 (D) −6 (E) 0
›Reveal solutionSolution
Since x−3<0 on [−1,1], replace ∣x−3∣ with 3−x and integrate.
For x∈[−1,1], x−3<0, so ∣x−3∣=3−x. Then
∫−11(3−x)dx=[3x−2x2]−11=(3−21)−(−3−21)=25+27=6.
✓Final answerThe correct option is (B).
- KEAM 2023Set eng-2023-P2-B24 marksMCQQ.Let f:R→R be defined by f(x)={x−x+2if x≤1if x>1 Then ∫02f(x)dx= (A) 2π (B) 1 (C) 2 (D) 4 (E) 6π
›Reveal solutionSolution
∫02f(x)dx=1.
Concept and Intuition
Split the integral at the junction x=1 where the definition changes.
Step-by-Step Solution
- ∫01xdx=[2x2]01=21.
- ∫12(−x+2)dx=[−2x2+2x]12=(2)−(1.5)=21.
- Total =21+21=1.
Common Mistakes
- Using one formula over the whole interval.
- Arithmetic slip in the second integral's evaluation.
✓Final answerThe correct option is (B) — 1.
ANSWER: B
- KEAM 2025Set eng-2025-04284 marksMCQQ.The value of ∫13[x−1]dx, where [x] denotes the greatest integer function in x, is equal to (A) −2 (B) −1 (C) 0 (D) 1 (E) 2
›Reveal solutionSolution
Split at x=2: [x−1]=0 on [1,2) and =1 on [2,3), giving 0+1=1.
For x∈[1,2), x−1∈[0,1) so [x−1]=0. For x∈[2,3), x−1∈[1,2) so [x−1]=1. Thus
∫13[x−1]dx=∫120dx+∫231dx=0+1=1.
✓Final answerThe correct option is (D).
- KEAM 2025Set eng-2025-04274 marksMCQQ.If [x] is the greatest integer less than or equal to x, then ∫−33[x]dx= (A) −3 (B) −6 (C) −4 (D) −2 (E) 0
›Reveal solutionSolution
Integrating the step function [x] over [−3,3] gives −3−2−1+0+1+2=−3.
The greatest-integer function [x] is constant on each unit interval:
[x]=−3 on [−3,−2), −2 on [−2,−1), −1 on [−1,0),
[x]=0 on [0,1), 1 on [1,2), 2 on [2,3).
Each interval has width 1, so the integral is the sum of these constant values:
∫−33[x]dx=(−3)+(−2)+(−1)+0+1+2=−3.
✓Final answerThe correct option is (A).
- KEAM 2022Set eng-2022-P2-B14 marksMCQQ.If f(x)={cosx2xfor x≥0for x<0, then the value of ∫−2π/2f(x)dx is equal to (A) 2 (B) −2 (C) −3 (D) 3 (E) 0
›Reveal solutionSolution
The integral equals −3.
Concept and Intuition
The piecewise function splits the integral at x=0, using 2x below and cosx above.
Step-by-Step Solution
- Split at 0: ∫−2π/2f=∫−202xdx+∫0π/2cosxdx.
- ∫−202xdx=[x2]−20=0−4=−4.
- ∫0π/2cosxdx=[sinx]0π/2=1−0=1.
- Total =−4+1=−3.
Common Mistakes
- Applying cosx on the negative part where 2x is required.
- Arithmetic slip on [x2]−20=−4.
✓Final answerThe correct option is (C) — −3.
ANSWER: C
- KEAM 2024Set eng-2024-06054 marksMCQQ.If [x2] is the greatest integer less than or equal to x2, then ∫02[x2]dx= (A) 2 (B) 2 (C) 2−1 (D) 2+1 (E) 22+1
›Reveal solutionSolution
Split at x=1: the integrand is 0 up to 1 and 1 from 1 to 2, giving area 2−1.
For 0≤x<1, x2∈[0,1) so [x2]=0.
For 1≤x<2, x2∈[1,2) so [x2]=1.
∫02[x2]dx=∫010dx+∫121dx=0+(2−1)=2−1.
✓Final answerThe correct option is (C).
🎓Unlock everything free for 14 days
- ✓Full step-by-step solutions
- ✓Concept-first explanations
- ✓Methods, shortcuts & mistakes
- ✓PYQ mapping + timed mock tests
Full access for 14 days. No credit card required.