Is this correct way to evaluate $\int_{-3}^3 d|x|$

130 Views Asked by At

Evaluate $$I=\int _{-3}^3 d|x|$$

What I did is, split the integral as follows by using the definition of $|x|$.

$$I=\int_{-3}^0 d(-x)+\int_0^3 dx=-\int_{-3}^0dx+\int_0^3dx=0$$

Any comments?

1

There are 1 best solutions below

0
On BEST ANSWER

Integration by parts of Riemann–Stieltjes integrals, $$\int_a^b f(x) \, \mathrm{d}g(x)=f(b)g(b)-f(a)g(a)-\int_a^b g(x) \, \mathrm{d}f(x),$$ gives in your case: $$\int_a^b\mathrm d|x|=|b|-|a|.$$ See also this post.