% Set up the expression of function "y" % syms: creating symbolic variables and functions syms x y = 5.0 * cos(2.0 *x) - 2.0 * x* sin(2.0 * x); % plot the graph of the function "y" ezplot(y,[0.5,2]); g=diff(y,x) % compute the derivative of "y" % compute the zeros of the equation g = 0; "g" is the % derivative of "f". The soln is saved in root_g; root_g = fzero(char(g),[1, 2]) % evaluate the value of "y" at the point where x = root_g % subs(): Substitute parameter x with a floating-point number. %vpa(): Approximate the result of substitution returned by % subs() with floating-point values out = vpa(subs(y,x, root_g)) left = vpa(subs(y,x,1)) right = vpa(subs(y,x,2)) %f = cos(x); %Tay3 = taylor(f,4)