${}$
Chapter 3: Applications of Differentiation
${}$
Section 3.8: Optimization
${}$

Example 3.8.5


${}$
Which point on the graph of $f\left(x\right)\=\mathrm{sinh}\left(x\right)x{e}^{3x}$, $1\le x\le 3$, is closest to the point $\left(1\,7\right)$?



${}$

Solution



Analysis


${}$
•

The slider attached to Figure 3.8.5(a) varies the location of the point $\left(x\,f\left(x\right)\right)$, and shows the line segment between that point and $\left(1\,7\right)$.

•

As the point $\left(x\,f\left(x\right)\right)$ traverses the graph of $f$, the value of $d$, the distance between that point and $\left(1\,7\right)$ 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$.


${}$

$x\=$
=
⇒ $d\=$

Figure 3.8.5(a) Distance from $\left(1\,7\right)$ to graph of $f$




•

The square of the distance between $\left(x\,f\left(x\right)\right)$ and $\left(1\,7\right)$ is given by

$F\left(x\right)\={\left(x1\right)}^{2}\+{\left(f\left(x\right)7\right)}^{2}$
•

Minimizing the square of the distance is equivalent, but computationally simpler, than minimizing the distance itself.

•

A graph of $d\=\sqrt{F\left(x\right)}$ 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\le x\le 3$.



Figure 3.8.5(b) Graph of $d\=\sqrt{F\left(x\right)}$






${}$


Numeric Solution


${}$
Numeric solution via Context Panel

•

Form a sequence of the objective function (distance) and the constraint equation (curve).

•

Context Panel: Optimization≻ Minimize (local)


$\sqrt{{\left(x1\right)}^{2}\+{\left(y7\right)}^{2}}\,y\=\mathrm{sinh}\left(x\right)x\cdot \mathrm{exp}\left(3\cdot x\right)$$\stackrel{\text{minimize}}{\to}$$\left[{1.62753460035659115}{\,}\left[{x}{\=}{2.61042424734159}{\,}{y}{\=}{6.76462239075871}\right]\right]$



${}$
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).

•

Context Panel:
Optimization≻Optimization Assistant
(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.

•

Click
to launch the Optimization Assistant with the data embedded.



Figure 3.8.5(c) Solution by Optimization Assistant






${}$


Analytic Solution


${}$
Define $f\left(x\right)$ and the objective function $F\left(x\right)$

•

Controldrag $f\left(x\right)\=\dots$
Context Panel: Assign Function


$f\left(x\right)\=\mathrm{sinh}\left(x\right)x{ExponentialE;}^{3x}$$\stackrel{\text{assign as function}}{\to}$${f}$

•

Controldrag $F\left(x\right)\=\dots$
Context Panel: Assign Function


$F\left(x\right)\={\left(x1\right)}^{2}\+{\left(f\left(x\right)7\right)}^{2}$$\stackrel{\text{assign as function}}{\to}$${F}$

Obtain the critical numbers

•

Figure 3.8.5(d) contains a graph of $F\prime \left(x\right)$. The critical numbers for $F$ are the zeros of $F\prime$, 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);

>

P:=plot(diff(F,x),x=1..3,100..130,tickmarks=[4,2]);
print(P);


Figure 3.8.5(d) Graph of $F\prime \left(x\right)$




•

Tools≻Load Package: Student Calculus 1


Loading Student:Calculus1

•

Write the equation $F\prime \left(x\right)\=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 ${c}_{1}\,{c}_{2}\,{c}_{3}$.)



Figure 3.8.5(e) Roots dialog







$F\prime \left(x\right)\=0$
${2}{}{x}{}{2}{\+}{2}{}\left({\mathrm{sinh}}{}\left({x}\right){}{x}{}{{\ⅇ}}^{{}{3}{}{x}}{}{7}\right){}\left({\mathrm{cosh}}{}\left({x}\right){}{{\ⅇ}}^{{}{3}{}{x}}{\+}{3}{}{x}{}{{\ⅇ}}^{{}{3}{}{x}}\right){\=}{0}$
$\stackrel{\text{roots}}{\to}$
$\left[{}{0.7711222385}{\,}{}{0.02316600177}{\,}{2.610424247}\right]$
$\stackrel{\text{assign to a name}}{\to}$
${c}$

Apply the SecondDerivative test

${c}_{1}$ = ${}{0.7711222385}$

$F\u2033\left({c}_{1}\right)$ = ${2058.863556}$${}$

${c}_{2}$ = ${}{0.02316600177}$

$F\u2033\left({c}_{2}\right)$ = ${}{90.78527373}$${}$

${c}_{3}$ = ${2.610424247}$

$F\u2033\left({c}_{3}\right)$ = ${92.44081429}$${}$

Calculate $d$ at the critical numbers and at the endpoints

•

Context Panel: Evaluate and Display Inline


$\sqrt{F\left({c}_{1}\right)}$ = ${1.771977164}$ Relative minimum

•

Context Panel: Evaluate and Display Inline


$\sqrt{F\left({c}_{2}\right)}$ = ${7.072733480}$ Relative maximum

•

Context Panel: Evaluate and Display Inline


$\sqrt{F\left({c}_{3}\right)}$ = ${1.627534600}$ Relative minimum

•

Context Panel: Evaluate and Display Inline


$\sqrt{F\left(1.\right)}$ = ${12.07708977}$ Absolute maximum

•

Context Panel: Evaluate and Display Inline


$\sqrt{F\left(3.\right)}$ = ${3.620129089}$ Relative maximum



${}$
${}$


Useful Commands


${}$
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.
•

Tools≻Load Package: Student Calculus 1


Loading Student:Calculus1

$\mathrm{CriticalPoints}\left(F\left(x\right)\,x\=1..3\,\mathrm{numeric}\right)$ = $\left[{}{0.7711222385}{\,}{}{0.02316600177}{\,}{2.610424247}\right]$${}$



${}$



${}$
<< Previous Example Section 3.8
Next Example >>
${}$
© Maplesoft, a division of Waterloo Maple Inc., 2021. 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${}$
${}$
${}$
${}$
${}$
${}$
${}$
${}$
${}$
${}$
