SOLVER7 Study. Nothing Else.
Chapter 7 Miscellaneous Examples Q41

Evaluate \(\int^{\small\dfrac{3}{2}}_{-1}\left|x\ sin\ (\pi\ x)\right|dx\)

CBSE Class 12 Maths · Integrals

Solution

👶 Simple Explanation

Simple Explanation

Imagine a road that goes uphill and downhill. The absolute value symbol is like always measuring the height as positive, even on the downhill parts. For this problem, the function \( x\sin(\pi x) \) changes from positive to negative at certain points on the interval. We find those sign-change points, then handle each section separately. Each section is calculated carefully, and all the pieces are added together to get the final total area.

Answer: \[ \int_{-1}^{3/2} \left| x\sin(\pi x) \right| dx = \frac{3}{\pi} + \frac{1}{\pi^{2}} \]

📖 Definite Integral of an Absolute Value Function

Detailed Explanation

When we integrate a function containing an absolute value like \( |f(x)| \), we cannot integrate it directly because \( |f(x)| \) behaves differently where \( f(x) \ge 0 \) and where \( f(x) < 0 \). The correct method is to first find the points inside the interval where \( f(x) = 0 \) (the sign-change points), split the integral at these points, and on each sub-interval replace \( |f(x)| \) by either \( f(x) \) or \( -f(x) \) depending on the sign there. Here \( f(x) = x\sin(\pi x) \). We must study the sign of \( x \) and of \( \sin(\pi x) \) on \( [-1, \tfrac{3}{2}] \). Since \( \sin(\pi x) = 0 \) at every integer, the natural break points are \( x = -1, 0, 1 \). After splitting, each piece is integrated using integration by parts, since the integrand is a product of an algebraic and a trigonometric function.

Formula Used

\[ \int u\,v\,dx = u\int v\,dx - \int\left(\frac{du}{dx}\int v\,dx\right)dx \] with \[ \int x\sin(\pi x)\,dx = -\frac{x\cos(\pi x)}{\pi} + \frac{\sin(\pi x)}{\pi^{2}} + C \]

Solution

  1. Step 1: Determine the sign of \( g(x) = x\sin(\pi x) \) on \( [-1, \tfrac{3}{2}] \). On \( (-1, 0) \): here \( x < 0 \) and \( \sin(\pi x) < 0 \) (angle in third-quadrant sense), so their product \( x\sin(\pi x) > 0 \). On \( (0, 1) \): here \( x > 0 \) and \( \sin(\pi x) > 0 \), so the product is positive. On \( (1, \tfrac{3}{2}) \): here \( x > 0 \) but \( \sin(\pi x) < 0 \), so the product is negative.
  2. Step 2: Split the integral and remove the modulus using the signs found. Since \( g(x) \ge 0 \) on \( [-1,1] \) and \( g(x) \le 0 \) on \( [1, \tfrac{3}{2}] \): \[ I = \int_{-1}^{1} x\sin(\pi x)\,dx - \int_{1}^{3/2} x\sin(\pi x)\,dx \]
  3. Step 3: Find the antiderivative using integration by parts with \( u = x \) and \( v = \sin(\pi x) \): \[ \int x\sin(\pi x)\,dx = -\frac{x\cos(\pi x)}{\pi} + \frac{1}{\pi}\int \cos(\pi x)\,dx \] \[ = -\frac{x\cos(\pi x)}{\pi} + \frac{\sin(\pi x)}{\pi^{2}} \] Call this \( F(x) \).
  4. Step 4: Evaluate the first part \( \int_{-1}^{1} x\sin(\pi x)\,dx = F(1) - F(-1) \). Using \( \cos(\pi) = -1 \), \( \sin(\pi) = 0 \), \( \cos(-\pi) = -1 \), \( \sin(-\pi) = 0 \): \[ F(1) = -\frac{(1)(-1)}{\pi} + 0 = \frac{1}{\pi} \] \[ F(-1) = -\frac{(-1)(-1)}{\pi} + 0 = -\frac{1}{\pi} \] So \[ \int_{-1}^{1} x\sin(\pi x)\,dx = \frac{1}{\pi} - \left(-\frac{1}{\pi}\right) = \frac{2}{\pi} \]
  5. Step 5: Evaluate the second part \( \int_{1}^{3/2} x\sin(\pi x)\,dx = F(\tfrac{3}{2}) - F(1) \). Using \( \cos(\tfrac{3\pi}{2}) = 0 \) and \( \sin(\tfrac{3\pi}{2}) = -1 \): \[ F\left(\tfrac{3}{2}\right) = -\frac{(3/2)(0)}{\pi} + \frac{-1}{\pi^{2}} = -\frac{1}{\pi^{2}} \] So \[ \int_{1}^{3/2} x\sin(\pi x)\,dx = -\frac{1}{\pi^{2}} - \frac{1}{\pi} \]
  6. Step 6: Combine according to Step 2. The second integral is subtracted: \[ I = \frac{2}{\pi} - \left(-\frac{1}{\pi^{2}} - \frac{1}{\pi}\right) \] \[ I = \frac{2}{\pi} + \frac{1}{\pi^{2}} + \frac{1}{\pi} = \frac{3}{\pi} + \frac{1}{\pi^{2}} \]

