Question:medium

The value of \(\int_a^b \frac{|x|}{x} dx\) is

Show Hint

Split the integral at \(x=0\) based on the sign of \(x\).
Updated On: Jun 18, 2026
  • \(|b| - |a|\)
  • \(|a| - |b|\)
  • \(|b| + |a|\)
  • \(-|b| - |a|\)
Show Solution

The Correct Option is A

Solution and Explanation

To evaluate the integral \(\int_a^b \frac{|x|}{x} \, dx\), we need to understand the behavior of the function \(\frac{|x|}{x}\).

The function \(\frac{|x|}{x}\) can be defined piecewise as: 

  • If \(x > 0\), then \(|x| = x\), so \(\frac{|x|}{x} = 1\).
  • If \(x < 0\), then \(|x| = -x\), so \(\frac{|x|}{x} = -1\).
  • If \(x = 0\), the expression \(\frac{|x|}{x}\) is undefined, but since we are integrating over intervals and 0 is a single point, it does not affect the integral in terms of evaluation of continuous regions.

The integral can be split based on the value of \(x\), considering the interval \([a, b]\) may include negative and positive regions:

  1. If both \(a\) and \(b\) are either positive or negative, choose proper limits to avoid including zero.
  2. If \(a \leq 0 \leq b\), then we break the interval into \([a, 0]\) and \([0, b]\).

Let's consider \([a, b]\) with \(a \leq 0\) and \(b \geq 0\):

  • The integral becomes: \(\int_a^0 -1 \, dx + \int_0^b 1 \, dx\)

Calculating these separately:

  • \(\int_a^0 -1 \, dx = -[x]_a^0 = -(0 - a) = a\)
  • \(\int_0^b 1 \, dx = [x]_0^b = b\)

Adding these results gives: \(a + b\)

However, since we are looking for \(|b| - |a|\), if \(a \leq 0\) and \(b \geq 0\), the result of the integral by behavior of \(\frac{|x|}{x}\) directly translates to this magnitude difference, considering signs.

Conclusion: The value of \(\int_a^b \frac{|x|}{x} \, dx\) is \(|b| - |a|\).

Was this answer helpful?
0