Chapter 4: Partial Differentiation
Section 4.4: Directional Derivative
Example 4.4.6
At the point P:1,2,3, and in the direction of the point Q:3,−7,5, obtain the directional derivative of fx,y,z=esiny zcoshx yz−y.
Solution
Mathematical Solution
Let v=Q−P = 3−75−123 = 2−92 be the vector from point P to point Q.
Let u=v/v = v/89 be the unit vector from point P in the direction of point Q,
Let R=P+t u be the line through P in the direction defined by u. The parametric equations of this line are
x=1+2 t89,y=2−9 t89,z=3+2 t89
Along this line the function values of f are given by
wt=fxt,yt,zt=ⅇsin⁡2−9 t89⁢3+2 t89⁢cosh⁡1+2 t89⁢2−9 t891+11 t89
The requisite directional derivative is then
w′0=−189⁢⁢ⅇsin⁡6⁢23⁢cos⁡6⁢cosh⁡2+27⁢sinh⁡2
Alternatively, obtain the vector
∇fx=a|f(x)P = fx i+fy j+fz kx=a|f(x)P = 2⁢ⅇsin⁡6⁢sinh⁡23⁢ⅇsin⁡6⁢cosh⁡2⁢cos⁡6+sinh⁡22⁢ⅇsin⁡6⁢cosh⁡2⁢cos⁡6−sinh⁡2
and compute its dot product with u so that
DufP
=2⁢ⅇsin⁡6⁢sinh⁡23⁢ⅇsin⁡6⁢cosh⁡2⁢cos⁡6+sinh⁡22⁢ⅇsin⁡6⁢cosh⁡2⁢cos⁡6−sinh⁡2·1892−92
=−189⁢⁢ⅇsin⁡6⁢23⁢cos⁡6⁢cosh⁡2+27⁢sinh⁡2
Maple Solution - Interactive
Initialize
Tools≻Load Package: Student Multivariate Calculus
Loading Student:-MultivariateCalculus
Context Panel: Assign Name (Be sure to use Maple's exponential "e".)
f=ⅇsiny zcoshx yz−y→assign
Context Panel: Assign Name
v=2,−9,2→assign
u=v/v2→assign
Instant answer via the Context Panel
Type the name f and press the Enter key.
Context Panel: Student Multivariate Calculus≻Differentiate≻Directional Derivative Fill in the "Variables, Point, and Vector" dialog as shown in Figure 4.4.6(a) Click the OK button.
Context Panel: Simplify≻Simplify
Figure 4.4.6(a) Variables, Point, and Vector dialog
f
ⅇsin⁡y⁢z⁢cosh⁡x⁢yz−y
→directional derivative
489⁢ⅇsin⁡6⁢sinh⁡2⁢89−989⁢3⁢cos⁡6⁢ⅇsin⁡6⁢cosh⁡2+3⁢ⅇsin⁡6⁢sinh⁡2⁢89+289⁢2⁢cos⁡6⁢ⅇsin⁡6⁢cosh⁡2−2⁢ⅇsin⁡6⁢sinh⁡2⁢89
= simplify
−189⁢89⁢ⅇsin⁡6⁢23⁢cos⁡6⁢cosh⁡2+27⁢sinh⁡2
Obtain ∇fx=a|f(x)P
Context Panel: Student Multivariate Calculus≻Differentiate≻Gradient (See Figure 4.4.6(b).)
Context Panel: Select Element≻1
Context Panel: Assign to a Name≻Gf
Figure 4.4.6(b) Gradient dialog
ⅇsiny zcoshx yz−y→gradient →select entry 1 →assign to a nameGf
Obtain DufP=(∇fx=a|f(x)P)·u
Common Symbols palette: Dot product operator Press the Enter key.
Gf·u
Solution from first principles:
Obtain R=P+t u, the line through P with direction u
Write a sequence of point P and unit vector u.
Context Panel: Student Multivariate Calculus≻ Lines & Planes≻Line
Context Panel: Student Multivariate Calculus≻ Lines & Planes≻Representation≻parametric (See Figure 4.4.6(c).)
Context Panel: Assign to a Name≻L
Figure 4.4.6(c) Line representation dialog
1,2,3,u→make line<< Line 1 >>→representationx=1+289⁢t⁢89,y=2−989⁢t⁢89,z=3+289⁢t⁢89→assign to a nameL
Obtain wt=fxt,yt,zt and DufP=w′0
Expression palette: Evaluation template Press the Enter key.
Context Panel: Differentiate≻With Respect To≻t
Context Panel: Evaluate at a Point≻t=0
fx=a|f(x)L
ⅇsin⁡2−989⁢t⁢89⁢3+289⁢t⁢89⁢cosh⁡1+289⁢t⁢89⁢2−989⁢t⁢891+1189⁢t⁢89
→differentiate w.r.t. t
−989⁢89⁢3+289⁢t⁢89+289⁢2−989⁢t⁢89⁢89⁢cos⁡2−989⁢t⁢89⁢3+289⁢t⁢89⁢ⅇsin⁡2−989⁢t⁢89⁢3+289⁢t⁢89⁢cosh⁡1+289⁢t⁢89⁢2−989⁢t⁢891+1189⁢t⁢89+ⅇsin⁡2−989⁢t⁢89⁢3+289⁢t⁢89⁢289⁢89⁢2−989⁢t⁢891+1189⁢t⁢89−989⁢1+289⁢t⁢89⁢891+1189⁢t⁢89−1189⁢1+289⁢t⁢89⁢2−989⁢t⁢89⁢891+1189⁢t⁢892⁢sinh⁡1+289⁢t⁢89⁢2−989⁢t⁢891+1189⁢t⁢89
→evaluate at point
−2389⁢89⁢ⅇsin⁡6⁢cos⁡6⁢cosh⁡2−2789⁢ⅇsin⁡6⁢sinh⁡2⁢89
Maple Solution - Coded
Install the Student MultivariateCalculus package.
withStudent:-MultivariateCalculus:
Define f. Be sure to use Maple's exponential "e".
f≔ⅇsiny zcoshx yz−y:
Define v as a list.
v≔2,−9,2:
Obtain the directional derivative
Apply the DirectionalDerivative and simplify commands.
simplifyDirectionalDerivativef,x,y,z=1,2,3,v
There is a DirectionalDerivative command in the Student VectorCalculus package, and a DirectionalDiff command in the Physics:-Vectors package. These alternatives will not be explored further; instead, the following two computations are provided.
Compute DufP=(∇fx=a|f(x)P)·u
Apply the Gradient command, evaluating the resulting vector at point P.
Gf≔Gradientf,x,y,z=1,2,3
Apply to the list v the convert/Vector command, then apply the Normalize command to normalize the resulting vector, thereby obtaining the unit vector u.
V≔convertv,Vector:u≔NormalizeV
Invoke the Dotproduct command and apply the simplify command.
simplifyDotProductGf,u = −189⁢89⁢ⅇsin⁡6⁢23⁢cos⁡6⁢cosh⁡2+27⁢sinh⁡2
Obtain the directional derivative from first principles
Use the Line and GetRepresentation commands to obtain the parametric form of the line through P in the direction of u.
L≔GetRepresentationLine1,2,3,u,form=parametric
x=1+289⁢t⁢89,y=2−989⁢t⁢89,z=3+289⁢t⁢89
Use the eval command to obtain the value of f along line L, then apply the simplify command.
w≔simplifyevalf,L
ⅇ−sin⁡17921⁢9⁢t⁢89−178⁢2⁢t⁢89+267⁢cosh⁡189⁢2⁢t⁢89+89⁢9⁢t⁢89−17811⁢t⁢89+89
Apply the diff command to wt, then the eval and simplify commands to obtain w′0.
simplifyevaldiffw,t,t=0 = −189⁢89⁢ⅇsin⁡6⁢23⁢cos⁡6⁢cosh⁡2+27⁢sinh⁡2
<< Previous Example Section 4.4 Next Example >>
© Maplesoft, a division of Waterloo Maple Inc., 2024. 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