Final Answer

\[ \int_{-1}^{3/2} \left| x\sin(\pi x) \right| dx = \frac{3}{\pi} + \frac{1}{\pi^{2}} \]

Common Mistake

A very common error is to ignore the absolute value and integrate \( x\sin(\pi x) \) directly over the whole interval \( [-1, \tfrac{3}{2}] \). This is wrong because \( x\sin(\pi x) \) becomes negative on \( (1, \tfrac{3}{2}) \); the modulus must flip its sign there, so that piece must be subtracted (i.e. added as its positive value), not integrated with its natural negative sign.

🪜 Step-by-step Solution

Step-by-step Solution

  1. Step 1: Identify zero-crossings of the integrand: We need the zeros of \( g(x) = x\sin(\pi x) \) inside \( \left[-1,\, \tfrac{3}{2}\right] \). The factor \( x = 0 \) gives one zero, and \( \sin(\pi x) = 0 \) at every integer, giving zeros at \( x = -1, 0, 1 \). So the sign-change points inside (or at the boundary of) the interval are \( x = -1,\, 0,\, 1,\, \tfrac{3}{2} \). — Reason: Absolute value bars cannot be removed until we know exactly where the expression inside is positive or negative; zeros mark those boundary points.
  2. Step 2: Determine the sign of g(x) on each sub-interval: Check the sign of both factors on each piece. On \( (-1, 0) \): \( x < 0 \) and \( \sin(\pi x) < 0 \), so \( g(x) = x\sin(\pi x) > 0 \), meaning \( |g(x)| = g(x) \). On \( (0, 1) \): \( x > 0 \) and \( \sin(\pi x) > 0 \), so \( g(x) > 0 \), meaning \( |g(x)| = g(x) \). On \( (1, \tfrac{3}{2}) \): \( x > 0 \) but \( \sin(\pi x) < 0 \), so \( g(x) < 0 \), meaning \( |g(x)| = -g(x) \). — Reason: Replacing \( |g(x)| \) correctly on each piece is the core technique; a wrong sign here gives a completely wrong answer.
  3. Step 3: Split the integral and remove the absolute value: Write the original integral as three pieces using the sign analysis above: \[ \int_{-1}^{3/2} \left| x\sin(\pi x) \right| dx = \int_{-1}^{0} x\sin(\pi x) \, dx + \int_{0}^{1} x\sin(\pi x) \, dx + \int_{1}^{3/2} \bigl(-x\sin(\pi x)\bigr) dx \] — Reason: Once the absolute value is removed piece by piece, each integral involves a smooth function that can be handled by standard integration by parts.
  4. Step 4: Establish the antiderivative using integration by parts: Let \( F(x) \) denote the antiderivative of \( x\sin(\pi x) \). Choose \( u = x \) and \( dv = \sin(\pi x)\,dx \), so \( du = dx \) and \( v = -\tfrac{\cos(\pi x)}{\pi} \). Then: \[ F(x) = -\frac{x\cos(\pi x)}{\pi} + \int \frac{\cos(\pi x)}{\pi} \, dx = -\frac{x\cos(\pi x)}{\pi} + \frac{\sin(\pi x)}{\pi^{2}} \] — Reason: The product of an algebraic term and a trigonometric term is the standard scenario for integration by parts (the ILATE rule).
  5. Step 5: Evaluate the first two pieces: Using the antiderivative \( F(x) = -\dfrac{x\cos(\pi x)}{\pi} + \dfrac{\sin(\pi x)}{\pi^{2}} \), evaluate: First piece \( \left[F(x)\right]_{-1}^{0} \): At \( x = 0 \): \( F(0) = 0 + 0 = 0 \). At \( x = -1 \): \( F(-1) = -\dfrac{(-1)\cos(-\pi)}{\pi} + \dfrac{\sin(-\pi)}{\pi^{2}} = -\dfrac{1}{\pi} + 0 = -\dfrac{1}{\pi} \). So the first piece equals \( 0 - \left(-\dfrac{1}{\pi}\right) = \dfrac{1}{\pi} \). Second piece \( \left[F(x)\right]_{0}^{1} \): At \( x = 1 \): \( F(1) = -\dfrac{\cos(\pi)}{\pi} + 0 = \dfrac{1}{\pi} \). At \( x = 0 \): \( F(0) = 0 \). So the second piece equals \( \dfrac{1}{\pi} - 0 = \dfrac{1}{\pi} \). — Reason: Substituting the boundary values and subtracting gives the definite integral for each sub-interval.
  6. Step 6: Evaluate the third piece: The third piece is \( -\left[F(x)\right]_{1}^{3/2} \). At \( x = \tfrac{3}{2} \): \[ F\!\left(\tfrac{3}{2}\right) = -\frac{\tfrac{3}{2}\cos\!\left(\tfrac{3\pi}{2}\right)}{\pi} + \frac{\sin\!\left(\tfrac{3\pi}{2}\right)}{\pi^{2}} = -\frac{\tfrac{3}{2} \cdot 0}{\pi} + \frac{-1}{\pi^{2}} = -\frac{1}{\pi^{2}} \] At \( x = 1 \): \( F(1) = \dfrac{1}{\pi} \) (from Step 5). So the third piece equals \( -\!\left(-\dfrac{1}{\pi^{2}} - \dfrac{1}{\pi}\right) = \dfrac{1}{\pi^{2}} + \dfrac{1}{\pi} \). — Reason: The negative sign in front accounts for the fact that the integrand was negative on this sub-interval, making the contribution to the total area positive.
  7. Step 7: Add all three pieces together: Combine the results from Steps 5 and 6: \[ \frac{1}{\pi} + \frac{1}{\pi} + \frac{1}{\pi} + \frac{1}{\pi^{2}} = \frac{3}{\pi} + \frac{1}{\pi^{2}} \] — Reason: The sum of all sub-interval contributions gives the value of the original integral.

