{"id":871,"date":"2021-09-03T17:27:48","date_gmt":"2021-09-03T17:27:48","guid":{"rendered":"https:\/\/courses.lumenlearning.com\/calculus3\/?post_type=chapter&#038;p=871"},"modified":"2022-10-29T02:12:43","modified_gmt":"2022-10-29T02:12:43","slug":"three-dimensional-gradients-and-directional-derivatives","status":"publish","type":"chapter","link":"https:\/\/courses.lumenlearning.com\/calculus3\/chapter\/three-dimensional-gradients-and-directional-derivatives\/","title":{"raw":"Three-Dimensional Gradients and Directional Derivatives","rendered":"Three-Dimensional Gradients and Directional Derivatives"},"content":{"raw":"<div class=\"textbox learning-objectives\">\r\n<h3>Learning Objectives<\/h3>\r\n<ul>\r\n \t<li><span class=\"os-abstract-content\">Calculate directional derivatives and gradients in three dimensions.<\/span><\/li>\r\n<\/ul>\r\n<\/div>\r\n<p id=\"fs-id1167793418113\">The definition of a gradient can be extended to functions of more than two variables.<\/p>\r\n\r\n<div id=\"fs-id1167793932636\" class=\"ui-has-child-title\" data-type=\"note\">\r\n<div class=\"textbox shaded\">\r\n<h3 style=\"text-align: center;\">Definition<\/h3>\r\n\r\n<hr \/>\r\n\r\nLet\u00a0[latex]w=f(x, y ,z)[\/latex] be a function of three variables such that\u00a0[latex]f_x[\/latex],\u00a0[latex]f_y[\/latex], and\u00a0[latex]f_z[\/latex] exist. The vector\u00a0[latex]\\nabla{f}(x,y,z)[\/latex] is called the gradient of\u00a0[latex]f[\/latex] and is defined as\r\n<p style=\"text-align: center;\">[latex]\\nabla{f}(x,y,z)=f_x(x,y,z){\\bf{i}}+f_y(x,y,z){\\bf{j}}+f_z(x,y,z){\\bf{k}}.[\/latex]<\/p>\r\n[latex]\\nabla{f}(x,y,z)[\/latex] can also be written as\u00a0[latex]\\text{grad }f(x,y,z)[\/latex].\r\n\r\n<\/div>\r\nCalculating the gradient of a function in three variables is very similar to calculating the gradient of a function in two variables. First, we calculate the partial derivatives\u00a0[latex]f_x[\/latex],\u00a0[latex]f_y[\/latex], and\u00a0[latex]f_z[\/latex], and then\u00a0we use\u00a0the Equation for [latex]\\nabla{f}(x,y,z)[\/latex].\r\n\r\n<\/div>\r\n<div class=\"textbox exercises\">\r\n<h3>Example: finding gradients in three dimensions<\/h3>\r\nFind the gradient\u00a0[latex]\\nabla{f}(x,y,z)[\/latex] of each of the following functions:\r\n\r\na.\u00a0[latex]f(x,y,z)=5x^2-2xy+y^2-4yz+z^2+3xz[\/latex]\r\n\r\nb. [latex]f(x,y,z)=e^{-2z}\\sin 2x\\cos 2y[\/latex]\r\n\r\n[reveal-answer q=\"268490354\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"268490354\"]\r\n\r\nFor both parts a. and b., we first calculate the partial derivatives [latex]f_x[\/latex],\u00a0[latex]f_y[\/latex], and\u00a0[latex]f_z[\/latex], then use\u00a0the Equation for [latex]\\nabla{f}(x,y,z)[\/latex].\r\n\r\na.\r\n\r\n[latex]\\hspace{1cm}\\begin{align}\r\n\r\nf_x(x,y,z)&amp;=10x-2y+3z,f_y(x,y,z)=-2x+2y-4z\\text{ and }f_z(x,y,z)=3x-4y+2z\\text{ so,} \\\\\r\n\r\n\\nabla{f}(x,y,z)&amp;=f_x(x,y,z){\\bf{i}}+f_y(x,y,z){\\bf{j}}+f_z(x,y,z){\\bf{k}} \\\\\r\n\r\n&amp;=(10x-2y+3z){\\bf{i}}+(-2x+2y-4z){\\bf{j}}+(-4x+3y+2z){\\bf{k}}\r\n\r\n\\end{align}[\/latex]\r\n\r\nb.\r\n\r\n[latex]\\hspace{1cm}\\begin{align}\r\n\r\nf_x(x,y,z)&amp;=-2e^{-2z}\\cos2x\\cos 2y,f_y(x,y,z)=-2e^{-2z}\\sin 2x\\sin2y\\text{ and }f_z(x,y,z)=-2e^{-2z}\\sin 2x\\cos 2y\\text{ so,} \\\\\r\n\r\n\\nabla{f}(x,y,z)&amp;=f_x(x,y,z){\\bf{i}}+f_y(x,y,z){\\bf{j}}+f_z(x,y,z){\\bf{k}} \\\\\r\n\r\n&amp;=(2e^{-2z}\\cos2x\\cos 2y){\\bf{i}}+(-2e^{-2z}){\\bf{j}}+(-2e^{-2z}){\\bf{k}} \\\\\r\n\r\n&amp;=2e^{-2z}(\\cos2x\\cos 2y{\\bf{i}}-\\sin 2x\\sin2y{\\bf{j}}-\\sin 2x\\cos 2y{\\bf{k}}).\r\n\r\n\\end{align}[\/latex]\r\n\r\n[\/hidden-answer]\r\n\r\n<\/div>\r\n<div class=\"textbox key-takeaways\">\r\n<h3>Try it<\/h3>\r\nFind the gradient\u00a0[latex]\\nabla{f}(x,y,z)[\/latex] of\u00a0[latex]f(x,y,z)=\\frac{x^2-3y^2+z^2}{2x+y-4z}[\/latex].\r\n\r\n[reveal-answer q=\"123678759\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"123678759\"]\r\n\r\n[latex]\\nabla{f}(x,y,z)=\\frac{2x^2+2xy+6y^2-8xz-2z^2}{(2x+y-4z)^2}{\\bf{i}}-\\frac{x^2+12xy+3y^2-24yz+z^2}{(2x+y-4z)^2}{\\bf{j}}+\\frac{4x^2-12y^2-4z^2+4xz+2yz}{(2x+y-4z)^2}{\\bf{k}}[\/latex]\r\n\r\n[\/hidden-answer]\r\n\r\n<\/div>\r\n\r\n[caption]Watch the following video to see the worked solution to the above Try It[\/caption]\r\n\r\n<center><iframe src=\"\/\/plugin.3playmedia.com\/show?mf=8186165&amp;p3sdk_version=1.10.1&amp;p=20361&amp;pt=375&amp;video_id=ddsfJFjA9iY&amp;video_target=tpm-plugin-n7ilxjtp-ddsfJFjA9iY\" width=\"800px\" height=\"450px\" frameborder=\"0\" marginwidth=\"0px\" marginheight=\"0px\"><\/iframe><\/center><center>You can view the <a href=\"https:\/\/course-building.s3.us-west-2.amazonaws.com\/Calculus+3\/Calc+3+transcripts\/CP4.32_transcript.html\">transcript for \u201cCP 4.32\u201d here (opens in new window).<\/a><\/center>&gt;The directional derivative can also be generalized to functions of three variables. To determine a direction in three dimensions, a vector with three components is needed. This vector is a unit vector, and the components of the unit vector are called\u00a0<span id=\"82440dbc-9afa-4f68-ab57-5fb973b6da83_term193\" class=\"no-emphasis\" data-type=\"term\"><em data-effect=\"italics\">directional cosines<\/em><\/span>. Given a three-dimensional unit vector [latex]\\bf{u}[\/latex] in standard form (i.e., the initial point is at the origin), this vector forms three different angles with the positive [latex]x-,y-[\/latex] and [latex]z-[\/latex]axes. Let\u2019s call these angles [latex]\\alpha,\\beta[\/latex] and [latex]\\gamma[\/latex]. Then the directional cosines are given by [latex]\\cos\\alpha,\\cos\\beta[\/latex] and [latex]\\cos\\gamma[\/latex]. These are the components of the unit vector [latex]\\bf{u}[\/latex]; since [latex]\\bf{u}[\/latex] is a unit vector, it is true that [latex]\\cos^2\\alpha+\\cos^2\\beta+\\cos^2\\gamma=1[\/latex].\r\n<div class=\"textbox shaded\">\r\n<h3 style=\"text-align: center;\">Definition<\/h3>\r\n\r\n<hr \/>\r\n\r\nSuppose\u00a0[latex]w=f(x,y,z)[\/latex] is a function of three variables with a domain of\u00a0[latex]D[\/latex], Let\u00a0[latex](x_0,y_0,z_0)\\in{D}[\/latex] and let\u00a0[latex]{\\bf{u}}=cos\\alpha{\\bf{i}}+\\cos\\beta{\\bf{j}}+\\cos\\gamma{\\bf{k}}[\/latex] be a unit vector. Then, the directional derivative of\u00a0[latex]f[\/latex] in the direction of [latex]u[\/latex] is given by\r\n<p style=\"text-align: center;\">[latex]D_{\\bf{u}}f(x_0,y_0,z_0)=\\displaystyle{\\lim_{t\\to0}}\\frac{f(x_0+t\\cos\\alpha,y_0+t\\cos\\beta,z_0+t\\cos\\gamma)-f(x_0,y_0,z_0)}t,[\/latex]<\/p>\r\nproviding the limit exists.\r\n\r\n<\/div>\r\nWe can calculate the directional derivative of a function of three variables by using the gradient, leading to a formula that is analogous to\u00a0the dot product definition of the Directional Derivative of a Function of Two Variables.\r\n<div class=\"textbox shaded\">\r\n<h3 style=\"text-align: center;\">Theorem: Directional derivative of a function of three variables<\/h3>\r\n\r\n<hr \/>\r\n\r\nLet\u00a0[latex]f(x,y,z)[\/latex] be a differentiable function of three variables and let\u00a0[latex]{\\bf{u}}=\\cos\\alpha{\\bf{i}}+\\cos\\beta{\\bf{j}}+\\cos\\gamma{\\bf{k}}[\/latex] be a unit vector. Then, the directional derivative of\u00a0[latex]f[\/latex] in the direction of\u00a0[latex]{\\bf{u}}[\/latex] is given by\r\n<p style=\"text-align: left;\">[latex]\\hspace{6cm}\\begin{align}<\/p>\r\nD_{\\bf{u}}f(x,y,z)&amp;=\\nabla{f}(x,y,z)\\cdot{\\bf{u}} \\\\\r\n\r\n&amp;=f_x(x,y,z)\\cos\\alpha+f_y(x,y,z)\\cos\\beta+f_z(x,y,z)\\cos\\gamma.\r\n\r\n\\end{align}[\/latex]\r\n\r\n<\/div>\r\nThe three angles [latex]\\alpha,\\beta[\/latex], and [latex]\\gamma[\/latex] determine the unit vector [latex]\\bf{u}[\/latex]. In practice, we can use an arbitrary (nonunit) vector, then divide by its magnitude to obtain a unit vector in the desired direction.\r\n<div class=\"textbox exercises\">\r\n<h3>Example: finding a directional derivative in three dimensions<\/h3>\r\nCalculate\u00a0[latex]D_{\\bf{u}}f(1,-2,3)[\/latex] in the direction of\u00a0[latex]v=-{\\bf{i}}+2{\\bf{j}}+2{\\bf{k}}[\/latex] for the function\r\n<p style=\"text-align: center;\">[latex]f(x,y,z)=5x^2-2xy+y^2-4yz+z^2+3xz[\/latex].<\/p>\r\n[reveal-answer q=\"960004812\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"960004812\"]\r\n\r\nFirst, we find the magnitude of [latex]{\\bf{v}}[\/latex]:\r\n<p style=\"text-align: center;\">[latex]\\|{\\bf{v}}\\|=\\sqrt{(-1)^2+(2)^2+(2)^2}=3[\/latex]<\/p>\r\nTherefore\u00a0[latex]\\frac{{\\bf{v}}}{\\|{\\bf{v}}\\|}=\\frac{-{\\bf{i}}+2{\\bf{j}}+2{\\bf{k}}}3=-\\frac13{\\bf{i}}+\\frac23{\\bf{j}}+\\frac23{\\bf{k}}[\/latex] is a unit vector in the direction of\u00a0[latex]{\\bf{v}}[\/latex], so\u00a0[latex]\\cos\\alpha=-\\frac13[\/latex],\u00a0[latex]\\cos\\beta=\\frac23[\/latex], and\u00a0[latex]\\cos\\gamma=\\frac23[\/latex]. Next, we calculate the partial derivatives of\u00a0[latex]f[\/latex]:\r\n\r\n[latex]\\hspace{7cm}\\begin{align}\r\n\r\nf_x(x,y,z)&amp;=10x-2y+3z \\\\\r\n\r\nf_y(x,y,z)&amp;=-2x+2y-4z \\\\\r\n\r\nf_z(x,y,z)&amp;=-4y+2z+3x,\r\n\r\n\\end{align}[\/latex]\r\n\r\nThen substitute them into the\u00a0Directional Derivative of a Function of Three Variables:\r\n\r\n[latex]\\hspace{5cm}\\begin{align}\r\n\r\nD_{\\bf{u}}f(x,y,z)&amp;=10x-2y+3z \\\\\r\n\r\nf_y(x,y,z)&amp;=f_x(x,y,z)\\cos\\alpha+f_y(x,y,z)\\cos\\beta+f_z(x,y,z)\\cos\\gamma \\\\\r\n\r\n&amp;=(10x-2y+3z)(-\\frac13)+(-2x+2y-4z)(\\frac23)+(-4y+2z+3x)(\\frac23) \\\\\r\n\r\n&amp;=-\\frac{10x}3+\\frac{2y}3-\\frac{3z}3-\\frac{4x}3+\\frac{4y}3-\\frac{8z}3-\\frac{8y}3+\\frac{4z}3+\\frac{6x}3 \\\\\r\n\r\n&amp;=-\\frac{8x}3-\\frac{2y}3-\\frac{7z}3\r\n\r\n\\end{align}[\/latex]\r\n\r\nLast, to find\u00a0[latex]D_{\\bf{u}}f(1,-2,3)[\/latex], we substitute\u00a0[latex]x=1[\/latex],\u00a0[latex]y=-2[\/latex], and\u00a0[latex]z=3[\/latex]:\r\n\r\n[latex]\\hspace{5cm}\\begin{align}\r\n\r\nD_{\\bf{u}}f(1,-2,3)&amp;=-\\frac{8(1)}3-\\frac{2(-2)}3-\\frac{7(3)}3 \\\\\r\n\r\n&amp;=-\\frac83+\\frac43-\\frac{21}3 \\\\\r\n\r\n&amp;=-\\frac{25}3.\r\n\r\n\\end{align}[\/latex]\r\n\r\n[\/hidden-answer]\r\n\r\n<\/div>\r\n<div class=\"textbox key-takeaways\">\r\n<h3>Try it<\/h3>\r\nCalculate\u00a0[latex]D_{\\bf{u}}f(x,y,z)[\/latex] and\u00a0[latex]D_{\\bf{u}}f(0,-2,5)[\/latex] in the direction of\u00a0[latex]{\\bf{v}}=-3{\\bf{i}}+12{\\bf{j}}-4{\\bf{k}}[\/latex] for the function\u00a0[latex]f(x,y,z)=3x^2+xy-2y^2+4yz-z^2+2xz[\/latex].\r\n\r\n[reveal-answer q=\"370457713\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"370457713\"]\r\n<p style=\"text-align: left;\">[latex]\\hspace{5cm}\\begin{align}<\/p>\r\nD_{\\bf{u}}f(x,y,z)&amp;=-\\frac{3}{13}(6x+y+2z)-\\frac{12}{13}(x-4y+4z)-\\frac{4}{13}(2x+4y-2z) \\\\\r\n\r\nD_{\\bf{u}}f(0,-2,5)&amp;=\\frac{384}{13}\r\n\r\n\\end{align}[\/latex]\r\n\r\n[\/hidden-answer]\r\n\r\n<\/div>\r\n\r\n[caption]Watch the following video to see the worked solution to the above Try It[\/caption]\r\n\r\n<center><iframe src=\"\/\/plugin.3playmedia.com\/show?mf=8186166&amp;p3sdk_version=1.10.1&amp;p=20361&amp;pt=375&amp;video_id=h64xLVnvPRw&amp;video_target=tpm-plugin-o4yqlso5-h64xLVnvPRw\" width=\"800px\" height=\"450px\" frameborder=\"0\" marginwidth=\"0px\" marginheight=\"0px\"><\/iframe><\/center><center>You can view the <a href=\"https:\/\/course-building.s3.us-west-2.amazonaws.com\/Calculus+3\/Calc+3+transcripts\/CP4.33_transcript.html\">transcript for \u201cCP 4.33\u201d here (opens in new window).<\/a><\/center>&nbsp;","rendered":"<div class=\"textbox learning-objectives\">\n<h3>Learning Objectives<\/h3>\n<ul>\n<li><span class=\"os-abstract-content\">Calculate directional derivatives and gradients in three dimensions.<\/span><\/li>\n<\/ul>\n<\/div>\n<p id=\"fs-id1167793418113\">The definition of a gradient can be extended to functions of more than two variables.<\/p>\n<div id=\"fs-id1167793932636\" class=\"ui-has-child-title\" data-type=\"note\">\n<div class=\"textbox shaded\">\n<h3 style=\"text-align: center;\">Definition<\/h3>\n<hr \/>\n<p>Let\u00a0[latex]w=f(x, y ,z)[\/latex] be a function of three variables such that\u00a0[latex]f_x[\/latex],\u00a0[latex]f_y[\/latex], and\u00a0[latex]f_z[\/latex] exist. The vector\u00a0[latex]\\nabla{f}(x,y,z)[\/latex] is called the gradient of\u00a0[latex]f[\/latex] and is defined as<\/p>\n<p style=\"text-align: center;\">[latex]\\nabla{f}(x,y,z)=f_x(x,y,z){\\bf{i}}+f_y(x,y,z){\\bf{j}}+f_z(x,y,z){\\bf{k}}.[\/latex]<\/p>\n<p>[latex]\\nabla{f}(x,y,z)[\/latex] can also be written as\u00a0[latex]\\text{grad }f(x,y,z)[\/latex].<\/p>\n<\/div>\n<p>Calculating the gradient of a function in three variables is very similar to calculating the gradient of a function in two variables. First, we calculate the partial derivatives\u00a0[latex]f_x[\/latex],\u00a0[latex]f_y[\/latex], and\u00a0[latex]f_z[\/latex], and then\u00a0we use\u00a0the Equation for [latex]\\nabla{f}(x,y,z)[\/latex].<\/p>\n<\/div>\n<div class=\"textbox exercises\">\n<h3>Example: finding gradients in three dimensions<\/h3>\n<p>Find the gradient\u00a0[latex]\\nabla{f}(x,y,z)[\/latex] of each of the following functions:<\/p>\n<p>a.\u00a0[latex]f(x,y,z)=5x^2-2xy+y^2-4yz+z^2+3xz[\/latex]<\/p>\n<p>b. [latex]f(x,y,z)=e^{-2z}\\sin 2x\\cos 2y[\/latex]<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q268490354\">Show Solution<\/span><\/p>\n<div id=\"q268490354\" class=\"hidden-answer\" style=\"display: none\">\n<p>For both parts a. and b., we first calculate the partial derivatives [latex]f_x[\/latex],\u00a0[latex]f_y[\/latex], and\u00a0[latex]f_z[\/latex], then use\u00a0the Equation for [latex]\\nabla{f}(x,y,z)[\/latex].<\/p>\n<p>a.<\/p>\n<p>[latex]\\hspace{1cm}\\begin{align}    f_x(x,y,z)&=10x-2y+3z,f_y(x,y,z)=-2x+2y-4z\\text{ and }f_z(x,y,z)=3x-4y+2z\\text{ so,} \\\\    \\nabla{f}(x,y,z)&=f_x(x,y,z){\\bf{i}}+f_y(x,y,z){\\bf{j}}+f_z(x,y,z){\\bf{k}} \\\\    &=(10x-2y+3z){\\bf{i}}+(-2x+2y-4z){\\bf{j}}+(-4x+3y+2z){\\bf{k}}    \\end{align}[\/latex]<\/p>\n<p>b.<\/p>\n<p>[latex]\\hspace{1cm}\\begin{align}    f_x(x,y,z)&=-2e^{-2z}\\cos2x\\cos 2y,f_y(x,y,z)=-2e^{-2z}\\sin 2x\\sin2y\\text{ and }f_z(x,y,z)=-2e^{-2z}\\sin 2x\\cos 2y\\text{ so,} \\\\    \\nabla{f}(x,y,z)&=f_x(x,y,z){\\bf{i}}+f_y(x,y,z){\\bf{j}}+f_z(x,y,z){\\bf{k}} \\\\    &=(2e^{-2z}\\cos2x\\cos 2y){\\bf{i}}+(-2e^{-2z}){\\bf{j}}+(-2e^{-2z}){\\bf{k}} \\\\    &=2e^{-2z}(\\cos2x\\cos 2y{\\bf{i}}-\\sin 2x\\sin2y{\\bf{j}}-\\sin 2x\\cos 2y{\\bf{k}}).    \\end{align}[\/latex]<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"textbox key-takeaways\">\n<h3>Try it<\/h3>\n<p>Find the gradient\u00a0[latex]\\nabla{f}(x,y,z)[\/latex] of\u00a0[latex]f(x,y,z)=\\frac{x^2-3y^2+z^2}{2x+y-4z}[\/latex].<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q123678759\">Show Solution<\/span><\/p>\n<div id=\"q123678759\" class=\"hidden-answer\" style=\"display: none\">\n<p>[latex]\\nabla{f}(x,y,z)=\\frac{2x^2+2xy+6y^2-8xz-2z^2}{(2x+y-4z)^2}{\\bf{i}}-\\frac{x^2+12xy+3y^2-24yz+z^2}{(2x+y-4z)^2}{\\bf{j}}+\\frac{4x^2-12y^2-4z^2+4xz+2yz}{(2x+y-4z)^2}{\\bf{k}}[\/latex]<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p>Watch the following video to see the worked solution to the above Try It<\/p>\n<div style=\"text-align: center;\"><iframe loading=\"lazy\" src=\"\/\/plugin.3playmedia.com\/show?mf=8186165&amp;p3sdk_version=1.10.1&amp;p=20361&amp;pt=375&amp;video_id=ddsfJFjA9iY&amp;video_target=tpm-plugin-n7ilxjtp-ddsfJFjA9iY\" width=\"800px\" height=\"450px\" frameborder=\"0\" marginwidth=\"0px\" marginheight=\"0px\"><\/iframe><\/div>\n<div style=\"text-align: center;\">You can view the <a href=\"https:\/\/course-building.s3.us-west-2.amazonaws.com\/Calculus+3\/Calc+3+transcripts\/CP4.32_transcript.html\">transcript for \u201cCP 4.32\u201d here (opens in new window).<\/a><\/div>\n<p>&gt;The directional derivative can also be generalized to functions of three variables. To determine a direction in three dimensions, a vector with three components is needed. This vector is a unit vector, and the components of the unit vector are called\u00a0<span id=\"82440dbc-9afa-4f68-ab57-5fb973b6da83_term193\" class=\"no-emphasis\" data-type=\"term\"><em data-effect=\"italics\">directional cosines<\/em><\/span>. Given a three-dimensional unit vector [latex]\\bf{u}[\/latex] in standard form (i.e., the initial point is at the origin), this vector forms three different angles with the positive [latex]x-,y-[\/latex] and [latex]z-[\/latex]axes. Let\u2019s call these angles [latex]\\alpha,\\beta[\/latex] and [latex]\\gamma[\/latex]. Then the directional cosines are given by [latex]\\cos\\alpha,\\cos\\beta[\/latex] and [latex]\\cos\\gamma[\/latex]. These are the components of the unit vector [latex]\\bf{u}[\/latex]; since [latex]\\bf{u}[\/latex] is a unit vector, it is true that [latex]\\cos^2\\alpha+\\cos^2\\beta+\\cos^2\\gamma=1[\/latex].<\/p>\n<div class=\"textbox shaded\">\n<h3 style=\"text-align: center;\">Definition<\/h3>\n<hr \/>\n<p>Suppose\u00a0[latex]w=f(x,y,z)[\/latex] is a function of three variables with a domain of\u00a0[latex]D[\/latex], Let\u00a0[latex](x_0,y_0,z_0)\\in{D}[\/latex] and let\u00a0[latex]{\\bf{u}}=cos\\alpha{\\bf{i}}+\\cos\\beta{\\bf{j}}+\\cos\\gamma{\\bf{k}}[\/latex] be a unit vector. Then, the directional derivative of\u00a0[latex]f[\/latex] in the direction of [latex]u[\/latex] is given by<\/p>\n<p style=\"text-align: center;\">[latex]D_{\\bf{u}}f(x_0,y_0,z_0)=\\displaystyle{\\lim_{t\\to0}}\\frac{f(x_0+t\\cos\\alpha,y_0+t\\cos\\beta,z_0+t\\cos\\gamma)-f(x_0,y_0,z_0)}t,[\/latex]<\/p>\n<p>providing the limit exists.<\/p>\n<\/div>\n<p>We can calculate the directional derivative of a function of three variables by using the gradient, leading to a formula that is analogous to\u00a0the dot product definition of the Directional Derivative of a Function of Two Variables.<\/p>\n<div class=\"textbox shaded\">\n<h3 style=\"text-align: center;\">Theorem: Directional derivative of a function of three variables<\/h3>\n<hr \/>\n<p>Let\u00a0[latex]f(x,y,z)[\/latex] be a differentiable function of three variables and let\u00a0[latex]{\\bf{u}}=\\cos\\alpha{\\bf{i}}+\\cos\\beta{\\bf{j}}+\\cos\\gamma{\\bf{k}}[\/latex] be a unit vector. Then, the directional derivative of\u00a0[latex]f[\/latex] in the direction of\u00a0[latex]{\\bf{u}}[\/latex] is given by<\/p>\n<p style=\"text-align: left;\">[latex]\\hspace{6cm}\\begin{align}<\/p>\n<p>  D_{\\bf{u}}f(x,y,z)&=\\nabla{f}(x,y,z)\\cdot{\\bf{u}} \\\\    &=f_x(x,y,z)\\cos\\alpha+f_y(x,y,z)\\cos\\beta+f_z(x,y,z)\\cos\\gamma.    \\end{align}[\/latex]<\/p>\n<\/div>\n<p>The three angles [latex]\\alpha,\\beta[\/latex], and [latex]\\gamma[\/latex] determine the unit vector [latex]\\bf{u}[\/latex]. In practice, we can use an arbitrary (nonunit) vector, then divide by its magnitude to obtain a unit vector in the desired direction.<\/p>\n<div class=\"textbox exercises\">\n<h3>Example: finding a directional derivative in three dimensions<\/h3>\n<p>Calculate\u00a0[latex]D_{\\bf{u}}f(1,-2,3)[\/latex] in the direction of\u00a0[latex]v=-{\\bf{i}}+2{\\bf{j}}+2{\\bf{k}}[\/latex] for the function<\/p>\n<p style=\"text-align: center;\">[latex]f(x,y,z)=5x^2-2xy+y^2-4yz+z^2+3xz[\/latex].<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q960004812\">Show Solution<\/span><\/p>\n<div id=\"q960004812\" class=\"hidden-answer\" style=\"display: none\">\n<p>First, we find the magnitude of [latex]{\\bf{v}}[\/latex]:<\/p>\n<p style=\"text-align: center;\">[latex]\\|{\\bf{v}}\\|=\\sqrt{(-1)^2+(2)^2+(2)^2}=3[\/latex]<\/p>\n<p>Therefore\u00a0[latex]\\frac{{\\bf{v}}}{\\|{\\bf{v}}\\|}=\\frac{-{\\bf{i}}+2{\\bf{j}}+2{\\bf{k}}}3=-\\frac13{\\bf{i}}+\\frac23{\\bf{j}}+\\frac23{\\bf{k}}[\/latex] is a unit vector in the direction of\u00a0[latex]{\\bf{v}}[\/latex], so\u00a0[latex]\\cos\\alpha=-\\frac13[\/latex],\u00a0[latex]\\cos\\beta=\\frac23[\/latex], and\u00a0[latex]\\cos\\gamma=\\frac23[\/latex]. Next, we calculate the partial derivatives of\u00a0[latex]f[\/latex]:<\/p>\n<p>[latex]\\hspace{7cm}\\begin{align}    f_x(x,y,z)&=10x-2y+3z \\\\    f_y(x,y,z)&=-2x+2y-4z \\\\    f_z(x,y,z)&=-4y+2z+3x,    \\end{align}[\/latex]<\/p>\n<p>Then substitute them into the\u00a0Directional Derivative of a Function of Three Variables:<\/p>\n<p>[latex]\\hspace{5cm}\\begin{align}    D_{\\bf{u}}f(x,y,z)&=10x-2y+3z \\\\    f_y(x,y,z)&=f_x(x,y,z)\\cos\\alpha+f_y(x,y,z)\\cos\\beta+f_z(x,y,z)\\cos\\gamma \\\\    &=(10x-2y+3z)(-\\frac13)+(-2x+2y-4z)(\\frac23)+(-4y+2z+3x)(\\frac23) \\\\    &=-\\frac{10x}3+\\frac{2y}3-\\frac{3z}3-\\frac{4x}3+\\frac{4y}3-\\frac{8z}3-\\frac{8y}3+\\frac{4z}3+\\frac{6x}3 \\\\    &=-\\frac{8x}3-\\frac{2y}3-\\frac{7z}3    \\end{align}[\/latex]<\/p>\n<p>Last, to find\u00a0[latex]D_{\\bf{u}}f(1,-2,3)[\/latex], we substitute\u00a0[latex]x=1[\/latex],\u00a0[latex]y=-2[\/latex], and\u00a0[latex]z=3[\/latex]:<\/p>\n<p>[latex]\\hspace{5cm}\\begin{align}    D_{\\bf{u}}f(1,-2,3)&=-\\frac{8(1)}3-\\frac{2(-2)}3-\\frac{7(3)}3 \\\\    &=-\\frac83+\\frac43-\\frac{21}3 \\\\    &=-\\frac{25}3.    \\end{align}[\/latex]<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"textbox key-takeaways\">\n<h3>Try it<\/h3>\n<p>Calculate\u00a0[latex]D_{\\bf{u}}f(x,y,z)[\/latex] and\u00a0[latex]D_{\\bf{u}}f(0,-2,5)[\/latex] in the direction of\u00a0[latex]{\\bf{v}}=-3{\\bf{i}}+12{\\bf{j}}-4{\\bf{k}}[\/latex] for the function\u00a0[latex]f(x,y,z)=3x^2+xy-2y^2+4yz-z^2+2xz[\/latex].<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q370457713\">Show Solution<\/span><\/p>\n<div id=\"q370457713\" class=\"hidden-answer\" style=\"display: none\">\n<p style=\"text-align: left;\">[latex]\\hspace{5cm}\\begin{align}<\/p>\n<p>  D_{\\bf{u}}f(x,y,z)&=-\\frac{3}{13}(6x+y+2z)-\\frac{12}{13}(x-4y+4z)-\\frac{4}{13}(2x+4y-2z) \\\\    D_{\\bf{u}}f(0,-2,5)&=\\frac{384}{13}    \\end{align}[\/latex]<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p>Watch the following video to see the worked solution to the above Try It<\/p>\n<div style=\"text-align: center;\"><iframe loading=\"lazy\" src=\"\/\/plugin.3playmedia.com\/show?mf=8186166&amp;p3sdk_version=1.10.1&amp;p=20361&amp;pt=375&amp;video_id=h64xLVnvPRw&amp;video_target=tpm-plugin-o4yqlso5-h64xLVnvPRw\" width=\"800px\" height=\"450px\" frameborder=\"0\" marginwidth=\"0px\" marginheight=\"0px\"><\/iframe><\/div>\n<div style=\"text-align: center;\">You can view the <a href=\"https:\/\/course-building.s3.us-west-2.amazonaws.com\/Calculus+3\/Calc+3+transcripts\/CP4.33_transcript.html\">transcript for \u201cCP 4.33\u201d here (opens in new window).<\/a><\/div>\n<p>&nbsp;<\/p>\n\n\t\t\t <section class=\"citations-section\" role=\"contentinfo\">\n\t\t\t <h3>Candela Citations<\/h3>\n\t\t\t\t\t <div>\n\t\t\t\t\t\t <div id=\"citation-list-871\">\n\t\t\t\t\t\t\t <div class=\"licensing\"><div class=\"license-attribution-dropdown-subheading\">CC licensed content, Original<\/div><ul class=\"citation-list\"><li>CP 4.32. <strong>Authored by<\/strong>: Ryan Melton. <strong>License<\/strong>: <em><a target=\"_blank\" rel=\"license\" href=\"https:\/\/creativecommons.org\/licenses\/by\/4.0\/\">CC BY: Attribution<\/a><\/em><\/li><li>CP 4.33. <strong>Authored by<\/strong>: Ryan Melton. <strong>License<\/strong>: <em><a target=\"_blank\" rel=\"license\" href=\"https:\/\/creativecommons.org\/licenses\/by\/4.0\/\">CC BY: Attribution<\/a><\/em><\/li><\/ul><div class=\"license-attribution-dropdown-subheading\">CC licensed content, Shared previously<\/div><ul class=\"citation-list\"><li>Calculus Volume 3. <strong>Authored by<\/strong>: Gilbert Strang, Edwin (Jed) Herman. <strong>Provided by<\/strong>: OpenStax. <strong>Located at<\/strong>: <a target=\"_blank\" href=\"https:\/\/openstax.org\/books\/calculus-volume-3\/pages\/1-introduction\">https:\/\/openstax.org\/books\/calculus-volume-3\/pages\/1-introduction<\/a>. <strong>License<\/strong>: <em><a target=\"_blank\" rel=\"license\" href=\"https:\/\/creativecommons.org\/licenses\/by-nc-sa\/4.0\/\">CC BY-NC-SA: Attribution-NonCommercial-ShareAlike<\/a><\/em>. <strong>License Terms<\/strong>: Access for free at https:\/\/openstax.org\/books\/calculus-volume-3\/pages\/1-introduction<\/li><\/ul><\/div>\n\t\t\t\t\t\t <\/div>\n\t\t\t\t\t <\/div>\n\t\t\t <\/section>","protected":false},"author":349141,"menu_order":27,"template":"","meta":{"_candela_citation":"[{\"type\":\"cc\",\"description\":\"Calculus Volume 3\",\"author\":\"Gilbert Strang, Edwin (Jed) Herman\",\"organization\":\"OpenStax\",\"url\":\"https:\/\/openstax.org\/books\/calculus-volume-3\/pages\/1-introduction\",\"project\":\"\",\"license\":\"cc-by-nc-sa\",\"license_terms\":\"Access for free at https:\/\/openstax.org\/books\/calculus-volume-3\/pages\/1-introduction\"},{\"type\":\"original\",\"description\":\"CP 4.32\",\"author\":\"Ryan Melton\",\"organization\":\"\",\"url\":\"\",\"project\":\"\",\"license\":\"cc-by\",\"license_terms\":\"\"},{\"type\":\"original\",\"description\":\"CP 4.33\",\"author\":\"Ryan Melton\",\"organization\":\"\",\"url\":\"\",\"project\":\"\",\"license\":\"cc-by\",\"license_terms\":\"\"}]","CANDELA_OUTCOMES_GUID":"","pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"class_list":["post-871","chapter","type-chapter","status-publish","hentry"],"part":22,"_links":{"self":[{"href":"https:\/\/courses.lumenlearning.com\/calculus3\/wp-json\/pressbooks\/v2\/chapters\/871","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/courses.lumenlearning.com\/calculus3\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/courses.lumenlearning.com\/calculus3\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/courses.lumenlearning.com\/calculus3\/wp-json\/wp\/v2\/users\/349141"}],"version-history":[{"count":140,"href":"https:\/\/courses.lumenlearning.com\/calculus3\/wp-json\/pressbooks\/v2\/chapters\/871\/revisions"}],"predecessor-version":[{"id":5917,"href":"https:\/\/courses.lumenlearning.com\/calculus3\/wp-json\/pressbooks\/v2\/chapters\/871\/revisions\/5917"}],"part":[{"href":"https:\/\/courses.lumenlearning.com\/calculus3\/wp-json\/pressbooks\/v2\/parts\/22"}],"metadata":[{"href":"https:\/\/courses.lumenlearning.com\/calculus3\/wp-json\/pressbooks\/v2\/chapters\/871\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/courses.lumenlearning.com\/calculus3\/wp-json\/wp\/v2\/media?parent=871"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/courses.lumenlearning.com\/calculus3\/wp-json\/pressbooks\/v2\/chapter-type?post=871"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/courses.lumenlearning.com\/calculus3\/wp-json\/wp\/v2\/contributor?post=871"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/courses.lumenlearning.com\/calculus3\/wp-json\/wp\/v2\/license?post=871"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}