Chapter 3: Applications of Differentiation
Section 3.8: Optimization
Which point on the graph of fx=sinhx−x e−3 x, −1≤x≤3, is closest to the point 1,7?
The slider attached to Figure 3.8.5(a) varies the location of the point x,fx, and shows the line segment between that point and 1,7.
As the point x,fx traverses the graph of f, the value of d, the distance between that point and 1,7 is displayed beneath the graph.
With care, and relative to the pixel density on the display device, it is possible to estimate that there are three relative minima, one of which is the absolute minimum.
These minima are approximately 7, 1.8, and 1.6; the corresponding critical numbers are approximately −0.023,−0.77, and 2.61. Hence, the absolute minimum of approximately 1.6 occurs near x=2.61.
Figure 3.8.5(a) Distance from 1,7 to graph of f
The square of the distance between x,fx and 1,7 is given by
Minimizing the square of the distance is equivalent, but computationally simpler, than minimizing the distance itself.
A graph of d=Fx is given in Figure 3.8.5(b). The two relative minima, and the relative maximum are clearly visible.
The implied constraints are contained in the finite domain, namely, −1≤x≤3.
Figure 3.8.5(b) Graph of d=Fx
Numeric solution via Context Panel
Form a sequence of the objective function (distance) and the constraint equation (curve).
Context Panel: Optimization≻ Minimize (local)
The return consists of a list with two objects. The first object is the optimal value of the objective function; the second, a list of the parameter values giving this extreme value.
Numeric Solution via the Optimization Assistant
Form a sequence of the objective function (distance)and the constraint equation (curve).
(The Optimization Assistant launches with the objective function and constraint equation inserted into the appropriate fields.)
In the Options section, select Minimize
Click the Solve button. (See Figure 3.8.5(c).)
Click the Quit button to exit the Optimization Assistant and have it write the Solution to the underlying worksheet.
to launch the Optimization Assistant with the data embedded.
Figure 3.8.5(c) Solution by Optimization Assistant
Define fx and the objective function Fx
Context Panel: Assign Function
fx=sinhx−x ⅇ−3 x→assign as functionf
Context Panel: Assign Function
Fx=x−12+fx−72→assign as functionF
Obtain the critical numbers
Figure 3.8.5(d) contains a graph of F′x. The critical numbers for F are the zeros of F′, and those zeros are the x-intercepts in Figure 3.8.5(d).
From Figure 3.8.5(d), the critical numbers are near −1 and 0, and between 2 and 3.
f := sinh(x)-x*exp(-3*x);
F := (x-1)^2+(f-7)^2;
Figure 3.8.5(d) Graph of F′x
Tools≻Load Package: Student Calculus 1
Write the equation F′x=0 and press the Enter key.
Context Panel: Student Calculus1≻Solve≻Find Roots
Complete Roots dialog as per Figure 3.8.5(e).
Context Panel: Assign to a Name≻c
(Individual critical numbers can then be referenced as c1,c2,c3.)
Figure 3.8.5(e) Roots dialog
→assign to a name
Apply the Second-Derivative test
c1 = −0.7711222385
F″c1 = 2058.863556
c2 = −0.02316600177
F″c2 = −90.78527373
c3 = 2.610424247
F″c3 = 92.44081429
Calculate d at the critical numbers and at the endpoints
Context Panel: Evaluate and Display Inline
Fc1 = 1.771977164 Relative minimum
Fc2 = 7.072733480 Relative maximum
Fc3 = 1.627534600 Relative minimum
F−1. = 12.07708977 Absolute maximum
F3. = 3.620129089 Relative maximum
The CriticalPoints command in the Student Calculus1 package will return all zeros of the first derivative in a specified interval. The numeric option allows it to find such zeros numerically.
The fsolve command computes numerically all zero of a polynomial equation. For a transcendental equation it returns just one solution, either in a specified interval, or at the end of a Newton iteration starting from a given initial value. This latter is the behavior of the "Solve Numerically from point" option in the Context Panel for Solve.
The Roots, CriticalPoints, and InflectionPoints commands in the Student Calculus1 package will return all zeros of the underlying equations. Unfortunately, Context Panel access to these more powerful and useful commands has not yet been provided.
CriticalPointsFx,x=−1..3,numeric = −0.7711222385,−0.02316600177,2.610424247
<< Previous Example Section 3.8
Next Example >>
© Maplesoft, a division of Waterloo Maple Inc., 2023. All rights reserved. This product is protected by copyright and distributed under licenses restricting its use, copying, distribution, and decompilation.
For more information on Maplesoft products and services, visit www.maplesoft.com
Download Help Document