Final Answer

\[ \int_{-1}^{3/2} \left| x\sin(\pi x) \right| dx = \frac{3}{\pi} + \frac{1}{\pi^{2}} \]

Common Mistake

One common mistake: forgetting to negate the integrand on the sub-interval where \( x\sin(\pi x) < 0 \) (here, \( (1,\,\tfrac{3}{2}) \)), which causes that piece to subtract from the total instead of adding to it, giving a wrong final answer.

✍️ Exam-ready Answer

Exam-ready Answer

  1. Step 1: Identify sign of \( x\sin(\pi x) \) and split: Sign analysis: positive on \( (-1,0) \), positive on \( (0,1) \), negative on \( (1,\tfrac{3}{2}) \), so \[ \int_{-1}^{3/2}|x\sin(\pi x)|\,dx = \int_{-1}^{1} x\sin(\pi x)\\,dx - \int_{1}^{3/2} x\sin(\pi x)\\,dx \]
  2. Step 2: Apply IBP antiderivative to each piece: Using \( F(x) = -\dfrac{x\cos(\pi x)}{\pi} + \dfrac{\sin(\pi x)}{\pi^{2}} \), evaluate: \[ \int_{-1}^{1} x\sin(\pi x)\\,dx = \left[ F(x) \right]_{-1}^{1} = \frac{2}{\pi} \]
  3. Step 3: Evaluate the second piece: \[ -\int_{1}^{3/2} x\sin(\pi x)\\,dx = -\left[ F(x) \right]_{1}^{3/2} = \frac{1}{\pi} + \frac{1}{\pi^{2}} \]
  4. Step 4: Add results: \[ \frac{2}{\pi} + \frac{1}{\pi} - \frac{2}{\pi} + \frac{1}{\pi^{2}} = \frac{3}{\pi} + \frac{1}{\pi^{2}} \]

