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

-
If you did what you said you did and computed the integral correctly, you would come out with the answer $-12 + 5 \ln 5$, which indeed is negative. If you came up with something that does not equate with either that answer or the "official" answer, your integration was wrong somewhere. If you want someone to say where it was wrong, you'll have to show your work. – David K Jul 19 '14 at 12:24
I got to what you just said – Bak1139 Jul 19 '14 at 12:26
Great, so everything is OK except for the part where you assumed the first function would be greater than the second. Knowing it's the other way around (and you get a good clue about that from the result of your integration), you just need to flip the sign of your answer. – David K Jul 19 '14 at 12:29

@Mary knows that because $$\frac{x^3+2x^2-8x+6}{x+4} - \frac{x^3+x^2-10x+9}{x+4}=\frac{x^2+2x-3}{x+4}=\frac{(x-1)(x+3)}{x+4}$$ and since on $-3<x<1$ so the last fraction in negative. A simple figure could clear the point.

-
answer key gives differnt answer....not the one you get with this integral – Bak1139 Jul 19 '14 at 11:33
@Bak1139: What is that answer? Indeed it is $\approx 4$. – Babak S. Jul 19 '14 at 11:43
im afraid not... – Bak1139 Jul 19 '14 at 11:45
@Bak1139: What is the upper function? – Babak S. Jul 19 '14 at 11:47
Nice picture! ;-) – amWhy Jul 19 '14 at 15:42

According to my calculations, you should get the right result by calculating the difference of integrals from $-1$ to $3$, but you must subtract the first one from the second, or take the absolute value of what you get.

However, for future reference, when calculating the area confined between the graphs of say the two integrable functions $f(x)$ and $g(x)$ you must break the integrals where $f(x)-g(x)$ changes sign.

e.g.: if you want to calculate the area confined by your two functions, from $-3$ to $2$, you woud do $$\mid\int_{-3}^{1}f(x)dx-\int_{-3}^{1}g(x)dx\mid+\mid\int_{1}^{2}f(x)dx-\int_{1}^{2}g(x)dx\mid$$

Don't forget to take the absolute value of each difference of integrals, or substract the lesser one from the greater one.

So, as a rule of thumb for this kind of exercises, see if the difference of functions has any roots, and if it has, see if the difference changes its sign when going from the left to the right of one root.

The answer is indeed $12-5\ln 5$.

(this is a plot of the functions, the orange area is $12-5\ln 5$)

-
whihc caclualitons exactly? computer similations doesnt count you dont have it on test time? – Bak1139 Jul 19 '14 at 12:17
I put the graph there so you get a better idea of what's happening. I calculated whether the first function minus the second one changes sign on the interval $[-1,3]$. – Robert Badea Jul 19 '14 at 12:20
What software did you use for plotting that beautiful graph? – Lucian Jul 19 '14 at 12:25
I used Desmos Calculator for the graph. desmos.com – Robert Badea Jul 19 '14 at 16:55

For $-3<x<1$:

$$\frac{x^3+2x^2-8x+6}{x+4} < \frac{x^3+x^2-10x+9}{x+4}$$

So you have to calculate the integral of the difference $\frac{x^3+x^2-10x+9}{x+4}-\frac{x^3+2x^2-8x+6}{x+4}$ to find the area.

EDIT:

$$\frac{x^3+x^2-10x+9}{x+4}-\frac{x^3+2x^2-8x+6}{x+4}=\frac{-x^2-2x+3}{x+4}=-\frac{x^2+4x-2x}{x+4}+\frac{3}{x+4}=-\frac{x(x+4)}{x+4}+\frac{2x}{x+4}+\frac{3}{x+4}=-x+2\frac{x+4-4}{x+4}+\frac{3}{x+4}=-x+2-\frac{5}{x+4}$$

