先求直线与抛物线两个交点横坐标
y = x^2
y = x+2
x^2 -x -2 = 0
(x-2)(x+1) = 0
x1 = -1,x2 = 2
所求面积 = 直线从x1到x2 与X轴围成面积 - 抛物线从x1 到x2与X轴围成面积
S = ∫(x+2)dx -∫x^2 dx
= (x^2 /2 + 2x) - x^3/3 || 从x1 到x2
= [(2^2 /2 + 2*2) - 2^3/3 ] - [(-1)^2/2 + 2*(-1) - (-1)^3/3]
= [6 - 8/3] - [1/2 -2 + 1/3]
= 6 - 8/3 - 1/2 + 2 - 1/3
= 9/2