Answer: \[ \int_{-1}^{3/2} \left| x\sin(\pi x) \right| dx = \frac{3}{\pi} + \frac{1}{\pi^{2}} \]

➕ More Examples

More Examples

Example 1

Question: Evaluate \[ \int_{-1}^{2} \left| x \cos(\pi x) \right| dx \]

Solution: Step 1: Find sign changes of \( x \cos(\pi x) \) on \([-1, 2]\). \nThe factor \( \cos(\pi x) = 0 \) when \( \pi x = \frac{\pi}{2} + n\pi \), i.e., \( x = \frac{1}{2} + n \) for integer \( n \). In \([-1, 2]\), the zeros are at \( x = -\frac{1}{2},\\, \frac{1}{2},\\, \frac{3}{2} \). \nAlso \( x = 0 \) makes the factor \( x \) zero. \nSo the sign-change points within \([-1, 2]\) are \( x = -\frac{1}{2},\\, 0,\\, \frac{1}{2},\\, \frac{3}{2} \). \nStep 2: Determine the sign of \( x \cos(\pi x) \) in each sub-interval. \nOn \( \left(-1, -\frac{1}{2}\right) \): take \( x = -0.75 \). Then \( x < 0 \) and \( \cos(-0.75\pi) = \cos(135^{\circ}) < 0 \), so product \( > 0 \). \nOn \( \left(-\frac{1}{2}, 0\right) \): take \( x = -0.25 \). Then \( x < 0 \) and \( \cos(-0.25\pi) > 0 \), so product \( < 0 \). \nOn \( \left(0, \frac{1}{2}\right) \): take \( x = 0.25 \). Then \( x > 0 \) and \( \cos(0.25\pi) > 0 \), so product \( > 0 \). \nOn \( \left(\frac{1}{2}, \frac{3}{2}\right) \): take \( x = 1 \). Then \( x > 0 \) and \( \cos(\pi) = -1 < 0 \), so product \( < 0 \). \nOn \( \left(\frac{3}{2}, 2\right) \): take \( x = 1.75 \). Then \( x > 0 \) and \( \cos(1.75\pi) > 0 \), so product \( > 0 \). \nStep 3: Write the integral with absolute value removed. \[ I = \int_{-1}^{-1/2} x\cos(\pi x)\\,dx - \int_{-1/2}^{0} x\cos(\pi x)\\,dx + \int_{0}^{1/2} x\cos(\pi x)\\,dx - \int_{1/2}^{3/2} x\cos(\pi x)\\,dx + \int_{3/2}^{2} x\cos(\pi x)\\,dx \] \nStep 4: Compute the antiderivative of \( x\cos(\pi x) \) using integration by parts. \nLet \( u = x \), \( dv = \cos(\pi x)\\,dx \). Then \( du = dx \) and \( v = \frac{\sin(\pi x)}{\pi} \). \[ \int x\cos(\pi x)\\,dx = \frac{x\sin(\pi x)}{\pi} - \int \frac{\sin(\pi x)}{\pi}\\,dx = \frac{x\sin(\pi x)}{\pi} + \frac{\cos(\pi x)}{\pi^2} + C \] \nDefine \( F(x) = \frac{x\sin(\pi x)}{\pi} + \frac{\cos(\pi x)}{\pi^2} \). \nStep 5: Evaluate \( F \) at the key points. \( F(-1) = \frac{(-1)\sin(-\pi)}{\pi} + \frac{\cos(-\pi)}{\pi^2} = 0 + \frac{-1}{\pi^2} = -\frac{1}{\pi^2} \) \( F\\!\left(-\tfrac{1}{2}\right) = \frac{(-\frac{1}{2})\sin(-\frac{\pi}{2})}{\pi} + \frac{\cos(-\frac{\pi}{2})}{\pi^2} = \frac{(-\frac{1}{2})(-1)}{\pi} + 0 = \frac{1}{2\pi} \) \( F(0) = 0 + \frac{1}{\pi^2} = \frac{1}{\pi^2} \) \( F\\!\left(\tfrac{1}{2}\right) = \frac{\frac{1}{2}\sin(\frac{\pi}{2})}{\pi} + \frac{\cos(\frac{\pi}{2})}{\pi^2} = \frac{1}{2\pi} + 0 = \frac{1}{2\pi} \) \( F\\!\left(\tfrac{3}{2}\right) = \frac{\frac{3}{2}\sin(\frac{3\pi}{2})}{\pi} + \frac{\cos(\frac{3\pi}{2})}{\pi^2} = \frac{\frac{3}{2}(-1)}{\pi} + 0 = -\frac{3}{2\pi} \) \( F(2) = \frac{2\sin(2\pi)}{\pi} + \frac{\cos(2\pi)}{\pi^2} = 0 + \frac{1}{\pi^2} = \frac{1}{\pi^2} \) \nStep 6: Evaluate each piece. \nPiece 1: \( F\\!\left(-\tfrac{1}{2}\right) - F(-1) = \frac{1}{2\pi} - \left(-\frac{1}{\pi^2}\right) = \frac{1}{2\pi} + \frac{1}{\pi^2} \) \nPiece 2 (subtracted): \( -\left[F(0) - F\\!\left(-\tfrac{1}{2}\right)\right] = -\left[\frac{1}{\pi^2} - \frac{1}{2\pi}\right] = -\frac{1}{\pi^2} + \frac{1}{2\pi} \) \nPiece 3: \( F\\!\left(\tfrac{1}{2}\right) - F(0) = \frac{1}{2\pi} - \frac{1}{\pi^2} \) \nPiece 4 (subtracted): \( -\left[F\\!\left(\tfrac{3}{2}\right) - F\\!\left(\tfrac{1}{2}\right)\right] = -\left[-\frac{3}{2\pi} - \frac{1}{2\pi}\right] = -(-\frac{2}{\pi}) = \frac{2}{\pi} \) \nPiece 5: \( F(2) - F\\!\left(\tfrac{3}{2}\right) = \frac{1}{\pi^2} - \left(-\frac{3}{2\pi}\right) = \frac{1}{\pi^2} + \frac{3}{2\pi} \) \nStep 7: Add all pieces. \[ I = \left(\frac{1}{2\pi} + \frac{1}{\pi^2}\right) + \left(\frac{1}{2\pi} - \frac{1}{\pi^2}\right) + \left(\frac{1}{2\pi} - \frac{1}{\pi^2}\right) + \frac{2}{\pi} + \left(\frac{3}{2\pi} + \frac{1}{\pi^2}\right) \] \nCollecting \( \frac{1}{\pi} \) terms: \( \frac{1}{2} + \frac{1}{2} + \frac{1}{2} + 2 + \frac{3}{2} = \frac{1}{2}+\frac{1}{2}+\frac{1}{2}+2+\frac{3}{2} = 5 \), so coefficient of \( \frac{1}{\pi} \) is \( \frac{5}{\pi} \). \nCollecting \( \frac{1}{\pi^2} \) terms: \( 1 - 1 - 1 + 0 + 1 = 0 \). \nTherefore: \[ I = \frac{5}{\pi} \]

