y1= diff (y) y2= diff (y,2) y3= diff (y,3) y4= diff (y,4) x = linspace (-10,10); y=x.^3 -3*x +2*exp(0.5*x); y1=exp(x/2) + 3*x.^2 - 3; y2=6*x + exp(x/2)/2; y3=exp(x/2)/4 + 6; y4=exp(x/2)/8; plot (x,y); hold on plot (x,y1); hold on plot (x,y2); hold on plot (x,y3); hold on plot (x,y4); l=plot (x,y4); set (l, 'Color', 'black') set (plot (x,y), 'Color', 'blue') set (plot (x,y1), 'Color', 'red') set (plot (x,y2), 'Color', 'green') set (plot (x,y3), 'Color', 'yellow') xlabel('ABSCISSA') ylabel('COORDINATE') title ('HAZEL JANE P. MARQUEZ') legend ('f= x^3 -3*x +2*exp(0.5*x)','1st Derivative of f(x)','2nd Derivative of f(x)','3rd Derivative of f(x)','4th Derivative of f(x)' ) legend ('f= x^3 -3x +2e^(0.5x)','1st Derivative of f(x)','2nd Derivative of f(x) ','3rd Derivative of f(x)','4th Derivative of f(x)' ) legend ('f= x^3 -3x +2e^0.5x','1st Derivative of f(x)','2nd Derivative of f(x)', '3rd Derivative of f(x)','4th Derivative of f(x)' ) legend ('f= x^3 -3x +2e^(0.5x)','1st Derivative of f(x)','2nd Derivative of f(x) ','3rd Derivative of f(x)','4th Derivative of f(x)' ) legend ('y= x^3 -3x +2e^(0.5x)','1st Derivative of f(x)','2nd Derivative of f(x) ','3rd Derivative of f(x)','4th Derivative of f(x)' )