derived brute solution which is more accurate than my first attempt. using special area function.