Q.By using the properties of definite integrals, evaluate the integral ∫28∣x−5∣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 creates a piecewise expression, so we split the integral at the point where the expression inside changes sign.
Step 1: Find where x−5=0. This gives x=5, which lies inside the interval [2,8].
Step 2: Write ∣x−5∣ as a piecewise function:
∣x−5∣={−(x−5)=5−x,x−5,2≤x≤55≤x≤8
Step 3: Split and evaluate the integral:
∫28∣x−5∣dx=∫25(5−x)dx+∫58(x−5)dx
Compute each: …
The integral ∫28∣x−5∣dx is evaluated by splitting the interval at the point where the expression inside the absolute value changes sign, x=5. The result is 9.
The absolute value function ∣x−5∣ is not a simple polynomial — it has a sharp corner at x=5. This means the function behaves differently on either side of that point. For x<5, the expression x−5 is negative, so ∣x−5∣=−(x−5)=5−x. For x≥5, it is non-negative, so ∣x−5∣=x−5.
Because the integrand changes its algebraic form at x=5, we cannot integrate it as a single expression from 2 to 8. Instead, we split the integral at the point where the definition changes. This is a standard technique: whenever you see an absolute value inside a definite integral, locate where the expression inside becomes zero, and break the integral there.
Here is the step-by-step solution:
-
Find the splitting point.
Set x−5=0, which gives x=5. This point lies inside the interval [2,8], so we must split the integral at x=5.
-
Write the piecewise definition of ∣x−5∣.
∣x−5∣={5−x,x−5,if x≤5if x≥5
- Split the integral at x=5.
∫28∣x−5∣dx=∫25(5−x)dx+∫58(x−5)dx
- Evaluate the first integral.
∫25(5−x)dx=[5x−2x2]25
At x=5: 5(5)−225=25−12.5=12.5
At x=2: 5(2)−24=10−2=8
Subtract: 12.5−8=4.5
- Evaluate the second integral.
∫58(x−5)dx=[2x2−5x]58
At x=8: 264−40=32−40=−8
At x=5: 225−25=12.5−25=−12.5
Subtract: (−8)−(−12.5)=−8+12.5=4.5
- Add the two results. …
Method: Integrating an absolute value — split where the inside changes sign
∣expression∣ is a piecewise function, so break the interval at the point where the inside is zero and integrate each piece with the correct sign.
Steps
Step 1: Find the break point.
Solve inside=0. If that value lies inside the limits, it is the split point; if it lies outside, no split is needed.
Step 2: Write the piecewise definition.
∣x−k∣={−(x−k),x−k,x<kx≥k. …
Common Mistakes
Mistake 1: Forgetting to split at x=5.
Why it's wrong: ∣x−5∣ is piecewise about x=5; integrating x−5 straight from 2 to 8 gives 0, which is clearly wrong for a positive area. Correct approach: split into ∫25(5−x)+∫58(x−5).
Mistake 2: Using the wrong branch on each side. …
Showing the 12 most recent of 30 on this concept.
- AP EAPCET 2026Set eng-2026-05-13-FN1 markMCQQ.If f(x)=3x−3−x and ∫05f(x)dx=K+35log33n+1, then nK= (A) 346 (B) 623 (C) 554 (D) 928
›Reveal solutionSolution
This tests splitting a modulus integral at its sign-change point and matching the result to a given algebraic form; the answer is nK=346.
Concept and Intuition
f(x)=3x−3−x is the absolute value of g(x)=3x−3−x. To integrate an absolute value, we must find where g changes sign and split the integral there — inside each sub-interval f equals +g or −g depending on the sign.
Step-by-Step Solution
- Find the zero of g(x)=3x−3−x: try x=1: 31−3−1=31−31=0. So x=1 is the crossing point.
- g′(x)=31+3−xlog3>0 always, so g is strictly increasing — it is negative on [0,1) and positive on (1,5], with exactly one crossing.
- So ∫05fdx=∫01(−g)dx+∫15gdx.
- Antiderivative: ∫gdx=∫(3x−3−x)dx=6x2+log33−x=G(x).
- ∫01(−g)dx=−(G(1)−G(0))=−[(61+3ln31)−(0+ln31)]=3ln32−61.
- ∫15gdx=G(5)−G(1)=(625+ln33−5)−(61+3ln31)=4+ln32431−31=4−243ln380. …
- 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 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 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. …
- AP EAPCET 2025Set eng-2025-05-26-FN1 markMCQQ.∫−π/2π/2sin(x−[x])dx= (Here [x] is the greatest integer function) (A) 0 (B) 3(1−cos1)+sin2−sin1 (C) 3(1−cos1)+cos2−sin1 (D) cos2−sin2
›Reveal solutionSolution
This tests handling the greatest-integer function inside an integral by splitting the domain at every integer inside it, then integrating a plain shifted sine on each piece.
Concept and Intuition
[x] (floor of x) is constant on each interval between consecutive integers, and jumps by 1 at every integer. So over [−π/2,π/2]≈[−1.57,1.57], the integers −1,0,1 split the domain into four sub-intervals, and on each one x−[x] is just x shifted by a constant, so sin(x−[x]) becomes an ordinary sine we can integrate directly.
Step-by-Step Solution
- Break the domain: [−π/2,−1],[−1,0],[0,1],[1,π/2], with [x]=−2,−1,0,1 respectively, so x−[x]=x+2,x+1,x,x−1.
- I1=∫−π/2−1sin(x+2)dx=[−cos(x+2)]−π/2−1=−cos1+cos(2−2π)=−cos1+sin2 (using cos(2−2π)=sin2).
- I2=∫−10sin(x+1)dx=[−cos(x+1)]−10=−cos1+cos0=1−cos1.
- I3=∫01sinxdx=1−cos1. …
- 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 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 2024Set eng-2024-05-20-AN1 markMCQQ.If [x] is the greatest integer function, then ∫05[x]dx= (A) 15 (B) 2 (C) 3 (D) 10
›Reveal solutionSolution
The greatest-integer function is piecewise constant on each unit interval; summing the constant values times width 1 gives 10 — (D).
Concept and Intuition
[x] (the floor function) takes the constant integer value n throughout [n,n+1). Integrating it over [0,5] is therefore just a sum of rectangle areas, each of width 1 and height equal to the integer part on that strip.
Step-by-Step Solution
- On [0,1): [x]=0, contributes 0×1=0.
- On [1,2): [x]=1, contributes 1×1=1.
- On [2,3): [x]=2, contributes 2×1=2.
- On [3,4): [x]=3, contributes 3×1=3.
- On [4,5): [x]=4, contributes 4×1=4.
- Sum: 0+1+2+3+4=10.
Common Mistakes …
- 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-21-FN1 markMCQQ.If f(x)=⎩⎨⎧4x3+2x+36x2+1,x2+1,0<x<11≤x<2 then ∫02f(x)dx= (A) 21log3+310 (B) 21log3−310 (C) 21log3+313 (D) 21log3+320
›Reveal solutionSolution
Split the definite integral at the piecewise boundary x=1; the first piece is a disguised logarithmic derivative, the second is a simple polynomial integral.
Concept and Intuition
The numerator 6x2+1 is exactly half the derivative of the denominator 4x3+2x+3 (since dxd(4x3+2x+3)=12x2+2=2(6x2+1)), so that piece integrates directly to a logarithm — no partial fractions needed.
Step-by-Step Solution
- ∫02f(x)dx=∫014x3+2x+36x2+1dx+∫12(x2+1)dx.
- Since dxd(4x3+2x+3)=12x2+2=2(6x2+1): ∫014x3+2x+36x2+1dx=21[log(4x3+2x+3)]01=21[ln9−ln3]=21ln3. …
- AP EAPCET 2024Set eng-2024-05-21-FN1 markMCQQ.If ∫1n[x]dx=120, then n= (A) 15 (B) 16 (C) 14 (D) 12
›Reveal solutionSolution
The floor function is constant on each unit interval, turning the integral into a simple triangular-number sum; solve the resulting quadratic for n.
Concept and Intuition
On each interval [k,k+1), [x]=k, so integrating the floor function from 1 to an integer n just adds up k×1 for k=1,…,n−1 — a sum of consecutive integers, which is a well-known triangular number.
Step-by-Step Solution
- ∫1n[x]dx=k=1∑n−1∫kk+1kdx=k=1∑n−1k=2(n−1)n.
- Set equal to 120: 2n(n−1)=120⇒n2−n−240=0. …
- 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.