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 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
- ∫02(ex+e−x)dx=[ex−e−x]02=(e2−e−2)−(1−1)=e2−e−2.
- ∫23(ex+e−x)dx=[ex−e−x]23=(e3−e−3)−(e2−e−2).
- Total =(e2−e−2)+21[(e3−e−3)−(e2−e−2)]=21(e2−e−2)+21(e3−e−3)=21(e2+e3−e−2−e−3).
✓Final answerThe correct option is (B).
- 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,π).
- Antiderivative: F(x)=−3cos3x−2cos2x−cosx. Compute F(0)=−611, F(π/2)=21, F(2π/3)=125, F(π)=65.
- ∫0π∣f∣dx=[F(π/2)−F(0)]−[F(2π/3)−F(π/2)]+[F(π)−F(2π/3)]=617.
- 6×617=17.
✓Final answerThe value is 17.
- 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.
∫xsinxdx=−xcosx+sinx+C
- ∫0π/2xsinxdx=[−xcosx+sinx]0π/2=(0+1)−(0+0)=1.
- ∫π/2π(π−x)dx=[πx−2x2]π/2π=2π2−83π2=8π2.
- Area for x≥0: 1+8π2. Total area (doubling): 2+4π2.
✓Final answerThe correct option is (B).
- 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.
∫02[g(x)]dx=0×x0+1×(2−x0)=2−x0
- By evenness, ∫−22[xsinx]dx=2(2−x0)=4−2x0.
- Total integral =(2−2cos2)+(4−2x0)=6−2cos2−2x0. Matching to 2(3−cos2)+β=6−2cos2+β gives β=−2x0.
- sin(β/2)=sin(−x0)=−sinx0.
- βsin(β/2)=(−2x0)(−sinx0)=2x0sinx0=2(1)=2 (using the defining equation of x0 directly — no numeric value of x0 needed).
✓Final answerThe correct option is (B).
- 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}
- The first term, \dfrac{x^3}{(|x|+1)^2}, is an odd function (odd numerator, even denominator), so its integral over the symmetric interval [-1,1] is 0.
- The second term, \dfrac{1}{|x|+1}, is even, so \displaystyle\int_{-1}^1\dfrac{dx}{|x|+1}=2\int_0^1\dfrac{dx}{x+1}.
- = 2\big[\ln(x+1)\big]_0^1=2(\ln2-\ln1)=2\ln2.
✓Final answer(B)
- 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.
- Evaluate ∫₀² |x²+2x-3|dx. Factor: x²+2x-3=(x+3)(x-1), which is negative on (0,1) and positive on (1,2) [root at x=1 inside the interval].
- ∫₀¹ -(x²+2x-3)dx = [-x³/3-x²+3x]₀¹ = -1/3-1+3 = 5/3.
- ∫₁² (x²+2x-3)dx = [x³/3+x²-3x]₁² = (8/3+4-6)-(1/3+1-3) = 2/3-(-5/3) = 7/3.
- Total = 5/3+7/3 = 4.
✓Final answer(D)
- 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
- (π/2−1)⋅107+127=207π−107+127=207π−607.
- This equals 607(3π−1).
✓Final answerThe correct option is (C), 607(3π−1).
- 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.
- Checking (B): f=0 at n=3 or n=−2, each holding on an entire unit interval (infinitely many x), not finitely many — false.
- Checking (C): f>0 also for n≤−3 (e.g. n=−3 gives f=6>0), not only for x≥4 — false.
✓Final answerThe correct option is (D), f(x)<0 only for x∈[−1,3).
- 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), so each integral equals π/4... actually each piece contributes so that one full period [0,π/2] gives π/2 for the sine-squared integral alone.
- 36π spans 72 periods of length π/2; total integral =72×π/2=36π.
- (1/π)×36π=36.
✓Final answerThe value is 36.
- 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.
- f(0)+f(1)=310+311=321=7.
Watch outEvaluate the absolute values carefully for the specific x-range [0,1] at each α — e.g. at α=0, ∣0⋅x−5∣=5 (not 0), a slip that would silently change the whole answer.
✓Final answerThe correct option is (B) 7.
- 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:
∫0rx∣sinπx∣dx=π1+3+5+⋯+(2r−1)=πr2
- So π⋅∫0rx∣sinπx∣dx=π⋅πr2=r2, and r2=r for positive integer r.
- The required sum is therefore simply ∑r=120r=220×21=210.
Watch outDon't try to brute-force each integral separately for all 20 values of r — recognizing the r2/π closed form (and that the π and square root exactly cancel to leave r) is what makes this tractable.
✓Final answerThe value is 210.
- 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.
- [0,1): [x]=0; now sinx∈[0,0.84)⇒[sinx]=0, cosx∈(0.54,1)⇒[cosx]=0 — denominator 3. Integrand =12(3)/3=12. Length =1.
- [1,π/2]: [x]=1; same denominator 3 (a.e.). Integrand =12(4)/3=16. Length =π/2−1.
- Total =6(π/2−1)+12+12+16(π/2−1)=(6+16)(π/2−1)+24=22(π/2−1)+24=11π−22+24=11π+2.
✓Final answerThe correct option is (C).
🎓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.