Question: Exercise 6.2 Write an M-file in which you define the function f (x) sin(x2 )cos x and have Matlab compute the first two derivatives as

Exercise 6.2 Write an M-file in which you define the function f (x) sin(x2 )cos x and

have Matlab compute the first two derivatives as functions df and df2. Using plot, create a graph of the function f and the first two derivatives over the interval [,]. Use different line styles for each plot and a label to distinguish which is which. You may want to truncate the y-axis display to the interval [10,10]. This can be done using the command ylim. Publish your result, after dividing the M-file into appropriate cells so that the output is closely related to the input statements.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!