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 30 on this concept.
- AP EAPCET 2021Set eng-2021-08-23-FN1 markMCQQ.∫−11x∣x∣dx= (A) 1 (B) −1 (C) 0 (D) 21
›Reveal solutionSolution
∣x∣/x is simply ±1 depending on the sign of x, an odd function, so its integral over a symmetric interval is zero.
Concept and Intuition
The function f(x)=∣x∣/x=sgn(x) takes the constant value −1 on (−1,0) and +1 on (0,1). This makes f an odd function about x=0 (aside from the removable point at x=0 itself, which doesn't affect the integral), so integrating over the symmetric interval [−1,1] gives exactly zero — the negative area on the left cancels the positive area on the right.
Step-by-Step Solution
- For x∈(−1,0): ∣x∣=−x, so ∣x∣/x=−x/x=−1.
- For x∈(0,1): ∣x∣=x, so ∣x∣/x=x/x=1.
- ∫−11x∣x∣dx=∫−10(−1)dx+∫01(1)dx.
- ∫−10(−1)dx=−1⋅[0−(−1)]=−1.
- ∫01(1)dx=1⋅[1−0]=1.
- Sum: −1+1=0.
Common Mistakes
- Treating ∣x∣/x as ∣x∣ (forgetting the sign flip for negative x) and getting a nonzero answer.
- Ignoring that the function is undefined exactly at x=0, which is a single point and doesn't affect the definite integral's value.
✓Final answerThe correct option is (C) — 0.
ANSWER: C
- AP EAPCET 2024Set eng-2024-05-21-AN1 markMCQQ.∫15(∣x−3∣+∣1−x∣)dx= (A) 4 (B) 8 (C) 12 (D) 24
›Reveal solutionSolution
Splitting [1,5] at x=3 and removing the absolute values gives a total of 12.
Concept and Intuition
To integrate a sum of absolute values, split the domain at each point where an inner expression changes sign, then integrate the resulting piecewise-linear (constant-slope) function directly.
Step-by-Step Solution
- On [1,5]: ∣1−x∣=x−1 throughout (since x≥1).
- ∣x−3∣=3−x for x∈[1,3], and =x−3 for x∈[3,5].
- On [1,3]: integrand =(3−x)+(x−1)=2. Integral =2×(3−1)=4.
- On [3,5]: integrand =(x−3)+(x−1)=2x−4. Integral =[x2−4x]35=(25−20)−(9−12)=5+3=8.
- Total =4+8=12.
Common Mistakes
- Forgetting to split at x=3 and integrating ∣x−3∣ with a single fixed sign over the whole interval.
- Arithmetic slip evaluating [x2−4x] at the endpoints.
✓Final answerThe correct option is (C) — 12.
ANSWER: C
- AP EAPCET 2024Set eng-2024-05-20-FN1 markMCQQ.∫−33∣2−x∣dx= (A) 12 (B) 16 (C) 13 (D) 25
›Reveal solutionSolution
Split the absolute-value integral at the point where the expression inside changes sign, then integrate each piece.
Concept and Intuition
∣2−x∣ equals 2−x when x<2 and x−2 when x>2. Since the sign-change point x=2 lies inside [−3,3], the integral must be split there before integrating.
Step-by-Step Solution
- ∫−33∣2−x∣dx=∫−32(2−x)dx+∫23(x−2)dx.
- First piece: ∫−32(2−x)dx=[2x−2x2]−32=(4−2)−(−6−4.5)=2−(−10.5)=12.5.
- Second piece: ∫23(x−2)dx=[2x2−2x]23=(4.5−6)−(2−4)=(−1.5)−(−2)=0.5.
- Total =12.5+0.5=13.
Common Mistakes
- Integrating ∣2−x∣ as if it were 2−x throughout the whole interval, ignoring the sign change at x=2.
- Arithmetic slip evaluating the quadratic antiderivative at the negative limit x=−3.
✓Final answerThe correct option is (C) — 13.
ANSWER: C
- AP EAPCET 2021Set eng-2021-08-19-FN1 markMCQQ.∫24{∣x−2∣+∣x−3∣}dx= (A) 1 (B) 2 (C) 3 (D) 4
›Reveal solutionSolution
Break the integral at x=3, the point where the second absolute value flips sign; the two pieces integrate to 1 and 2, totalling 3.
Concept and Intuition
For definite integrals with absolute values, identify all the points inside the range where the expressions inside the absolute values change sign, split the interval there, and remove the absolute values piecewise.
Step-by-Step Solution
- On [2,4], ∣x−2∣=x−2 throughout since x≥2. But ∣x−3∣ changes sign at x=3.
- For 2≤x≤3: ∣x−3∣=3−x. Sum: (x−2)+(3−x)=1.
- For 3≤x≤4: ∣x−3∣=x−3. Sum: (x−2)+(x−3)=2x−5.
- Compute ∫231dx=[x]23=1.
- Compute ∫34(2x−5)dx=[x2−5x]34=(16−20)−(9−15)=−4−(−6)=2.
- Add: 1+2=3.
Common Mistakes
- Forgetting to split the interval at x=3 and integrating ∣x−3∣ as if it had one sign throughout.
- Arithmetic slip evaluating x2−5x at the limits.
✓Final answerThe correct option is (C) — 3.
ANSWER: C
- AP EAPCET 2026Set eng-2026-05-14-AN1 markMCQQ.∫1/ee2xlogexdx= (A) 23 (B) 25 (C) 2 (D) 3
›Reveal solutionSolution
Since logx changes sign at x=1 within the interval [1/e,e2], the absolute value forces splitting the integral there; substituting u=logx turns each piece into a trivial polynomial integral, totaling 5/2.
Concept and Intuition
xlogx is not simply xlogx throughout [1/e,e2] because logx is negative on (1/e,1) and positive on (1,e2). So the absolute value must be resolved by splitting the integral at the sign-change point x=1, and on each sub-interval the substitution u=logx (with du=dx/x) makes the integral immediate.
Step-by-Step Solution
- Note logx<0 for x∈(1/e,1) and logx>0 for x∈(1,e2), with logx=0 at x=1.
- Split: ∫1/ee2xlogxdx=∫1/e1(−xlogx)dx+∫1e2xlogxdx.
- Substitute u=logx, du=dx/x. Limits: x=1/e⇒u=−1; x=1⇒u=0; x=e2⇒u=2.
- First piece: ∫−10(−u)du=[−2u2]−10=0−(−21)=21.
- Second piece: ∫02udu=[2u2]02=2.
- Total =21+2=25.
Common Mistakes
- Integrating logx/x directly over the whole interval without splitting at x=1, which gives the wrong (too small, possibly even sign-cancelled) value.
- Sign error in the first piece — forgetting the extra minus sign needed since logx is negative there.
✓Final answerThe correct option is (B) — 25.
ANSWER: B
- AP EAPCET 2026Set eng-2026-05-15-FN1 markMCQQ.∫0π∣xcos2x∣dx= (A) π (B) π−2 (C) π+41 (D) π−41
›Reveal solutionSolution
Split the interval at the zeros of cos2x (at x=π/4,3π/4) and flip the sign of the middle piece to handle the absolute value, then use integration by parts on xcos2x. Answer: π.
Concept and Intuition
To integrate ∣f(x)∣, first find where f changes sign inside the interval, then integrate f (or −f) piecewise so the result is always non-negative on each piece. Here x≥0 throughout, so the sign of xcos2x tracks the sign of cos2x alone.
Step-by-Step Solution
- cos2x=0 at 2x=π/2,3π/2⇒x=π/4,3π/4 inside [0,π]. cos2x>0 on [0,π/4) and (3π/4,π]; cos2x<0 on (π/4,3π/4).
- So ∫0π∣xcos2x∣dx=∫0π/4xcos2xdx−∫π/43π/4xcos2xdx+∫3π/4πxcos2xdx.
- By parts: ∫xcos2xdx=2xsin2x+4cos2x+C=F(x).
- Evaluate: F(0)=0+41=41; F(π/4)=2(π/4)(1)+0=8π; F(3π/4)=2(3π/4)(−1)+0=−83π; F(π)=0+41=41.
- Total =[F(π/4)−F(0)]−[F(3π/4)−F(π/4)]+[F(π)−F(3π/4)] =(8π−41)−(−83π−8π)+(41+83π) =(8π−41)+2π+(41+83π) =8π+2π+83π=π (the −41,+41 terms cancel).
Common Mistakes
- Forgetting to flip the sign of the middle integral (over (π/4,3π/4)) where cos2x<0.
- Sign slips in evaluating F at 3π/4 where sin(3π/2)=−1.
✓Final answerThe correct option is (A) — π.
ANSWER: A
- AP EAPCET 2025Set eng-2025-05-26-FN1 markMCQQ.If f(x)=Max{x3−4,x4−4}, and g(x)=Min{x2,x3}, then ∫−11(f(x)−g(x))dx= (A) −20151 (B) 209 (C) 22131 (D) −967
›Reveal solutionSolution
This tests locating where two power functions cross on [−1,1] to convert a max/min piecewise definition into an ordinary integral, then a clean simplification kills g's contribution entirely.
Concept and Intuition
For max/min of two functions, find where their difference changes sign — that tells you which one is larger on each sub-interval. Here x4−x3=x3(x−1) and x2−x3=x2(1−x) each factor cleanly, revealing that g(x)=min(x2,x3)=x3 on the entire interval [−1,1] — a nice simplification that removes the need to split g at all.
Step-by-Step Solution
- Simplify g: x2−x3=x2(1−x)≥0 for all x∈[−1,1] (since x2≥0 and 1−x≥0 there), so x3≤x2 throughout, meaning g(x)=x3 on all of [−1,1].
- So ∫−11g(x)dx=∫−11x3dx=0 (odd function over a symmetric interval).
- Simplify f: x4−x3=x3(x−1). For x∈[−1,0): x3<0, x−1<0⇒ product >0⇒x4>x3, so max=x4−4. For x∈(0,1): x3>0, x−1<0⇒ product <0⇒x4<x3, so max=x3−4.
- ∫−10(x4−4)dx=[5x5−4x]−10=0−(−51+4)=51−4=−519.
- ∫01(x3−4)dx=[4x4−4x]01=41−4=−415.
- ∫−11(f−g)dx=∫fdx−0=−519−415=−2076−2075=−20151.
Common Mistakes
- Assuming max(x3,x4) switches at x=0 and x=1 symmetric to min(x2,x3) without actually checking sign of the difference.
- Forgetting the −4 constant carries through the max/min unchanged (since it's added to both branches equally).
✓Final answerThe correct option is (A) — −20151.
ANSWER: A
- AP EAPCET 2022Set eng-2022-07-04-AN1 markMCQQ.∫π/45π/4(∣cost∣sint+∣sint∣cost)dt= (A) 0 (B) 1 (C) 1/2 (D) 3/2
›Reveal solutionSolution
Breaking the integral at the sign-change points of sint and cost shows the middle piece vanishes and the two outer pieces exactly cancel, giving 0.
Concept and Intuition
Absolute values force us to split the integration range wherever sint or cost changes sign, since ∣cost∣ and ∣sint∣ are piecewise expressions of cost and sint (with a sign flip) on each sub-interval.
Step-by-Step Solution
- On [π/4,π/2]: cost≥0, sint≥0, so ∣cost∣sint+∣sint∣cost=2sintcost=sin2t. ∫π/4π/2sin2tdt=[−21cos2t]π/4π/2=(−21cosπ)−(−21cos2π)=21−0=21.
- On [π/2,π]: cost≤0, sint≥0, so ∣cost∣=−cost, ∣sint∣=sint; integrand =−costsint+sintcost=0. Contribution: 0.
- On [π,5π/4]: cost≤0, sint≤0, so ∣cost∣=−cost, ∣sint∣=−sint; integrand =−costsint−sintcost=−sin2t. ∫π5π/4(−sin2t)dt=[21cos2t]π5π/4=21cos25π−21cos2π=0−21=−21.
- Total: 21+0−21=0.
Common Mistakes
- Not splitting the interval at π/2 and π where the signs of sint,cost change, leading to a wrong single antiderivative over the whole range.
- Sign slips when writing ∣cost∣=−cost vs cost on each piece.
✓Final answerThe correct option is (A) — 0.
ANSWER: A
- AP EAPCET 2023Set eng-2023-05-16-FN1 markMCQQ.f(x)={x2,x,0≤x<11≤x≤2⇒∫02f(x)dx= (A) 342−1 (B) 342+1 (C) 642−1 (D) 642+1
›Reveal solutionSolution
Split the integral at the point where the piecewise definition changes (x=1) and integrate each piece separately.
Concept and Intuition
For a piecewise-defined function, ∫abf=∫acf+∫cbf whenever c is the breakpoint — additivity of the definite integral over adjacent intervals.
Step-by-Step Solution
- ∫01x2dx=[3x3]01=31.
- ∫12xdx=[32x3/2]12=32(23/2−1)=32(22−1)=342−2.
- Sum: 31+342−2=31+42−2=342−1.
Common Mistakes
- Forgetting that 23/2=22, not 2 or 42.
- Using the wrong piece of the definition on the wrong sub-interval.
✓Final answerThe correct option is (A) — 342−1.
ANSWER: A
- AP EAPCET 2021Set eng-2021-08-23-AN1 markMCQQ.The area enclosed by the curves y=x∣x∣, x=−1 and x=1 is ______ sq. units. (A) 23 (B) 32 (C) 35 (D) 37
›Reveal solutionSolution
Split the piecewise curve y=x∣x∣ at x=0; each half contributes an area of 1/3, giving a total of 2/3.
Concept and Intuition
y=x∣x∣ is an odd, S-shaped curve: it behaves like y=x2 (above the axis) for x>0 and like y=−x2 (below the axis) for x<0. The AREA enclosed (as opposed to the signed integral, which would cancel to zero) must be computed by taking the magnitude on each piece.
Step-by-Step Solution
- For x∈[0,1]: y=x⋅x=x2≥0, so the region lies above the axis; area =∫01x2dx=31.
- For x∈[−1,0]: y=x⋅(−x)=−x2≤0, so the region lies below the axis; area (magnitude) =∫−10x2dx=31.
- Total enclosed area =31+31=32.
Common Mistakes
- Directly integrating ∫−11x∣x∣dx without splitting — since the function is odd, this signed integral is 0, which is NOT the enclosed area.
✓Final answerThe correct option is (B) — 32.
ANSWER: B
- AP EAPCET 2023Set eng-2023-05-18-FN1 markMCQQ.If ∫02π∣xsinx∣dx=kπ, then k= (A) 1 (B) 2 (C) 3 (D) 4
›Reveal solutionSolution
Splitting the interval where sinx changes sign and integrating xsinx by parts on each piece gives total 4π, so k=4.
Concept and Intuition
The factor x>0 throughout (0,2π) doesn't change sign, so xsinx has the same sign as sinx: positive on (0,π), negative on (π,2π). To handle the absolute value, split the integral at x=π and flip the sign of the integrand on the second piece.
Step-by-Step Solution
- ∣xsinx∣=xsinx on (0,π) (both factors non-negative there) and ∣xsinx∣=−xsinx on (π,2π) (since sinx<0 there but x>0).
- Antiderivative (integration by parts): ∫xsinxdx=−xcosx+sinx+C.
- Evaluate on (0,π): [−xcosx+sinx]0π=(−πcosπ+sinπ)−(0+0)=(−π(−1)+0)−0=π.
- Evaluate on (π,2π): [−xcosx+sinx]π2π=(−2πcos2π+sin2π)−(−πcosπ+sinπ)=(−2π(1)+0)−(−π(−1)+0)=−2π−π=−3π.
- So ∫π2πxsinxdx=−3π, which means ∫π2π(−xsinx)dx=3π.
- Total: ∫02π∣xsinx∣dx=π+3π=4π. So k=4.
Common Mistakes
- Not splitting the domain at the sign-change point of sinx and integrating xsinx over the whole range directly (which would give a much smaller, wrong value due to cancellation).
- Arithmetic slip evaluating cosπ=−1, cos2π=1.
✓Final answerThe correct option is (D) — 4.
ANSWER: D
- AP EAPCET 2025Set eng-2025-05-21-AN1 markMCQQ.The area of the region (in sq. units) enclosed between the curves y=∣x∣, y=[x] and the ordinates x=−1,x=0,x=1 is (A) 2 (B) 23 (C) 3 (D) 25
›Reveal solutionSolution
Split the region into [−1,0] and [0,1], using [x]=−1 on the first (non-integer negative x) and [x]=0 on the second, then integrate ∣ytop−ybottom∣ on each piece. Answer: 2.
Concept and Intuition
The floor function [x] is piecewise constant, jumping at each integer. Between x=−1 and x=0 (excluding the endpoint 0), every value of x is a non-integer negative number, so [x]=−1 throughout. Between x=0 and x=1 (excluding 1), [x]=0 throughout. This lets us treat [x] as two separate constants on the two sub-intervals and just integrate the vertical gap between ∣x∣ and that constant.
Step-by-Step Solution
- On [−1,0]: ∣x∣=−x, ranging from 1 (at x=−1) down to 0 (at x=0). Also [x]=−1 for all x∈[−1,0) (and at x=−1 itself, [x]=−1). Since −x≥−1 throughout this interval, the enclosed strip has height (−x)−(−1)=1−x.
∫−10(1−x)dx=[x−2x2]−10=0−(−1−21)=23.
- On [0,1]: ∣x∣=x, ranging from 0 to 1. Also [x]=0 for all x∈[0,1). Height =x−0=x.
∫01xdx=[2x2]01=21.
- Total enclosed area =23+21=2.
Common Mistakes
- Using [x]=0 on the whole interval [−1,1] instead of correctly switching to [x]=−1 for negative non-integer x.
- Sign errors when computing (−x)−(−1)=1−x on the negative side.
✓Final answerThe correct option is (A) — 2.
ANSWER: A
🎓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.