MATH 149 LABORATORY ASSIGNMENT 2 USING DERIVATIVES TO FIND ABSOLUTE MAXIMA AND MINIMA DERIVATIVES Differentiation is a process that in most instances involves only a few rules which are used over and over Even for relatively simple functions such as those in the examples and exercises that follow the results may quickly become rather complicated and unwieldy Therefore differentiation lends itself very well to execution by a computer If f has been entered as a function in MAPLE then the command D f yields the derivative of f For example let f x x2 sec x We will find the first and second derivatives of f restart f x x 2 sec x f x x2 sec x D f x 2 x sec x x2 sec x tan x D D f x 2 sec x 4 x sec x tan x x2 sec x tan x 2 x2 sec x 1 tan x 2 To compute the n th derivative we can use D n f thus the third derivative of the function f defined above is D 3 f x 6 sec x tan x 6 x sec x tan x 2 6 x sec x 1 tan x 2 x2 sec x tan x 3 5 x2 sec x tan x 1 tan x 2 FINDING THE ABSOLUTE MAXIMUM AND MINIMUM The theory tells us that a continuous function defined on a closed interval always has an absolute maximum M and an absolute minimum m i e there are numbers and in a b such that m f f x f M for all x in a b Moreover to find and and thus M and m we need only consider the endpoints a and b and the critical points i e the solutions to the equation f x 0 and values of x for which f x does not exist As an example we will find the absolute maximum and minimum of f x sin x xcos x2 on the interval 0 Since we had previously assigned the name f to the function x2 sec x we must enter restart if we want to use f for a different function restart clears the memory of all previous name assignments made in the current Maple session restart f x sin x x cos x 2 f x sin x x cos x2 plot f 0 Pi First use the above graph and the cursor to find approximate values of the absolute maximum and minimum Next use the derivative to find exact values of the absolute maximum and minimum D f x cos x cos x2 2 x2 sin x2 plot D f 0 Pi color green This function has a derivative at every point Therefore the only critical points are the solutions of the equation f x 0 solve D f x 0 x RootOf cos Z cos Z2 2 Z2 sin Z2 MAPLE cannot find a general solution so we will use the fsolve command to find decimal approximations to the solutions From the graph it is clear that there are four solutions of f x 0 since the graph of f x cuts the X axis four times X 1 fsolve D f x 0 x 0 8 1 X1 0 9201095708 X 2 fsolve D f x 0 x 1 6 2 X2 1 824276689 X 3 fsolve D f x 0 x 2 4 2 6 X3 2 509682366 X 4 fsolve D f x 0 x 3 Pi X4 3 086995383 From the graph it is clear that each of the intervals specified in the above four commands contains exactly one zero of f x Finally we calculate the values of f at these four points and at 0 and the endpoints of the interval under consideration f X 1 f X 2 f X 3 f X 4 f 0 f Pi 1 405270457 0 8246330741 3 100075094 3 015500542 0 cos 2 For comparison purposes we calculate a decimal expansion for f evalf f Pi 2 835869698 Therefore the absolute maximum is f X3 3 100075094 and the absolute minimum is f X4 3 015500542 Instead of typing evalf f Pi we could have used the percent symbol that acts as a placeholder for the last value computed by Maple For example f Pi cos 2 Now use the percent symbol evalf 2 835869698
View Full Document
Unlocking...