$$\int_{-3}^1 -x+2-\frac{5}{x+4} dx=[-\frac{x^2}{2}+2x-5\ln{|x+4|}]_{-3}^1=-\frac{1}{2}+2-5\ln{5}+\frac{9}{2}+6+5 \ln{1}=12-5\ln{5}$$

-
how do you know that? – Bak1139 Jul 19 '14 at 11:25
also when you do that you get an answert which utterly different then the answer key... – Bak1139 Jul 19 '14 at 11:30
$$\frac{x^3+2x^2-8x+6}{x+4} - \frac{x^3+x^2-10x+9}{x+4}=\frac{x^2+2x-3}{x+4}=\frac{x^2+2x}{x+4}-\frac{3}{x+4}=‌​\frac{x^2+4x-2x}{x+4}-\frac{3}{x+4}=\frac{x(x+4)}{x+4}-\frac{2x}{x+4}-\frac{3}{x+‌​4}=x-2\frac{x+4-4}{x+4}-\frac{3}{x+4}= \\ x-2 \left ( 1-\frac{4}{x+4} \right )-\frac{3}{x+4}=x-2 +\frac{5}{x+4}$$ So, $$\int_{-3}^1 \frac{x^3+2x^2-8x+6}{x+4} - \frac{x^3+x^2-10x+9}{x+4} dx= \int_{-3}^1 x-2 +\frac{5}{x+4} dx= [\frac{x^2}{2}-2x+5 \ln{|x+4|} ]_{-3}^1=\frac{1}{2}-2+5 \ln{5}-\frac{9}{2}-6-5\ln1=-12+5 \ln{5}$$ – Mary Star Jul 19 '14 at 11:59
I fail to see your point – Bak1139 Jul 19 '14 at 12:03
Where did you get stuck? – Mary Star Jul 19 '14 at 12:04

There are a few things you can pick up from these answers that could be very helpful in future problems.

When you first looked at the problem, you decided to integrate $$\frac{x^3+2x^2-8x+6}{x+4} - \frac{x^3+x^2-10x+9}{x+4}.$$ You expected this to produce a positive number. But in fact if you evaluate this difference at $x = 0$ you will easily see that the difference is negative. So you should expect to get a negative answer from the integration of that difference between the functions unless the two graphs cross each other somewhere else in the interval $-3 < x < 1$.

Which brings up the point that you really should know where the graphs cross, for otherwise you might not get the correct answer. (You might subtract part of the area from the rest, instead of adding all the area together.) So you must look for zeros of the difference between functions. That's why it's so important that $$\frac{x^3+2x^2-8x+6}{x+4} - \frac{x^3+x^2-10x+9}{x+4} = \frac{(x - 1)(x + 3)}{x+4}.$$ This tells you where the zeros are: at $x = 1$ and at $x = -3$. You now know that the first curve is below the second curve over the entire interval in question, so you can simply take the second function minus the first function (which is positive) and integrate it from $x = -3$ to $x = 1$. The rest of the task is simply to compute that integral correctly.

You don't really need to draw a beautiful graph, you just need to know a few facts about it, namely whether it's one function above the other the whole way or whether the functions cross (and if so, where they cross). The rest of it is all equations and integrals.

-

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}

-
your polynomial didvision is wrong... – Bak1139 Jul 19 '14 at 11:36
No, it's correct. The quantity inside the absolute value is negative, so when you take the absolute value, it reverses its sign. – David K Jul 19 '14 at 11:57
how did you make first concsluiosn? – Bak1139 Jul 19 '14 at 12:17
The text passage contains a mathematical question about calculating the area confined by two given graphs, and multiple users provide answers or hints to solve the problem. The official answer is also mentioned.
single_question_with_answer
Given a text passage, determine:
    1. If it contains a mathematical question (including word problems or calculations)
    2. If an answer to that mathematical question is provided in the text

First, describe the content structure you found in 1-2 sentences.

