Q.Evaluate ∫−13/2∣xsin(πx)∣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 absolute value forces a split wherever xsin(πx) changes sign on [−1,23].
Sign of xsin(πx):
- On (−1,0): x<0 and sin(πx)<0, so the product is positive.
- On (0,1): x>0 and sin(πx)>0, so positive.
- On (1,23): x>0 and sin(πx)<0, so negative.
Hence ∣xsinπx∣=xsinπx on [−1,1] and =−xsinπx on [1,23].
Antiderivative (by parts): with u=x, dv=sin(πx)dx,
G(x)=∫xsin(πx)dx=−πxcosπx+π2sinπx.
Values: G(−1)=−π1, G(0)=0, G(1)=π1, G(23)=−π21.
Pieces: …
Split by the sign of xsin(πx) on [−1,23], integrate each piece by parts, and add. The value is π3+π21.
Intuition
An absolute value can never be integrated with one formula across a sign change — ∣f∣ equals f where f≥0 and −f where f≤0. So the first job is to track the sign of xsin(πx) across [−1,23].
Step 1 — Sign analysis
Look at the two factors on each subinterval (note sin(πx)=0 at the integers x=−1,0,1):
- (−1,0): x<0; and πx∈(−π,0) so sin(πx)<0. Negative × negative = positive.
- (0,1): x>0; and πx∈(0,π) so sin(πx)>0. Positive.
- (1,23): x>0; and πx∈(π,23π) so sin(πx)<0. Negative.
Therefore
∣xsinπx∣={xsinπx,−xsinπx,−1≤x≤1,1≤x≤23.
Step 2 — An antiderivative of xsin(πx)
Integrate by parts with u=x (so du=dx) and dv=sin(πx)dx (so v=−πcosπx):
G(x)=∫xsin(πx)dx=−πxcosπx+π1∫cosπxdx=−πxcosπx+π2sinπx.
Evaluate at the break points (using cos(−π)=cosπ=−1, cos23π=0, sin23π=−1):
G(−1)=−π(−1)(−1)+0=−π1,G(0)=0, …
Method: Integrating an absolute value — split at the sign changes
Use this for any ∫ab∣f(x)∣dx. An absolute value has no single antiderivative across a sign change, so you must break the interval where f changes sign and integrate each piece with the correct sign.
Steps
Step 1: Find where the inside changes sign.
Solve f(x)=0 inside [a,b] and determine the sign of f on each resulting subinterval (test a point, or reason factor-by-factor — e.g. for xsin(πx) track the signs of x and of sin(πx) separately).
Step 2: Rewrite ∣f∣ piecewise.
On subintervals where f≥0, ∣f∣=f; where f≤0, ∣f∣=−f. This converts the modulus into ordinary signed integrals.
Step 3: Find one antiderivative of f (here by parts). …
Common Mistakes
Mistake 1: Integrating ∣xsinπx∣ as if it were xsinπx over the whole interval.
Why it's wrong: the product changes sign at x=1 inside [−1,23], so a single antiderivative undercounts the area (the negative part subtracts instead of adding). Correct approach: split at every sign change and flip the sign where the inside is negative.
Mistake 2: Getting the sign wrong on (−1,0).
Why it's wrong: there x<0 and sin(πx)<0, so the product is positive (negative times negative); assuming it is negative flips a piece. Correct approach: check the sign of both factors on each subinterval. …
Showing the 12 most recent of 15 on this concept.
- KEAM 2022Set eng-2022-P2-B14 marksMCQQ.The value of ∫−12(x−2∣x∣)dx is equal to (A) 2−1 (B) 2−3 (C) 2−5 (D) 2−7 (E) 2−9
›Reveal solutionSolution
The integral equals −27.
Concept and Intuition
The absolute value forces a split of the domain at x=0, where ∣x∣ changes formula.
Step-by-Step Solution
- For x<0: ∣x∣=−x, so x−2∣x∣=x+2x=3x.
- For x≥0: ∣x∣=x, so x−2∣x∣=x−2x=−x.
- ∫−103xdx=3[2x2]−10=3(0−21)=−23.
- ∫02(−x)dx=−[2x2]02=−2. …
- KEAM 2026Set eng-2026-04224 marksMCQQ.The value of ∫−21x∣x∣dx is equal to (A) −1 (B) −2 (C) 1 (D) 2 (E) 3
›Reveal solutionSolution
Split at 0 since ∣x∣/x=−1 for x<0 and +1 for x>0.
For x<0, x∣x∣=−1; for x>0, x∣x∣=+1. …
- KEAM 2024Set eng-2024-06074 marksMCQQ.The value of ∫03∣x−2∣dx is equal to (A) 32 (B) 23 (C) 25 (D) 52 (E) 29
›Reveal solutionSolution
Split the absolute value at x=2 and integrate each piece.
For 0≤x≤2, ∣x−2∣=2−x; for 2≤x≤3, ∣x−2∣=x−2:
∫02(2−x)dx=[2x−2x2]02=4−2=2, …
- KEAM 2025Set eng-2025-04254 marksMCQQ.The value of ∫−11∣x−3∣dx is equal to (A) 5 (B) 6 (C) −5 (D) −6 (E) 0
›Reveal solutionSolution
Since x−3<0 on [−1,1], replace ∣x−3∣ with 3−x and integrate.
For x∈[−1,1], x−3<0, so ∣x−3∣=3−x. Then …
- KEAM 2025Set eng-2025-04264 marksMCQQ.∫−22∣x+3∣dx= (A) 14 (B) 16 (C) 8 (D) 10 (E) 12
›Reveal solutionSolution
x+3>0 throughout [−2,2], so drop the absolute value and integrate.
For x∈[−2,2], x+3≥1>0, hence ∣x+3∣=x+3. …
- KEAM 2026Set eng-2026-04184 marksMCQQ.The value of ∫033x2−3dx is equal to (A) 16 (B) 18 (C) 20 (D) 22 (E) 24
›Reveal solutionSolution
Split at x=1 where x2−1 changes sign; the two pieces give 3⋅322=22.
Write ∫03∣3x2−3∣dx=3∫03∣x2−1∣dx. Since x2−1<0 on [0,1] and >0 on [1,3]:
∫01(1−x2)dx=[x−3x3]01=1−31=32, …
- KEAM 2022Set eng-2022-P2-B14 marksMCQQ.If f(x)={cosx2xfor x≥0for x<0, then the value of ∫−2π/2f(x)dx is equal to (A) 2 (B) −2 (C) −3 (D) 3 (E) 0
›Reveal solutionSolution
The integral equals −3.
Concept and Intuition
The piecewise function splits the integral at x=0, using 2x below and cosx above.
Step-by-Step Solution
- Split at 0: ∫−2π/2f=∫−202xdx+∫0π/2cosxdx.
- ∫−202xdx=[x2]−20=0−4=−4.
- ∫0π/2cosxdx=[sinx]0π/2=1−0=1.
- Total =−4+1=−3. …
- KEAM 2025Set eng-2025-04284 marksMCQQ.The value of ∫13[x−1]dx, where [x] denotes the greatest integer function in x, is equal to (A) −2 (B) −1 (C) 0 (D) 1 (E) 2
›Reveal solutionSolution
Split at x=2: [x−1]=0 on [1,2) and =1 on [2,3), giving 0+1=1.
For x∈[1,2), x−1∈[0,1) so [x−1]=0. For x∈[2,3), x−1∈[1,2) so [x−1]=1. Thus …
- KEAM 2024Set eng-2024-06084 marksMCQQ.∫−24x2∣x∣dx is equal to (A) 72 (B) 68 (C) 64 (D) 48 (E) 37
›Reveal solutionSolution
x2∣x∣=−x3 for x<0 and x3 for x>0; the two parts give 4+64=68.
Split the integral at x=0 where ∣x∣ changes form:
∫−24x2∣x∣dx=∫−20x2(−x)dx+∫04x2(x)dx=∫−20(−x3)dx+∫04x3dx.
Evaluate each: …
- KEAM 2023Set eng-2023-P2-B24 marksMCQQ.Let f:R→R be defined by f(x)={x−x+2if x≤1if x>1 Then ∫02f(x)dx= (A) 2π (B) 1 (C) 2 (D) 4 (E) 6π
›Reveal solutionSolution
∫02f(x)dx=1.
Concept and Intuition
Split the integral at the junction x=1 where the definition changes.
Step-by-Step Solution
- ∫01xdx=[2x2]01=21.
- ∫12(−x+2)dx=[−2x2+2x]12=(2)−(1.5)=21.
- Total =21+21=1.
Common Mistakes …
- KEAM 2025Set eng-2025-04274 marksMCQQ.If [x] is the greatest integer less than or equal to x, then ∫−33[x]dx= (A) −3 (B) −6 (C) −4 (D) −2 (E) 0
›Reveal solutionSolution
Integrating the step function [x] over [−3,3] gives −3−2−1+0+1+2=−3.
The greatest-integer function [x] is constant on each unit interval:
[x]=−3 on [−3,−2), −2 on [−2,−1), −1 on [−1,0),
[x]=0 on [0,1), 1 on [1,2), 2 on [2,3). …
- KEAM 2024Set eng-2024-06054 marksMCQQ.If [x2] is the greatest integer less than or equal to x2, then ∫02[x2]dx= (A) 2 (B) 2 (C) 2−1 (D) 2+1 (E) 22+1
›Reveal solutionSolution
Split at x=1: the integrand is 0 up to 1 and 1 from 1 to 2, giving area 2−1.
For 0≤x<1, x2∈[0,1) so [x2]=0.
For 1≤x<2, x2∈[1,2) so [x2]=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.