Answer: \( \dfrac{5}{\pi} \)

Example 2

Question: Evaluate \[ \int_{-1/2}^{3/2} \left| x \sin(2\pi x) \right| dx \]

Solution: Step 1: Find where \( x\sin(2\pi x) = 0 \) on \(\left[-\frac{1}{2}, \frac{3}{2}\right]\). \( \sin(2\pi x) = 0 \) when \( 2\pi x = n\pi \), i.e., \( x = 0, \frac{1}{2}, 1, \frac{3}{2} \). Also \( x = 0 \) from the factor \( x \). \nSign-change points: \( x = 0,\\, \frac{1}{2},\\, 1 \) (within the open interval; \( \frac{3}{2} \) is the endpoint). \nStep 2: Determine the sign of \( x\sin(2\pi x) \) in each sub-interval. \nOn \( \left(-\frac{1}{2}, 0\right) \): take \( x = -0.25 \). Then \( x < 0 \) and \( \sin(-\pi) \) — actually at \( x = -0.25 \), \( \sin(2\pi \cdot (-0.25)) = \sin(-\pi/2) = -1 < 0 \). Product \( = (-)(-)>0 \). \nOn \( \left(0, \frac{1}{2}\right) \): take \( x = 0.25 \). Then \( x > 0 \) and \( \sin(\pi/2) = 1 > 0 \). Product \( > 0 \). \nOn \( \left(\frac{1}{2}, 1\right) \): take \( x = 0.75 \). Then \( x > 0 \) and \( \sin(1.5\pi) = -1 < 0 \). Product \( < 0 \). \nOn \( \left(1, \frac{3}{2}\right) \): take \( x = 1.25 \). Then \( x > 0 \) and \( \sin(2.5\pi) = 1 > 0 \). Product \( > 0 \). \nStep 3: Write the integral with sign. \[ I = \int_{-1/2}^{0} x\sin(2\pi x)\\,dx + \int_{0}^{1/2} x\sin(2\pi x)\\,dx - \int_{1/2}^{1} x\sin(2\pi x)\\,dx + \int_{1}^{3/2} x\sin(2\pi x)\\,dx \] \nStep 4: Find the antiderivative of \( x\sin(2\pi x) \) by integration by parts. \nLet \( u = x \), \( dv = \sin(2\pi x)\\,dx \). Then \( du = dx \) and \( v = -\frac{\cos(2\pi x)}{2\pi} \). \[ \int x\sin(2\pi x)\\,dx = -\frac{x\cos(2\pi x)}{2\pi} + \int \frac{\cos(2\pi x)}{2\pi}\\,dx = -\frac{x\cos(2\pi x)}{2\pi} + \frac{\sin(2\pi x)}{4\pi^2} + C \] \nDefine \( G(x) = -\frac{x\cos(2\pi x)}{2\pi} + \frac{\sin(2\pi x)}{4\pi^2} \). \nStep 5: Evaluate \( G \) at key points. \( G\\!\left(-\tfrac{1}{2}\right) = -\frac{(-\frac{1}{2})\cos(-\pi)}{2\pi} + \frac{\sin(-\pi)}{4\pi^2} = -\frac{(-\frac{1}{2})(-1)}{2\pi} + 0 = -\frac{1}{4\pi} \) \( G(0) = 0 + 0 = 0 \) \( G\\!\left(\tfrac{1}{2}\right) = -\frac{\frac{1}{2}\cos(\pi)}{2\pi} + \frac{\sin(\pi)}{4\pi^2} = -\frac{\frac{1}{2}(-1)}{2\pi} + 0 = \frac{1}{4\pi} \) \( G(1) = -\frac{1 \cdot \cos(2\pi)}{2\pi} + \frac{\sin(2\pi)}{4\pi^2} = -\frac{1}{2\pi} + 0 = -\frac{1}{2\pi} \) \( G\\!\left(\tfrac{3}{2}\right) = -\frac{\frac{3}{2}\cos(3\pi)}{2\pi} + \frac{\sin(3\pi)}{4\pi^2} = -\frac{\frac{3}{2}(-1)}{2\pi} + 0 = \frac{3}{4\pi} \) \nStep 6: Evaluate each integral. \nPiece 1: \( G(0) - G\\!\left(-\tfrac{1}{2}\right) = 0 - \left(-\frac{1}{4\pi}\right) = \frac{1}{4\pi} \) \nPiece 2: \( G\\!\left(\tfrac{1}{2}\right) - G(0) = \frac{1}{4\pi} - 0 = \frac{1}{4\pi} \) \nPiece 3 (subtracted): \( -\left[G(1) - G\\!\left(\tfrac{1}{2}\right)\right] = -\left[-\frac{1}{2\pi} - \frac{1}{4\pi}\right] = -\left(-\frac{3}{4\pi}\right) = \frac{3}{4\pi} \) \nPiece 4: \( G\\!\left(\tfrac{3}{2}\right) - G(1) = \frac{3}{4\pi} - \left(-\frac{1}{2\pi}\right) = \frac{3}{4\pi} + \frac{2}{4\pi} = \frac{5}{4\pi} \) \nStep 7: Sum all pieces. \[ I = \frac{1}{4\pi} + \frac{1}{4\pi} + \frac{3}{4\pi} + \frac{5}{4\pi} = \frac{10}{4\pi} = \frac{5}{2\pi} \]

