This is an area question of the type:
A=int_a^b f(x) dx - int_a^b g(x) dx
Where f(x) = 2 and g(x) = 2sin(pix) and a=1 and b=2.
First of all it helps to find out the points of intersection for f and g.
Letting 2=2sin(pix), we find that x=1/2, which is irrelevant as the integral is between 1 and 2.
Next we antidifferentiate f(x):
int 2 dx = 2x
Antidifferentiate g(x):
int 2sin(pix) dx = (-2cos(pix))/pi
The coefficient of -2 can be disregarded. By the chain rule we can see that the the pi in the denominator is eliminated when multiplying by the pi in the argument of the function, i.e.
d/dx(-2cos(pix)) = d/dx(pix)*d/dx(-2cos(u)) where u=pix
This derivative becomes 2pisin(pix), hence the division by pi is necessary.
Finally to integrate:
The area between f(x) and g(x) is given by:
int_1^2 2 dx - int_1^2 2sin(pix) dx
=[2x]_1^2 - [(-2cos(pix))/pi]_1^2
=4-2 - (-2/pi - 2/pi)
=2 + 4/pi
I hope this helps!