How to find the area between 2 curves given an interval Determine the area of the region within the interval $[0, 1]$ bounded by the curves $f(x)=2 \sin (x)$ and $g(x)=\displaystyle\frac{4-x}{2}$ correct to $2$ decimal places.


The first thing I did was:
$\int _0^{\pi }\:2\sin\left(x\right)-\left(\frac{4-x}{2}\right)$
and I got: $4-\frac{8\pi -\pi ^2}{4}$ or $0.18$
but my textbook answer gives: 4.29 units
I then graph this on Geogebra and get:


So is it the other way around? $g(x) - f(x)$? Also does this means that I should always visualise or graph the functions first?
Refer to the graph:
$\hspace{3cm}$
The area to be calculated is: $A1+A2+A3$. Sanity check: the area $A1$ is less than $1$ (compare with triangle side 2 and height 1); the area of $A2$ is slightly more than $A1$. So, the total area should be around $2$, not $4$.

To calculate exactly, first you need to find the intersection points:
$$2\sin x=2-\frac x2 \Rightarrow x_1\approx 0.89,x_2\approx 2.85$$
Next you need to break up the interval:
$$A=A1+A2+A3=\int_0^{0.89} \left(2-\frac x2-2\sin x\right)dx+\int_{0.89}^{2.85}\left(2\sin x-2+\frac x2\right)dx+\int_{2.85}^{\pi} \left(2-\frac x2-2\sin x\right)dx\approx 1.99.$$
WolframAlpha answers: Intersection points and the total area.
For the area between the curves you have the right idea, just you need to count all area as positive (unsigned area). Try using $$\int_0^\pi|f(x)-g(x)|dx$$