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 30 on this concept.
- 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-05-FN1 markMCQQ.[ . ] represents greatest integer function, then ∫−11(x[1+sinπx]+1)dx= (A) 1 (B) 2 (C) 5/2 (D) 3/2
›Reveal solutionSolution
Splitting the interval where [1+sinπx] equals 0 versus 1 reduces the integral to two easy pieces, totaling 25.
Concept and Intuition
The greatest integer function [⋅] is piecewise constant, so the key step is figuring out exactly which sub-intervals give which integer value of 1+sinπx, then integrating each piece separately as an ordinary polynomial.
Step-by-Step Solution
- For x∈(−1,0): sinπx∈(−1,0), so 1+sinπx∈(0,1), giving [1+sinπx]=0.
- For x∈(0,1): sinπx∈(0,1], so 1+sinπx∈(1,2]; except exactly at x=21 (where it equals 2), [1+sinπx]=1 throughout — and a single point doesn't affect the integral's value.
- Split the integral: ∫−11(x[1+sinπx]+1)dx=∫−10(0⋅x+1)dx+∫01(1⋅x+1)dx.
- First piece: ∫−101dx=1. …
- 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 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 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 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 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 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 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 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 2023Set eng-2023-05-16-AN1 markMCQQ.∫0π1−sin2xcosxdx= (A) π (B) 2π (C) −2π (D) 0
›Reveal solutionSolution
The integrand simplifies to ±1 depending on the sign of cosx, and the two halves of [0,π] cancel exactly.
Concept and Intuition
1−sin2x=∣cosx∣, not simply cosx, since square roots are always non-negative.
Step-by-Step Solution
- 1−sin2xcosx=∣cosx∣cosx=sign(cosx).
- On [0,π/2), cosx>0, so the integrand is +1.
- On (π/2,π], cosx<0, so the integrand is −1. …
- 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. …
🎓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.