Then provide your analysis in the following format:
TYPE: <one of the following values>
- NO_QUESTION
- SINGLE_QUESTION
- SINGLE_QUESTION_WITH_ANSWER
- MULTIPLE_QUESTIONS
- MULTIPLE_QUESTIONS_WITH_ANSWERS
system
# 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...

-
If you did what you said you did and computed the integral correctly, you would come out with the answer $-12 + 5 \ln 5$, which indeed is negative. If you came up with something that does not equate with either that answer or the "official" answer, your integration was wrong somewhere. If you want someone to say where it was wrong, you'll have to show your work. – David K Jul 19 '14 at 12:24
I got to what you just said – Bak1139 Jul 19 '14 at 12:26
Great, so everything is OK except for the part where you assumed the first function would be greater than the second. Knowing it's the other way around (and you get a good clue about that from the result of your integration), you just need to flip the sign of your answer. – David K Jul 19 '14 at 12:29

@Mary knows that because $$\frac{x^3+2x^2-8x+6}{x+4} - \frac{x^3+x^2-10x+9}{x+4}=\frac{x^2+2x-3}{x+4}=\frac{(x-1)(x+3)}{x+4}$$ and since on $-3<x<1$ so the last fraction in negative. A simple figure could clear the point.

-
answer key gives differnt answer....not the one you get with this integral – Bak1139 Jul 19 '14 at 11:33
@Bak1139: What is that answer? Indeed it is $\approx 4$. – Babak S. Jul 19 '14 at 11:43
im afraid not... – Bak1139 Jul 19 '14 at 11:45
@Bak1139: What is the upper function? – Babak S. Jul 19 '14 at 11:47
Nice picture! ;-) – amWhy Jul 19 '14 at 15:42

According to my calculations, you should get the right result by calculating the difference of integrals from $-1$ to $3$, but you must subtract the first one from the second, or take the absolute value of what you get.

However, for future reference, when calculating the area confined between the graphs of say the two integrable functions $f(x)$ and $g(x)$ you must break the integrals where $f(x)-g(x)$ changes sign.

e.g.: if you want to calculate the area confined by your two functions, from $-3$ to $2$, you woud do $$\mid\int_{-3}^{1}f(x)dx-\int_{-3}^{1}g(x)dx\mid+\mid\int_{1}^{2}f(x)dx-\int_{1}^{2}g(x)dx\mid$$

Don't forget to take the absolute value of each difference of integrals, or substract the lesser one from the greater one.

So, as a rule of thumb for this kind of exercises, see if the difference of functions has any roots, and if it has, see if the difference changes its sign when going from the left to the right of one root.

The answer is indeed $12-5\ln 5$.

(this is a plot of the functions, the orange area is $12-5\ln 5$)

-
whihc caclualitons exactly? computer similations doesnt count you dont have it on test time? – Bak1139 Jul 19 '14 at 12:17
I put the graph there so you get a better idea of what's happening. I calculated whether the first function minus the second one changes sign on the interval $[-1,3]$. – Robert Badea Jul 19 '14 at 12:20
What software did you use for plotting that beautiful graph? – Lucian Jul 19 '14 at 12:25
I used Desmos Calculator for the graph. desmos.com – Robert Badea Jul 19 '14 at 16:55

For $-3<x<1$:

$$\frac{x^3+2x^2-8x+6}{x+4} < \frac{x^3+x^2-10x+9}{x+4}$$

So you have to calculate the integral of the difference $\frac{x^3+x^2-10x+9}{x+4}-\frac{x^3+2x^2-8x+6}{x+4}$ to find the area.

EDIT:

$$\frac{x^3+x^2-10x+9}{x+4}-\frac{x^3+2x^2-8x+6}{x+4}=\frac{-x^2-2x+3}{x+4}=-\frac{x^2+4x-2x}{x+4}+\frac{3}{x+4}=-\frac{x(x+4)}{x+4}+\frac{2x}{x+4}+\frac{3}{x+4}=-x+2\frac{x+4-4}{x+4}+\frac{3}{x+4}=-x+2-\frac{5}{x+4}$$

