[Math] Techniques of Integration w/ absolute value

calculusintegration

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.

Best Answer

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.$$

Related Question