# calculation area by integral

Suppose that our function is given by $y=x^3$, bounded by $x=-2$ and $x=1$. If we use the basic feature of this integral then result would be $|\frac{x^4}{4}|$ integral of given function, then put variables and we get $\frac{1}{4}-4$. Yes? or we have to add it? Lecturer had done it in another way. We divide the interval into $[-2,0]$ and $[0,1]$, integrate seperately and then add each other. What is the difference? Or in my case we have to add $\frac{1}{4}$.

-
My advice would be not to use absolute values. Draw the graph. On the part from $0$ to $1$, $y=x^3$ is the curve "above" and $y=0$ is the curve below, area is $\int_0^1 (x^3-0)dx$. On the part from $-2$ to $0$, $y=0$ is the curve above, and $y=x^3$ is the curve below, so area is $\int_{-2}^0 (0-x^3)dx$. Compute and add. –  André Nicolas Feb 23 '12 at 16:24

Note that you are finding the area under the curve. The definite integral does not necessarily give you this since it can take on negative values while area's cannot. Therefore to find the area you need to take the absolute value of the function in the interval. So you get $$\int_{-2}^1|x^3|dx$$ Since $$|x^3|=\begin{cases}x^3&x>0\\-x^3&x<0\end{cases}$$
$$\int_{-2}^1|x^3|dx=\int_{-2}^0-x^3dx+\int_0^1x^3dx=\left[\frac{-x^4}{4}\right]_{-2}^0+\left[\frac{x^4}{4}\right]_0^1=4+\frac{1}{4}=4\frac{1}{4}$$
If the bounds were $x=1$ and $x=2$ then since $x^3$ is positive within the bounds you would just do what you normally do i.e. $\int_a^bf(x)dx=F(b)-F(a)$ –  E.O. Feb 23 '12 at 10:19
If you just take the integral $\int_{-2}^1 x^3 \, dx$ you get the signed area between the graph and the $x$-axis, i.e. area above minus area below. If you just want the area (so area above plus area below) you need $\int_{-2}^1 |x^3| \, dx$. To evaluate this you break into two integrals, because $|x^3|$ is equal to $-x^3$ for negative $x$, and $x^3$ for positive $x$. Thus $$\int_{-2}^1 |x^3| \, dx = \int_{-2}^0 -x^3 \, dx + \int_0^1 x^3 \, dx$$ and you go from there.