Answer: \( \dfrac{5}{2\pi} \)

🎯 Try a Similar Question

Try a Similar Question

Question: Evaluate \[ \int_{-1/2}^{2} \left| x \cos(\pi x) \right| \, dx \]

Solution

  1. Step 1: Find zeros of \( x\cos(\pi x) \) in \([-1/2,\, 2]\): The expression \( x\cos(\pi x) \) equals zero when \( x = 0 \) or when \( \cos(\pi x) = 0 \), i.e., when \( \pi x = \frac{\pi}{2} + n\pi \) for integer \( n \), giving \( x = \frac{1}{2} + n \). In the interval \( \left[-\frac{1}{2},\, 2\right] \), the relevant points are \( x = -\frac{1}{2},\; 0,\; \frac{1}{2},\; \frac{3}{2},\; 2 \).
  2. Step 2: Determine the sign of \( x\cos(\pi x) \) on each sub-interval: Check a test point in each sub-interval. On \( \left(-\frac{1}{2},\, 0\right) \): take \( x = -\frac{1}{4} \). Then \( x < 0 \) and \( \cos\!\left(-\frac{\pi}{4}\right) = \frac{\sqrt{2}}{2} > 0 \), so \( x\cos(\pi x) < 0 \). On \( \left(0,\, \frac{1}{2}\right) \): take \( x = \frac{1}{4} \). Then \( x > 0 \) and \( \cos\!\left(\frac{\pi}{4}\right) > 0 \), so \( x\cos(\pi x) > 0 \). On \( \left(\frac{1}{2},\, \frac{3}{2}\right) \): take \( x = 1 \). Then \( x > 0 \) and \( \cos(\pi) = -1 < 0 \), so \( x\cos(\pi x) < 0 \). On \( \left(\frac{3}{2},\, 2\right) \): take \( x = \frac{7}{4} \). Then \( x > 0 \) and \( \cos\!\left(\frac{7\pi}{4}\right) = \frac{\sqrt{2}}{2} > 0 \), so \( x\cos(\pi x) > 0 \).
  3. Step 3: Split the integral using the sign analysis: Using \( |f| = -f \) where \( f < 0 \) and \( |f| = f \) where \( f \ge 0 \): \[ \int_{-1/2}^{2} \left| x\cos(\pi x) \right| \, dx = -\int_{-1/2}^{0} x\cos(\pi x) \, dx + \int_{0}^{1/2} x\cos(\pi x) \, dx - \int_{1/2}^{3/2} x\cos(\pi x) \, dx + \int_{3/2}^{2} x\cos(\pi x) \, dx \]
  4. Step 4: Compute \( \int x\cos(\pi x) \, dx \) by integration by parts: Let \( u = x \) and \( dv = \cos(\pi x)\, dx \). Then \( du = dx \) and \( v = \frac{\sin(\pi x)}{\pi} \). By integration by parts: \[ \int x\cos(\pi x) \, dx = \frac{x\sin(\pi x)}{\pi} - \int \frac{\sin(\pi x)}{\pi} \, dx = \frac{x\sin(\pi x)}{\pi} + \frac{\cos(\pi x)}{\pi^2} + C \] Define \( F(x) = \frac{x\sin(\pi x)}{\pi} + \frac{\cos(\pi x)}{\pi^2} \).
  5. Step 5: Evaluate \( F(x) \) at the required points: Compute the needed values: \[ F(0) = 0 + \frac{1}{\pi^2} = \frac{1}{\pi^2} \] \[ F\!\left(\tfrac{1}{2}\right) = \frac{\frac{1}{2}\cdot 1}{\pi} + \frac{0}{\pi^2} = \frac{1}{2\pi} \] \[ F\!\left(\tfrac{3}{2}\right) = \frac{\frac{3}{2}\cdot(-1)}{\pi} + \frac{0}{\pi^2} = -\frac{3}{2\pi} \] \[ F(2) = \frac{2\cdot 0}{\pi} + \frac{1}{{\pi^2}} = \frac{1}{{\pi^2}} \] \[ F\!\left(-\tfrac{1}{2}\right) = \frac{-\frac{1}{2}\cdot(-1)}{\pi} + \frac{0}{\pi^2} = \frac{1}{2\pi} \]
  6. Step 6: Compute each definite integral piece: First piece: \( -\int_{-1/2}^{0} x\cos(\pi x)\, dx = -\left[F(0) - F\!\left(-\tfrac{1}{2}\right)\right] = -\left[\frac{1}{\pi^2} - \frac{1}{2\pi}\right] = \frac{1}{2\pi} - \frac{1}{\pi^2} \) Second piece: \( \int_{0}^{1/2} x\cos(\pi x)\, dx = F\!\left(\tfrac{1}{2}\right) - F(0) = \frac{1}{2\pi} - \frac{1}{\pi^2} \) Third piece: \( -\int_{1/2}^{3/2} x\cos(\pi x)\, dx = -\left[F\!\left(\tfrac{3}{2}\right) - F\!\left(\tfrac{1}{2}\right)\right] = -\left[-\frac{3}{2\pi} - \frac{1}{2\pi}\right] = \frac{4}{2\pi} = \frac{2}{\pi} \) Fourth piece: \( \int_{3/2}^{2} x\cos(\pi x)\, dx = F(2) - F\!\left(\tfrac{3}{2}\right) = \frac{1}{\pi^2} - \left(-\frac{3}{2\pi}\right) = \frac{3}{2\pi} + \frac{1}{\pi^2} \)
  7. Step 7: Add all four pieces: Summing all contributions: \[ \left(\frac{1}{2\pi} - \frac{1}{\pi^2}\right) + \left(\frac{1}{2\pi} - \frac{1}{\pi^2}\right) + \frac{2}{\pi} + \left(\frac{3}{2\pi} + \frac{1}{\pi^2}\right) \] Collecting \( \frac{1}{\pi} \) terms: \( \frac{1}{2\pi} + \frac{1}{2\pi} + \frac{2}{\pi} + \frac{3}{2\pi} = \frac{1 + 1 + 4 + 3}{2\pi} = \frac{9}{2\pi} \) Collecting \( \frac{1}{\pi^2} \) terms: \( -\frac{1}{\pi^2} - \frac{1}{\pi^2} + \frac{1}{\pi^2} = -\frac{1}{\pi^2} \) Therefore the total is: \[ \frac{9}{2\pi} - \frac{1}{\pi^2} \]

