Consider the parabola defined by y = x^2 − 2x − 4. The distance d(x) from the origin (0, 0) to a point (x, y) on the parabola is d(x) = √x^2 + (x^2 − 2x − 4)^2
(a) Write a MATLAB program and function M-file to plot d(x) for −2 ≤ x ≤ 4, and use thefminbndcommand to find the point (x and y coordinates) on the parabola that is closest to the origin and the minimum distance.
(b) Write a MATLAB program using thefzerocommand to find the point(s) on the parabola at a distance of 3 from the origin.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here