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.
- CBSE 2020Set 65/1/11 markQ.Evaluate : ∫13∣2x−1∣dx
›Reveal solutionSolution
The integral ∫13∣2x−1∣dx is evaluated by noting that 2x−1 is positive on the entire interval [1,3], so the absolute value drops directly. The result is 6.
The key to integrating an absolute value function is to understand where the expression inside the absolute value changes sign. The absolute value "breaks" the integral into pieces where the expression is either non-negative or negative, because ∣f(x)∣=f(x) when f(x)≥0 and ∣f(x)∣=−f(x) when f(x)≤0.
Here, the expression is 2x−1. This is a linear function — it crosses zero at exactly one point. Let's find that point: set 2x−1=0, which gives x=21.
Now, look at the interval of integration: from x=1 to x=3. Since 21<1, the entire interval lies to the right of the zero. For any x>21, the value 2x−1 is positive. Check: at x=1, 2(1)−1=1>0; at x=3, 2(3)−1=5>0. So on [1,3], the expression is always positive.
That means the absolute value does nothing — ∣2x−1∣=2x−1 for all x in [1,3]. The integral simplifies immediately.
- Set up the simplified integral Since ∣2x−1∣=2x−1 on [1,3], we have:
∫13∣2x−1∣dx=∫13(2x−1)dx
- Integrate term by term The antiderivative of 2x is x2, and the antiderivative of −1 is −x. So:
∫(2x−1)dx=x2−x+C
- Evaluate the definite integral Apply the limits x=3 and x=1:
[x2−x]13=(32−3)−(12−1)=(9−3)−(1−1)=6−0=6
Watch outA common mistake is to split the integral at x=21 even when the interval doesn't cross that point. Always check whether the zero lies inside the integration limits. Here, since 21 is outside [1,3], no split is needed — doing so would be unnecessary work and could introduce sign errors if done carelessly.
TipFor a linear expression ax+b, the zero is at x=−b/a. Quickly compare this value to the integration limits. If it's outside the interval, the absolute value is either always ax+b or always −(ax+b) — just check the sign at any one point in the interval.
✓Final answerThe value of the integral is 6.
- CBSE 2026Set A1 markMCQQ.∫02π∣sinx∣dx=(a) 2(b) 4(c) 1(d) 3
›Reveal solutionSolution
By symmetry ∫02π∣sinx∣dx=2∫0πsinxdx=4.
On [0,π], sinx≥0; on [π,2π], sinx≤0 so ∣sinx∣=−sinx. The two humps have equal area, so
∫02π∣sinx∣dx=2∫0πsinxdx=2[−cosx]0π=2(1+1)=4.
✓Final answer(B) 4.
- CBSE 2026Set A1 markMCQQ.∫−22∣x∣dx=(a) 4(b) 3(c) 2(d) 0
›Reveal solutionSolution
Even function: ∫−22∣x∣dx=2∫02xdx=4.
∣x∣ is even, so ∫−22∣x∣dx=2∫02∣x∣dx=2∫02xdx (since x≥0 on [0,2]).
=2[2x2]02=2⋅24=4.
✓Final answer(A) 4.
- CBSE 2025Set 65/1/11 markMCQQ.∫−11x∣x∣dx, x=0 is equal to: (A) −1 (B) 0 (C) 1 (D) 2
›Reveal solutionSolution
x∣x∣=−1 for x<0 and +1 for x>0, an odd function, so the integral over the symmetric interval [−1,1] is 0 — option (B).
Solution
x∣x∣={+1,x>0 −1,x<0
Split the integral at x=0:
∫−11x∣x∣dx=∫−10(−1)dx+∫01(1)dx=(−1)(0−(−1))+(1)(1−0)=−1+1=0.
(Equivalently, x∣x∣ is an odd function integrated over the symmetric interval [−1,1], so the result is 0.)
✓Final answerThe value of the integral is 0 — option (B).
- CBSE 2025Set ANNUAL1 markMCQQ.What is the value of ∫12ex+[x]dx?(i) (e+1)e(ii) (1−e)e(iii) (e−1)e(iv) (e−1)e2
›Reveal solutionSolution
On [1,2) the greatest-integer function gives [x]=1, so the integral becomes a simple exponential integral.
For x∈[1,2), the integer part [x]=1 (the single point x=2 does not affect the value of a definite integral). So on this interval:
ex+[x]=ex+1
∫12ex+1dx=e∫12exdx=e[ex]12=e(e2−e)=e2(e−1)
✓Final answer(iv) (e−1)e2.
- CBSE 2024Set ANNUAL1 markMCQQ.The value of ∫13∣x−3∣dx is ............... .(a) 1(b) –2(c) 2(d) 0
›Reveal solutionSolution
On [1,3], x−3≤0, so ∣x−3∣=3−x; integrate this directly.
For x∈[1,3], x≤3, so x−3≤0 and ∣x−3∣=3−x.
∫13∣x−3∣dx=∫13(3−x)dx=[3x−2x2]13
=(9−29)−(3−21)=29−25=2
✓Final answerThe value is 2 (option c).
- CBSE 2022Set ANNUAL1 markQ.∫02[x]dx= ____ (where [x] denotes the greatest integer function). Choices given: [−1, 0, 1, 2]
›Reveal solutionSolution
Split the integral at the integer break-point, since [x] (greatest integer function) is a different constant on each sub-interval.
On [0,1), [x]=0; on [1,2), [x]=1 (the single point x=2 doesn't affect the integral).
∫02[x]dx=∫010dx+∫121dx=0+1=1.
✓Final answer1.
- CBSE 2021Set NC1 markQ.Find the value of ∫23∣x∣dx. OR Find the value of ∫0π/2cos2xdx.
›Reveal solutionSolution
Since the interval [2,3] contains only positive numbers, ∣x∣=x there, reducing this to a standard power-rule integral.
For x∈[2,3], x>0, so ∣x∣=x. Thus
∫23∣x∣dx=∫23xdx=[2x2]23=29−24=25
Check: this is the area of a trapezium with parallel sides 2 and 3, width 1: 2(2+3)×1=25 correct.
✓Final answer25
Alternative (Or): Find ∫0π/2cos2xdx.
Antidifferentiate cos2x using the standard rule ∫cos(kx)dx=ksinkx+C, then apply the limits.
∫0π/2cos2xdx=[2sin2x]0π/2=2sinπ−2sin0=20−20=0
✓Final answer0
- CBSE 2020Set 65/3/11 markQ.Evaluate: ∫−22∣x∣dx.(OR)Find: ∫9+4x2dx.
›Reveal solutionSolution
Part (a): ∫−22∣x∣dx=4. Part (b): ∫9+4x2dx=61tan−1(32x)+C.
Part (a)
Idea. ∣x∣ is even; split at the corner x=0 (or use the even-function property).
- ∣x∣={x,−x,x≥0x<0, so split the integral:
∫−22∣x∣dx=∫−20(−x)dx+∫02xdx.
- Evaluate:
∫−20(−x)dx=[−2x2]−20=0−(−2)=2,∫02xdx=[2x2]02=2.
- Sum: 2+2=4.
TipGeometrically this is two right triangles of area 2 each — total 4.
✓Final answer∫−22∣x∣dx=4
Part (b)
Idea. Reduce to the standard form ∫a2+x2dx=a1tan−1ax+C.
- Factor 4 out of the denominator:
∫9+4x2dx=∫4(49+x2)dx=41∫(23)2+x2dx.
- Apply the standard result with a=23:
41⋅3/21tan−13/2x=41⋅32tan−132x=61tan−132x+C.
✓Final answer∫9+4x2dx=61tan−1(32x)+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.