The area under a curve between two points can be found out by doing the integral between the two points. In other words, the integral
![\int ^7_0f(x)dx\text{ = Area betw}een\text{ x=1 and x=2 + Area betw}een\text{ x=2 and x=4 + Area betwe}en\text{ x=4 and x=5 - Area betw}een\text{ x=5 and x=7}]()
Let's make a picture of the problem
Then, the integral will be equal to

The area of the black region is given by the area of the triangular part plus the rectangular part, that is

The area of the red zone is the area of the rectangle

The green area is equal to the area of the green triangle,

and the blue area is the area of the blue triangle,

By substituting these values, the integral is given by

Therefore, the answer is:
