For A Homework Project I have to find the point at which two curves are tangent.
I wrote the following script but it gives me an error:
Warning: 2 equations in 1 variables.
I do not understand this warning, but my teacher said it should not be there. Here is My Script:
syms x y;y1 = x^3-3*x+4;y2 = 3*(x^2-x);y1_prime = diff(y1);y2_prime = diff(y2);possible_xs = solve(y1 == y2, x1_prime == x2_prime);slope = subs(y1_prime, x, x_point);y_point = subs(y1, x,x_point);tangent_line = solve(y - y_point == slope*(x - x_point), y); fprintf('The equation for the tangent line is: %s\n', string(tangent_line));
Please Help. Thank You 🙂
Best Answer