过P点作Y轴的垂线交Y轴于M点,过A点作AN垂直于MP,交MP于N点.
则:
S=(三角形MPB面积)-(矩形MNAO面积)-(三角形ANP面积)
=X*(Y+2)/2 - 4*Y - Y*(X-4)/2
=X*(X-6+2)/2 - 4*(X-6) - (X-6)*(X-4)/2
=0.5X^2-2*X - 4X+24 - 0.5X^2+5X-12
=12-X
图:
过P点作Y轴的垂线交Y轴于M点,过A点作AN垂直于MP,交MP于N点.
则:
S=(三角形MPB面积)-(矩形MNAO面积)-(三角形ANP面积)
=X*(Y+2)/2 - 4*Y - Y*(X-4)/2
=X*(X-6+2)/2 - 4*(X-6) - (X-6)*(X-4)/2
=0.5X^2-2*X - 4X+24 - 0.5X^2+5X-12
=12-X
图: