<s>[INST] Calculating the area For the two graphs $ \frac{x^3+2x^2-8x+6}{x+4} $ and $ \frac{x^3+x^2-10x+9}{x+4} $, calculate the area which is confined by them;
Attempt to solve: Limits of the integral are $1$ and $-3$, so I took the definite integral of the diffrence between $ \frac{x^3+2x^2-8x+6}{x+4} $ and $ \frac{x^3+x^2-10x+9}{x+4} $ since the latter is a graph of a lower-degree polynomial than the first one, but as a result I got a strange negative area result, which is quite funny since the offical answer is $12 -5 \ln5$...
What am I doing wrong? 
Note that in this exercise you need to somehow imagine the two graphs by yourself without the use of any comupters programs or whatever. Hence it is not as trivial to evalutae the position of each graph to the other...
 [/INST] Note that
$$
\left|\frac{x^2+2x-3}{x+4}\right| = -x + 2 - \frac{5}{x+4},\ \textrm{for}\ x \in [-1,3].
$$
So we obtain
\begin{eqnarray}
\int_{-3}^1 dx \left| \frac{x^2+2x-3}{x+4} \right|
&=& \int_{-3}^1 dx \Big( -x +  2 - \frac{5}{x+4} \Big)\\
&=& \left[ - \frac{1}{2} x^2 + 2 x - 5 \ln(x+4) \right]_{-3}^1\\
&=& \Big( - \frac{1}{2} + 2 - 5 \ln(5) \Big) - \Big( - \frac{9}{2} - 6 - 5 \ln(1) \Big)\\
&=& 12 - 5 \ln(5).
\end{eqnarray}
</s>