Question: Problem 2 (10 pts) Logic operators can be used to find where two curves are close to intersection. In this case, the tolerance is the
Problem 2 (10 pts) Logic operators can be used to find where two curves are close to intersection. In this case, the tolerance is the maximum difference between the two curves for the curves to be considered close to intersection. In this problem we will be evaluating a parabola and a line, whose general forms are given below: a) Use the input function to ask for A, B, C, D, E, and the tolerance. Name each variable respectively b) Create variable x that has values from -10 to 10 with a increment of 0.25. c) Solve for yl and y2 for al values of x using the equations above. Name these solutions arrays yl and d) Usingthe fn) function, determine where the curves are within the tolerance specified. Name this e Graph both curves (y1 and y2) on the same graph. Label the x-axis 'X', label the y-axis Y. yl should f) Plot the x and y coordinates that are within the tolerance for both curves. Plot the data points as array close ind be plotted with a blue line and y2 should be plotted with a red ne green stars Try your code with the following values: A-2 B=3 E= 50 tolerance-2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
