Find the area between $y = -x^2+4x$ and $y = -x +4$. I'm a high schooler. I'm studying for an exam and got stuck with calculating the area between two functions.
Picture of the question :

(1) $y = -x^2+4x$
  (2) $y = -x +4$
  $A(1,5), B(4,0)$
  

I should calculate the area from A to B it's highlighted 
I have tried calculating it more than once, but the answer that I get is wrong. Here is one of my attempts:

I's not clean or tidy, but anyway can you guys please tell me what is wrong? The answer should be 27.

Here is the full question (it's in Hebrew):  
https://drive.google.com/file/d/0B-6_IPgklxcLM0FxVE13c0tNSHc/view?usp=sharing
 A: I think you're doing the wrong subtraction. It should be the integral of the parabola minus the integral of the line.
By the way, the intersection points are $A(1,3)$ and $B(4,0)$.
There is a very simple strategy for computing these areas. Find the intersection points:
$$
\begin{cases}
y=-x^2+4x \\[4px]
y=-x+4
\end{cases}
$$
that gives $-x^2+4x=-x+4$, that is, $x^2-5x+4=0$. The roots are $1$ and $4$. Then the area is
$$
\int_1^4 (-x^2+4x)\,dx+\int_4^1(-x+4)\,dx
$$
In other words, you start from one intersection point and follow the perimeter in clockwise order. This also works for more than two curves; if one part of the path is a vertical segment, it contributes $0$.
This amounts to doing
$$
\int_1^4\bigl((-x^2+4x)-(-x+4)\bigr)\,dx=\int_1^4(-x^2+5x-4)\,dx=
\Bigl[-\frac{x^3}{3}+\frac{5x^2}{2}-4x\Bigr]_1^4
$$
Now it's just a tedious computation.
A: If $f(x)\ge g(x)$ for $ x\in [a,b]$ area between f(x) and g(x) on segment [a,b] can be calculated using formula
$$
P=\int_{a}^{b}(f(x)-g(x))dx
$$
In your example $f(x)=-x^2+4x$ and $g(x)=-x+4$
$
P=\int_{1}^{4}((-x^2+4x)-(-x+4))dx=\\
\int_{1}^{4}(-x^2+4x+x-4)dx=\\
\int_{1}^{4}(-x^2+5x-4)dx=\\
\int_{1}^{4}-x^2dx+5\int_{1}^{4}xdx-4\int_{1}^{4}dx=\\
\frac{-x^3}{3}|_{1}^{4}+5\frac{x^2}{2}|_{1}^{4}-4x|_{1}^{4}=\\
-\frac{64}{3}+\frac{1}{3}+40-\frac{5}{2}-16+4=\\
-21+44-\frac{37}{2}=\\
23-\frac{37}{2}=\\
\frac{9}{2}
$
A: The area is 19/3
f1[x_] = 4 x - x^2;
f2[x_] = 4 - x;

The two functions intersect for
soln = Solve[f1[x] == f2[x], x]


{{x -> 1}, {x -> 4}}

The intersection points are
pts = {x, f1[x]} /. soln


{{1, 3}, {4, 0}}

Plot[{f1[x], f2[x]}, {x, 0, 4},
 Filling -> {1 -> {2}},
 PlotLegends -> {f1[x], f2[x]},
 Epilog -> {Red, AbsolutePointSize[6], Point[pts]}]


The shaded area between the curves is
Integrate[Abs[f1[x] - f2[x]], {x, 0, 4}]


19/3

Alternatively,
Integrate[f2[x] - f1[x], {x, 0, 1}] +
 Integrate[f1[x] - f2[x], {x, 1, 4}]


19/3

rgn = ImplicitRegion[{0 <= x <= 4 &&
     Min[f1[x], f2[x]] <= y <= Max[f1[x], f2[x]]},
   {x, y}];

RegionPlot[rgn, AspectRatio -> 1/GoldenRatio]


Area[rgn]


19/3

RegionMeasure[rgn]


19/3

