Question: using matlab,consider the interval [-2:3] In differential calculus you will find a number of questions such as the following. Given the polynomial p(x) = x^4
using matlab,consider the interval [-2:3]
In differential calculus you will find a number of questions such as the following. Given the polynomial p(x) = x^4 - 3x^3 - 5x^2 + 2x + 20, (roughly) plot it by evaluating it at a number of integer values of x, and then drawing a smooth curve through the data points. Next, find any and all maxima and/or minima by solving p'(x) = 0, and put dots at them. And, finally, find any and all points of inflection, and determine the interval or intervals where it the curve concave up and concave down. Of course, you can only answer (at least some) of these questions if you have access to a calculator or a computer, because finding any local maxima or minima will require solving a cubic equation. But you have MATLAB handy, so let's answer these questions with MATLAB's help. However, you are not allowed to use any anonymous functions or function m-files - and you are never allowed to use the inline function. Also, you cannot use any loops or if tests. You can only use poly, polyval, polyder, and roots. If you were doing this problem by hand, you might find points on the curve for integer values of x, so do so for x belongsto [-3, 5] using MATLAB to plot them using asterisks. Then you might draw a smooth curve through these points, so use MATLAB to plot the interpolating polynomial y = p(x) using a solid line. In addition, plot red dotted lines at x = 0 and y = 0 since MATLAB does not draw the axes through the origin. Calculate p'(x) (using polyder), and plot it using a dashed line. Find its zeroes, which are the local maxima and minima of p(x), and put x's at these points on the curve y = p(x). Use disp to write p has a maximum at p has minima at and where you must use num2str to replace each by the appropriate value. (Note that roots does not necessarily return the zeroes in order.) Calculate p"(x) and plot it using a dash-dot line. Find its zeroes and also put 0's at these points on the curve y = p(x). Use disp to write p is concave up in the interval (-Inf, ) p is concave down in the interval (, ) p is concave up in the interval (, Inf)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