$$\int_{-3}^1 -x+2-\frac{5}{x+4} dx=[-\frac{x^2}{2}+2x-5\ln{|x+4|}]_{-3}^1=-\frac{1}{2}+2-5\ln{5}+\frac{9}{2}+6+5 \ln{1}=12-5\ln{5}$$

-
how do you know that? – Bak1139 Jul 19 '14 at 11:25
also when you do that you get an answert which utterly different then the answer key... – Bak1139 Jul 19 '14 at 11:30
$$\frac{x^3+2x^2-8x+6}{x+4} - \frac{x^3+x^2-10x+9}{x+4}=\frac{x^2+2x-3}{x+4}=\frac{x^2+2x}{x+4}-\frac{3}{x+4}=‌​\frac{x^2+4x-2x}{x+4}-\frac{3}{x+4}=\frac{x(x+4)}{x+4}-\frac{2x}{x+4}-\frac{3}{x+‌​4}=x-2\frac{x+4-4}{x+4}-\frac{3}{x+4}= \\ x-2 \left ( 1-\frac{4}{x+4} \right )-\frac{3}{x+4}=x-2 +\frac{5}{x+4}$$ So, $$\int_{-3}^1 \frac{x^3+2x^2-8x+6}{x+4} - \frac{x^3+x^2-10x+9}{x+4} dx= \int_{-3}^1 x-2 +\frac{5}{x+4} dx= [\frac{x^2}{2}-2x+5 \ln{|x+4|} ]_{-3}^1=\frac{1}{2}-2+5 \ln{5}-\frac{9}{2}-6-5\ln1=-12+5 \ln{5}$$ – Mary Star Jul 19 '14 at 11:59
I fail to see your point – Bak1139 Jul 19 '14 at 12:03
Where did you get stuck? – Mary Star Jul 19 '14 at 12:04

There are a few things you can pick up from these answers that could be very helpful in future problems.

When you first looked at the problem, you decided to integrate $$\frac{x^3+2x^2-8x+6}{x+4} - \frac{x^3+x^2-10x+9}{x+4}.$$ You expected this to produce a positive number. But in fact if you evaluate this difference at $x = 0$ you will easily see that the difference is negative. So you should expect to get a negative answer from the integration of that difference between the functions unless the two graphs cross each other somewhere else in the interval $-3 < x < 1$.

Which brings up the point that you really should know where the graphs cross, for otherwise you might not get the correct answer. (You might subtract part of the area from the rest, instead of adding all the area together.) So you must look for zeros of the difference between functions. That's why it's so important that $$\frac{x^3+2x^2-8x+6}{x+4} - \frac{x^3+x^2-10x+9}{x+4} = \frac{(x - 1)(x + 3)}{x+4}.$$ This tells you where the zeros are: at $x = 1$ and at $x = -3$. You now know that the first curve is below the second curve over the entire interval in question, so you can simply take the second function minus the first function (which is positive) and integrate it from $x = -3$ to $x = 1$. The rest of the task is simply to compute that integral correctly.

You don't really need to draw a beautiful graph, you just need to know a few facts about it, namely whether it's one function above the other the whole way or whether the functions cross (and if so, where they cross). The rest of it is all equations and integrals.

-

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}

-
your polynomial didvision is wrong... – Bak1139 Jul 19 '14 at 11:36
No, it's correct. The quantity inside the absolute value is negative, so when you take the absolute value, it reverses its sign. – David K Jul 19 '14 at 11:57
how did you make first concsluiosn? – Bak1139 Jul 19 '14 at 12:17
user
The text passage contains a mathematical question about calculating the area confined by two given graphs, and multiple users provide answers or hints to solve the problem. The official answer is also mentioned.

TYPE: SINGLE_QUESTION_WITH_ANSWER