Determination of function using graph and vertical line test