thanks Plot the function fx x3 2x 10sin2xe09x and its deri

thanks

Plot the function f(x) = x^3 - 2x^- 10sin^2x-e^0.9x and its derivative for -2 lessthanorequalto xle 4 in one figure. Plot the function with a solid line, and the derivative with a dashed line. Add a legend and label the axes.

Solution

%start the script

X=-2:0.01:4;

Y= (x. ^3)-(2*x. ^2)-(10*sin(x). ^2)-(exp (0.9*x));

Yd= (3*x. ^2)-(4*x)-(20*sin(x).*cos(x))-(0.9*exp( 0.9*x));

Plot (x, y, ’line style’,’-‘)

Line (x, yd,’line style’,--‘)

Legend (‘f(x) ‘ , f’’(x)’)

Xlabel (‘x’);

Ylabel (‘magnitude’);

thanks Plot the function f(x) = x^3 - 2x^- 10sin^2x-e^0.9x and its derivative for -2 lessthanorequalto xle 4 in one figure. Plot the function with a solid line,

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site