Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I cannot solve this integral.

$$ \int_{-3}^3 \frac{x}{1+|x|} ~dx $$

I have tried rewriting it as:

$$ \int_{-3}^3 1 - \frac{1}{x+1}~dx, $$

From which I obtain:

$$ x - \ln|x+1|\;\;\bigg\vert_{-3}^{\;3} $$

My book (Stewart's Calculus 7e) has the answer as 0, and I can intuitively see this from a graph of the function, it being symmetric about $y = x$, but I cannot analytically solve this.

share|improve this question
    
I guess by solve you meant evaluate/compute! –  Mercy Jun 23 '12 at 20:02
1  
Since you have an absolute value you should split the integral as $\int_{-3}^0f+\int_0^3f$. Or you may notice that the integrand is an odd function, and since the interval $[-3,3]$ is symmetric about the origin you should get $0$. –  Mercy Jun 23 '12 at 20:03
1  
Sometimes integrals are best evaluated with a graph, especially when absolute value is involved at times. Not all integrals need to evaluated with an antiderivative. In most cases with an absolute value in the integrand, you have to split up the integrand into two or more places where the function switches from negative to positive (so be careful with signs!) –  Joe Jun 23 '12 at 20:04
add comment

2 Answers

up vote 7 down vote accepted

Your rewriting is incorrect; when $-3\leq x\leq 0$, the original function takes the values $$\frac{x}{1+|x|} = \frac{x}{1-x} \neq 1 - \frac{1}{x+1}$$ (your rewriting is only valid when $x\geq 0$) To solve the problem, either notice that your function is odd: $$f(-x) = \frac{-x}{1+|-x|} = - \frac{x}{1+|x|} = -f(x)$$ and conclude that the answer is $0$ because your interval is symmetric about the origin; or divide the integral into two: $$\int_{-3}^3\frac{x}{1+|x|}\,dx = \int_{-3}^0\frac{x}{1+|x|}\,dx + \int_{0}^3\frac{x}{1+|x|}\,dx.$$ In the first integral, you know $x$ is negative so $|x|=-x$; in the second, you have $|x|=x$. Now you can solve each part separately. The second integral can be solved with your decomposition: $$\frac{x}{1+x} = \frac{-1+1+x}{1+x} = -\frac{1}{1+x} + 1$$ while the first one can be done similarly, with $$\frac{x}{1-x} = -\frac{-x}{1-x} = -\left(\frac{-1+1-x}{1-x}\right) = \frac{1}{1-x} -1.$$

share|improve this answer
add comment

You have an odd function integrated over an interval symmetric about the origin. The answer is $0$. This is, as you point out, intuitively reasonable from the geometry. A general analytic argument is given in a remark at the end.

If you really want to calculate, break up the region into two parts, where (i) $x$ is positive and (ii) where $x$ is negative. For $x$ positive, you are integrating $\frac{x}{1+x}$. For $x$ negative, you are integrating $\frac{x}{1-x}$, since for $x\le 0$ we have $|x|=-x$. Finally, calculate $$\int_{3}^0 \frac{x}{1-x}\,dx\quad\text{and}\quad\int_0^3 \frac{x}{1+x}\,dx$$ and add. All that work for nothing!

Remarks: $1.$ In general, when absolute values are being integrated, breaking up into appropriate parts is the safe way to go. Trying to handle both at the same time carries too high a probability of error.

$2.$ Let $f(x)$ be an odd function. We want to integrate from $-a$ to $a$, where $a$ is positive. We look at $$\int_{-a}^0 f(x)\,dx.$$ Let $u=-x$. Then $du=-dx$, and $f(u)=-f(x)$. So our integral is $$\int_{u=a}^0 (-1)(-f(u))\,du.$$ the two minus signs cancel. Changing the order of the limits, we get $-\int_0^a f(u)\,du$. so this is just the negative of the integral over the interval from $0$ to $a$. That gives us the desired cancellation.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.