Answer: \[ \int_{-1/2}^{2} \left| x\cos(\pi x) \right| \, dx = \frac{9}{2\pi} - \frac{1}{\pi^2} \]

Everything you get with Solver7

More questions in Integrals

Chapter 7 Examples Q1(i) 65/2/2 2023 / Section A Q1 Chapter 7 Examples Q1(ii) 65/2/1 2022 / Section A Q2(a) Chapter 7 Examples Q1(iii) 65/2/1 2022 / Section A Q2(b) Chapter 7 Examples Q2(i) Chapter 7 Examples Q2(ii) 65/1/1 2023 / Section A Q5 Chapter 7 Examples Q2(iii) 65/1/1 2023 / Section A Q6 65/1/1 2024 / Section A Q6 65/2/1 2024 / Section A Q6 65/3/1 2023 / Section A Q6 65/3/1 2024 / Section A Q6 Chapter 7 Examples Q3(i) 65/3/1 2023 / Section A Q7 Chapter 7 Examples Q3(ii) 65(B) 2026 / Section A Q8 65/1/1 2026 / Section A Q8 65/4/1 2022 / Section A Q6 65/4/1 2023 / Section A Q8 65/4/2 2024 / Section A Q8 Chapter 7 Examples Q3(iii) 65(B) 2026 / Section A Q9 65/1/1 2026 / Section A Q9 65/2/1 2022 / Section B Q8(a) 65/2/2 2023 / Section A Q9 65/4/1 2022 / Section B Q7 65/4/1 2023 / Section A Q9 65/4/1 2026 / Section A Q9 Chapter 7 Examples Q4 65/2/1 2022 / Section B Q8(b) 65/3/1 2026 / Section A Q10 65/4/1 2022 / Section B Q8(a) 65/4/1 2026 / Section A Q10 65/5/1 2026 / Section A Q10 Chapter 7 Examples Q5(i) 65/3/1 2026 / Section A Q11 65/4/1 2022 / Section B Q8(b) 65/5/1 2026 / Section A Q11 Chapter 7 Examples Q5(ii) 65/2/3 2026 / Section A Q12 Chapter 7 Examples Q5(iii) Chapter 7 Examples Q5(iv) Chapter 7 Examples Q6(i) 65/2/1 2022 / Section C Q12 Chapter 7 Examples Q6(ii) Chapter 7 Examples Q6(iii) Chapter 7 Examples Q7(i) 65/4/1 2022 / Section C Q13 Chapter 7 Examples Q7(ii) Chapter 7 Examples Q7(iii) Chapter 7 Examples Q8(i) Chapter 7 Examples Q8(ii) Chapter 7 Examples Q9(i) Chapter 7 Examples Q9(ii) 65/1/1 2024 / Section B Q23(a) 65/3/1 2024 / Section B Q23(a) Chapter 7 Examples Q9(iii)