Is there a formula for $\int^{b}_{a} x \text{ dx}$? $\int^{b}_{a} x \text{ dx}$?
I agree it forms a triangle, but in the case where $b <0$, there's another triangle we have to factor in.
Is there a formula takes takes both of these into account, and just spits out the answer?
For ex) $\int^{2}_{-1} x \text { dx}$
 A: The integral from $0$ to $b$ is $\frac12b^2$:

The integral from $0$ to $a$ is $\frac12a^2$:

Your integral is then as follows:
$$\int_a^bx\ dx=\int_0^bx\ dx-\int_0^ax\ dx=\frac12b^2-\frac12a^2$$
A: The formula is 
$$ \frac{1}{2} \left( b^2-a^2 \right) $$
Do you know why? What is the indefinite integral of $x$?
A: Yes it is a standard integration.
$$ \int _a^b x \; dx,$$
where upon integration becomes 
$$ \frac{x^2}{2} |^b_a = \frac{1}{2}(b^2 - a^2).$$
Voila! Enjoy.
A: Assuming $a<0$ and $b>0$. Spit the integral into, (this is the same as breaking up signed areas into two)
$$\int_{a}^{0} x dx+\int_{0}^{b} x dx$$
The first is going to be negative as it is below the $y$ axis, but it will in magnitude represent a triangle with base $a$ and height $a$. The second is going to be positive and represent a triangle with base $b$ and height $b$. So the integral is,
$$-\frac{1}{2}(a)(a)+\frac{1}{2}(b)(b)=\frac{1}{2}b^2-\frac{1}{2}a^2$$
There are a couple more cases to check $a,b>0$ which results in a trapezoid  with base $b-a$ and average height $\frac{b+a}{2}$. So again we get $(b-a)\frac{b+a}{2}=\frac{1}{2}(b^2-a^2)$. Then the case $a,b<0$ is going to be similar to this. And the case $a>0, b<0$ is going to be similar to the very first case we considered.
