Math 101- Calculus QATAR UNIVERSITY

Math 101- Calculus QATAR UNIVERSITY
Mathematica Lab 4 - Applications of the Derivative
ã
When you expand the cells below ENABLE DYNAMICS when prompted.
Extrema, Inflection Points, and the First and Second Derivative Test
Before you begin, open up the Classroom Assistant palette unless it is already open. (Click on
Palettes on the Mathematica menu at the top of the screen.) Select the advanced tab in the
Classroom Assistant palette.
f1 HxL = 18 x 4 + 22 x 3 - 291 x 2 - 396 x over the interval [-5,5] and determine the
Example 1(a)
Find all local and absolute extrema points of :
intervals on which the function is increadsing or decreasing.
Ÿ Before we look at any new commands, first we'll answer the question using the commands and
techniques that we have already covered in the previous labs.
ã First let's define the function. Evaluate the cell (SHIFT+ENTER)
f1Ax_E = 18 x4 + 22 x3 - 291 x2 - 396 x
ã Now, graph the function by evaluating the cell (SHIFT+ENTER)
Plot@f1@xD, 8x, -5, 5<, PlotRange ® 8-2000, 500<D
Ÿ We can find the critical numbers, where the tangent is zero, by solving the equation
f1'(x) =0
ã Ask Mathematica to solve the equation: (SHIFT+ENTER)
Solve@f1'@xD Š 0D
Ÿ We'll use the First Derivative Test to test the value of the slope to each side of the critical points.
ã Execute the following and state the intervals on which the function is increasing or
decreasing.
8f1'@-4D, f1'@-3D, f1'@-1D, f1'@-2  3D, f1'@0D, f1'@11  4D, f1'@3D<
2
3
The function f1(x) is decreasing over the intervals (-5,-3) and (- ,
2
3
ing over the interval (-3,- ) and (
11
).
4
The function is increas-
11
,5).
4
Ÿ Confirming the graph above, we have MININUMS at x =-3 and x=11/4, and we have a MAXIMUM at
x=-2/3.
Now we can determine any ABSOLUTE EXTREMAS by finding the outputs at the critical numbers and
endpoints.
2
Lab4.nb
Confirming the graph above, we have MININUMS at x =-3 and x=11/4, and we have a MAXIMUM at
x=-2/3.
Now we can determine any ABSOLUTE EXTREMAS by finding the outputs at the critical numbers and
endpoints.
ã Execute the following to reveal the outputs at the endpoints and critical numbers:
8f1@-5D, f1@-3D, f1@-2  3D, f1@11  4D, f1@5D<
ã We need the Numerical decimal approximations, place the N[ ] command around the
entire results above and re-execute to get the decimal form.
We can conclude that the function has an absolute Maximum at x=5, and an absolute Minimum at x=11/4.
f1 HxL = 18
Example 1(b)
x4
Find any inflection points of :
+ 22 x 3 - 291 x 2 - 396 x over the interval [-5,5] and determine the
intervals on which the function is
concave up or concave down.
Ÿ First we find the critical numbers from the second derivative
Solve@f1''@xD Š 0D
ã Place the N[ ] command around the results above and re-execute to get the
approximation.
Ÿ We'll use the second derivative to test the concavity at each side of the critical points.
ã Execute the following and state the intervals on which the function is increasing or
decreasing.
8f1''@-3D, f1''@-1.97523D, f1''@0D, f1''@1.36412D, f1''@3D<
The function f1(x) is concave up over the intervals (-5, -11- 363613 ) and ( -11+ 363613 , 5). The
function is concave down over the interval ( -11- 363613 , -11+ 363613 ).
Ÿ Confirming the graph above, we have Inflection points at x =
-11±
3613
or x»-1.975 and x»1.364.
36
To be specific the coordinates for the infelction points can be given by finding the outputs.
ã Execute the following:
:f1B
Ÿ
-11 -
3613
36
F, f1B
-11 +
3613
36
F>
Lab4.nb
3
ã WOW, that's wild. Ask Mathematica to simplify it by placing the Simplify[ ] around the
results above and re-execute.
Much better.
Optimization
Example 2 Find all local extrema of the function
f2HxL = x sin x , over the interval [0, 2Π] and
identify any absolute extremas.
Ÿ First Let's take a look at what the function looks like over the given interval.
ã Executing the following cell ( SHIFT+ENTER)
Plot@5 x Sin@xD, 8x, -Pi, 3 Pi<D
There are three local extrema and two absolute extrema.
Ÿ LOCAL EXTREMA-Mathematica has built in commands to find local and absoute extrema. For local
extrema we use the following commands:
FindMaximum[f,{x,xo}]
FindMinimum[f,{x,xo}]
Finds the maximum value of f starting at x=xo
Finds the minimum value of f starting at x=xo
ã Execute the following to find the first maximum point starting at x=-Π:
FindMaximum@5 x Sin@xD, 8x, -Pi<D
ã Find the second maximum point by changin the starting point to x=0 in the command
above
you should've received an error message since (x=0) is a critical point itself we cannot
start here, instead try x=1.
ã Find the third maximum point by changing the starting point.
ã Execute the following to find the first maximum point starting at x=-Π:
FindMaximum@5 x Sin@xD, 8x, -Pi<D
4
Lab4.nb
Ÿ ABSOLUTE EXTREMA-Mathematica can locate an absoute extrema using the following numerical
commands:
NMaximize[{f, constraint},x]
Finds the maximum value of f satisfying
the given constraint.
NMinimize[{f, constraint},x]
Finds the minimum value of f satisfying
the given constraint.
ã Execute the following to find the absolute Max and Min respectively:
NMaximize@85 x Sin@xD, -Pi < x < 3 Pi<, xD
NMinimize@8x Sin@xD, -Pi < x < 3 Pi<, xD
The constraint in optimization problems could be another equation as shown in the example below
Example 3 A farmer would like to fence off an area along a barn 200 meters long. The farmer has
200 meters of fence availble. The farmer would like to maximize the area. Find the dimensions that yield
the maximum area.
ã Slide through the different values of x to see the different possibilities
x HmetersL=
Area=
3668.72 m2
y=
In this situation, the constraint is the perimeter of the fence being at most 200 meters, that is
200 ³ 2x + y. The fenced area is given by x*y.
Lab4.nb
5
In this situation, the constraint is the perimeter of the fence being at most 200 meters, that is
200 ³ 2x + y. The fenced area is given by x*y.
ã Execute the following to get the max area with the given constraint.
NMaximize@8x y, 2 x + y £ 200<, 8x, y<D
The Mean-Value Theorem
The Mean-Value Theorem (MVT)
Let f(x) be continuous on the closed interval [a,b] and differentiable on the open interval (a,b).
Then there is at least one point c in (a,b) such that:
f ' HcL =
Example 4- Mean-Value
Consider the function
f HbL-f HaL
b-a
f HxL = x3 - 44 x
over the
interval (-6,6).
ã First fill in the proper values of (a, b)=(-6, 6), then use the slider to approximate all the c
values that satisfy the conclusion of the MVT
c
a
0
b
1
150
100
50
6
-5
-4
-3
-2
-1
1
2
3
4
5
6
-50
-100
-150
Now let's use mathematica to solve it algebraically.
6
Lab4.nb
Now let's use mathematica to solve it algebraically.
ã Define the Function
f3 HxL = x 3 - 44 x by executing the cell:
f3Ax_E = x3 - 44 x
We can enter the result of the MVT into Mathematica as an equation to be solved
ã Execute the following to find all values of c that satisfies the MVT.
SolveB
f3@-6D - f3@6D
-6 - 6
Š f3'@cD, cF
Related Rates
Example 5
A boat is being winched towards a dock with rope at the rate of 0.25 meters per
second. The tip of the boat is 1.5 meters below the winch. How fast is the boat moving towards the dock
when it is 1 meter away?
ã Play the following to see an animation of the situation:
x HmetersL= The distance of the boat from the wench:
Lab4.nb
7
dx
boat speed= =
dt
0.259886 ms
Lengths
s= 5.5
y=1.5
x=5.28194
s=
x2 + y2
A right triangle is the basic geometric shape that models the situation. This means that the variables in the situation are related by
Pythagorean's Theorem s2 = x2 + y 2 where only s and x change over time and y is constant over time.
First we must define the variables as a function of time t.
ã Execute the following to define x and s as a function of t
xAt_E
sAt_E
8
Lab4.nb
ã Let's approximate 2 2 to 20 decimal places:
D@x@tD^2 + y^2 Š s@tD^2, tD
Solve@2 x@tD x¢ @tD Š 2 s@tD s¢ @tD, x'@tDD
When x is 1 meter away from the dock, we can use Pythagorean's Theorem to find s.
ã Evaluate to solve for s.
SolveA12 + 1.52 == s2 , sE
Clearly, we'll reject the negative value and accept the positive value. Now we can use our last two results to find the speed of the
boat when the boat is i meter away from the dock.
ã Execute to evaluate the desired rate:
1.80278 * 0.25
1
Lab4.nb
9
Ÿ What would you have to change in the commands above if we want to know the speed of the boat
when it is a half meter away from the dock? Make the changes and find the result.
Exercises
Ÿ The following set of exercises are to be completed in a new Mathematica notebook and printed out for
a grade. On the top of the notebook make sure to include your name, ID, and Instructor.
1. For the function f(x)=
32+8 x-12 x 2 -2 x 3 +x 4
(a) Find the coordinates for unction
x 4 +1
2. Identify any local or absolute extrema of
y = -160 x - 50 x 2 +2 x 3 over the
interval [-5,28].
3. A rectangle has one corner at the origin (0,0) and another point along the curve
y = 4 - x 2 , find the dimensions where the rectangle has the greatest area.
4. Return to Example3 above, for the function f HxL = x - 44 x ,
(a) Use mathematica to find all c values that satisfy the conclusion od the MVT over the
interval (-5,4).
(b) Slide the c value to 4, then find an interval (a,b) such that the hypothesis of the MVT
holds the result c=4.
3
f HxL = x 3 - 4 x 2 over the interval @- 2, 4D.
5. Find all values of c that satisfy the conclusion to the MVT for the function
6. An airplane flying at an altitude of 1000 meters goes over a radar with a speed of 300 meters
per hour. How fast is the distance between the airplane and radar changing
when they are 1200
meters apart.
7. A 10 meter ladder is leaning against a building. If the base of the ladder is pulled away at the
rate of one meter per second, how fast is the top of the ladder moving down
the wall when the ladder
is 5 meters from the base of the house?