Q.Evaluate the definite integral ∫14[∣x−1∣+∣x−2∣+∣x−3∣]dx
🔒You're viewing a preview — the full solution, concept, methods & PYQ mapping are locked.
🔒 Start your 14-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 is piecewise linear, so we split the interval [1,4] at the points where the expressions inside the absolute values change sign: x=1, x=2, and x=3.
Step 1: Write the piecewise definitions.
On [1,4]:
- ∣x−1∣=x−1 (since x≥1).
- ∣x−2∣={2−x,x−2,1≤x<22≤x≤4.
- ∣x−3∣={3−x,x−3,1≤x<33≤x≤4.
Step 2: Split the integral into three subintervals.
∫14=∫12+∫23+∫34
Step 3: Evaluate each part.
- On [1,2]: integrand = (x−1)+(2−x)+(3−x)=4−x. ∫12(4−x)dx=[4x−2x2]12=(8−2)−(4−0.5)=6−3.5=2.5.
- On [2,3]: integrand = (x−1)+(x−2)+(3−x)=x. …
The integral of a sum of absolute values is best handled by splitting the domain at each point where an expression inside an absolute value changes sign. For x∈[1,4], the integrand simplifies to a piecewise linear function, and the integral evaluates to 219.
We need to evaluate
∫14(∣x−1∣+∣x−2∣+∣x−3∣)dx.
The key idea: an absolute value ∣x−a∣ is a piecewise linear function — it equals x−a when x≥a, and a−x when x≤a. So the whole integrand changes its algebraic form at each of the points x=1, x=2, and x=3. Since our integration limits are from 1 to 4, we must split the interval [1,4] into subintervals where each absolute value has a fixed sign.
Let’s list the breakpoints in order: 1, 2, 3. That gives us three subintervals to consider: [1,2], [2,3], and [3,4]. On each, we rewrite the integrand without absolute values.
-
On [1,2]:
- ∣x−1∣=x−1 (since x≥1)
- ∣x−2∣=2−x (since x≤2)
- ∣x−3∣=3−x (since x≤3; actually x≤2 so definitely x≤3)
So the integrand becomes:
(x−1)+(2−x)+(3−x)=x−1+2−x+3−x=(x−x−x)+(−1+2+3)=−x+4.
-
On [2,3]:
- ∣x−1∣=x−1
- ∣x−2∣=x−2 (since x≥2)
- ∣x−3∣=3−x (since x≤3)
Sum:
(x−1)+(x−2)+(3−x)=x−1+x−2+3−x=(x+x−x)+(−1−2+3)=x+0=x.
-
On [3,4]:
- ∣x−1∣=x−1
- ∣x−2∣=x−2
- ∣x−3∣=x−3 (since x≥3)
Sum:
(x−1)+(x−2)+(x−3)=3x−6.
A common mistake is to forget that ∣x−3∣ changes sign at x=3, not at x=2. Always list all breakpoints in order and check each subinterval separately.
Now the original integral becomes the sum of three definite integrals:
∫14(…)dx=∫12(−x+4)dx+∫23xdx+∫34(3x−6)dx.
Compute each:
- First integral: …
Method: Split the interval at every point where an absolute value changes sign
Use this for ∫pq∑i∣x−ai∣dx: each ∣x−ai∣ is piecewise linear, so break the domain at each ai and remove the bars on each subinterval.
Steps
Step 1: List the breakpoints inside the interval.
Every ∣x−a∣ switches from a−x (when x≤a) to x−a (when x≥a) at x=a. Collect all such ai that lie in [p,q] and order them.
Step 2: Rewrite the integrand without bars on each subinterval. …
Common Mistakes
Mistake 1: Not splitting at every breakpoint.
Why it's wrong: each ∣x−a∣ changes sign at its own a (here 1,2,3); splitting only once misrepresents the integrand. Correct approach: break [1,4] at 2 and 3 (and note 1 is an endpoint).
Mistake 2: Wrong sign on a subinterval. …
Showing the 12 most recent of 30 on this concept.
- 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. …
- 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. …
- 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. …
- 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π. …
- 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. …
- 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)] …
- AP EAPCET 2022Set eng-2022-07-08-FN1 markMCQQ.∫25x+2x−1+x−2x−1dx= (A) 16/3 (B) 32/3 (C) 28/3 (D) 4/3
›Reveal solutionSolution
This tests simplifying nested square roots via a substitution that reveals them as perfect squares, before integrating.
Concept and Intuition
Expressions of the form x±2x−1 simplify beautifully once you set t=x−1, since x=t2+1 turns x±2x−1 into (t±1)2 — a perfect square whose root is just ∣t±1∣.
Step-by-Step Solution
- Let t=x−1, so x=t2+1. Then x+2x−1=t2+1+2t=(t+1)2 and x−2x−1=t2+1−2t=(t−1)2.
- So the integrand becomes ∣t+1∣+∣t−1∣.
- As x ranges over [2,5], t=x−1 ranges over [1,2]. On this range, t+1>0 and t−1≥0, so ∣t+1∣+∣t−1∣=(t+1)+(t−1)=2t=2x−1.
- So the original integral reduces to ∫252x−1dx. …
- 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. …
- AP EAPCET 2022Set eng-2022-07-06-FN1 markMCQQ.If [.] represents greatest integer function, then ∫3π/4π[sinx+[π4x]]dx= (A) π/4 (B) π/2 (C) 3π/4 (D) π
›Reveal solutionSolution
Over [3π/4,π] the greatest-integer term [4x/π] is constantly 3 and sinx stays in [0,1), so the whole integrand is the constant 3, giving 3π/4.
Concept and Intuition
Greatest-integer-function integrals are solved by identifying the sub-intervals on which the bracketed quantity is constant, then integrating that constant over each piece. Here two floor-type effects combine, but they both turn out to be constant on the whole interval, dramatically simplifying the problem.
Step-by-Step Solution
- For x∈[3π/4,π]: at x=3π/4, 4x/π=3; at x=π, 4x/π=4. So 4x/π ranges over [3,4], and [π4x]=3 for all x∈[3π/4,π) (equals 4 only at the single point x=π, which doesn't affect the integral).
- For x∈[3π/4,π], sinx decreases from sin(3π/4)=22≈0.707 down to sinπ=0, so sinx∈[0,22]⊂[0,1).
- Since [4x/π]=3 is an integer, [sinx+3]=3+[sinx]. Because 0≤sinx<1 throughout, [sinx]=0. …
- 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. …
- 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. …
- AP EAPCET 2023Set eng-2023-05-15-FN1 markMCQQ.If [x] is the greatest integer not exceeding x, then ∫−0.51.5x2[x]dx= (A) 44.5 (B) 43 (C) 43.5 (D) 22.375
›Reveal solutionSolution
Splitting the interval according to where the floor function [x] is constant (−1, then 0, then 1), the integral evaluates to 3/4.
Concept and Intuition
The greatest integer function [x] is piecewise constant, jumping at every integer. To integrate any expression containing [x], we must break the interval of integration at each integer point inside it and replace [x] by its constant value on each piece.
Step-by-Step Solution
- The interval is [−0.5,1.5]. The integers inside/bounding it are −1,0,1 (relevant jump points at x=0 and x=1). So split as:
[−0.5,0)∪[0,1)∪[1,1.5]
with [x]=−1, 0, 1 respectively on each piece.
- Compute each piece:
Piece 1 (x∈[−0.5,0), [x]=−1):
∫−0.50x2⋅(−1)dx=−[3x3]−0.50=−(0−3(−0.5)3)=−(0+30.125)=−241
Piece 2 (x∈[0,1), [x]=0):
∫01x2⋅0dx=0
Piece 3 (x∈[1,1.5], [x]=1): …
🎓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.