how to find point of intersection between curve and line