{"id":631,"date":"2025-10-09T15:26:39","date_gmt":"2025-10-09T15:26:39","guid":{"rendered":"https:\/\/content.one.lumenlearning.com\/calculus3\/?post_type=chapter&#038;p=631"},"modified":"2025-10-29T14:33:53","modified_gmt":"2025-10-29T14:33:53","slug":"directional-derivatives-fresh-take","status":"publish","type":"chapter","link":"https:\/\/content.one.lumenlearning.com\/calculus3\/chapter\/directional-derivatives-fresh-take\/","title":{"raw":"Directional Derivatives and the Gradient: Fresh Take","rendered":"Directional Derivatives and the Gradient: Fresh Take"},"content":{"raw":"<section class=\"textbox learningGoals\" aria-label=\"Learning Goals\">\r\n<ul>\r\n \t<li>Calculate directional derivatives in two dimensions<\/li>\r\n \t<li>Find and interpret the gradient vector<\/li>\r\n \t<li>Use the gradient to find the tangent to a level curve of a given function<\/li>\r\n \t<li>Calculate directional derivatives in three dimensions<\/li>\r\n<\/ul>\r\n<\/section>\r\n<h2>Directional Derivatives<\/h2>\r\n<div class=\"textbox shaded\">\r\n\r\n<strong>The Main Idea\u00a0<\/strong>\r\n<p class=\"whitespace-normal break-words\">Partial derivatives tell you the slope of a surface in directions parallel to the coordinate axes. But what if you want to know how steeply the surface is climbing or descending in some other direction\u2014say, northeast or at a 37\u00b0 angle? That's what directional derivatives measure.<\/p>\r\n<p class=\"whitespace-normal break-words\">A directional derivative [latex]D_{\\bf{u}}f(a,b)[\/latex] gives the instantaneous rate of change of [latex]f[\/latex] at point [latex](a,b)[\/latex] in the direction of a unit vector [latex]\\bf{u}[\/latex]. It's the slope of the tangent line to the surface in that specific direction.<\/p>\r\n<p class=\"whitespace-normal break-words\"><strong>The Practical Formula<\/strong><\/p>\r\n<p class=\"whitespace-normal break-words\">For a direction given by angle [latex]\\theta[\/latex] (measured counterclockwise from the positive [latex]x[\/latex]-axis), the directional derivative is:<\/p>\r\n<p class=\"whitespace-normal break-words\" style=\"text-align: center;\">[latex]D_{\\bf{u}}f(x,y) = f_x(x,y)\\cos\\theta + f_y(x,y)\\sin\\theta[\/latex]<\/p>\r\n<p class=\"whitespace-normal break-words\">where [latex]{\\bf{u}} = \\cos\\theta{\\bf{i}} + \\sin\\theta{\\bf{j}}[\/latex] is your unit direction vector.<\/p>\r\n<p class=\"whitespace-normal break-words\"><strong>Problem-Solving Strategy<\/strong><\/p>\r\n\r\n<ol class=\"[&amp;:not(:last-child)_ul]:pb-1 [&amp;:not(:last-child)_ol]:pb-1 list-decimal space-y-2.5 pl-7\">\r\n \t<li class=\"whitespace-normal break-words\"><strong>Find the partial derivatives<\/strong> [latex]f_x[\/latex] and [latex]f_y[\/latex]<\/li>\r\n \t<li class=\"whitespace-normal break-words\"><strong>Evaluate them<\/strong> at your point of interest<\/li>\r\n \t<li class=\"whitespace-normal break-words\"><strong>Identify your direction<\/strong>: If given an angle [latex]\\theta[\/latex], use [latex]\\cos\\theta[\/latex] and [latex]\\sin\\theta[\/latex] directly<\/li>\r\n \t<li class=\"whitespace-normal break-words\"><strong>Calculate<\/strong> [latex]D_{\\bf{u}}f = f_x\\cos\\theta + f_y\\sin\\theta[\/latex]<\/li>\r\n<\/ol>\r\n<p class=\"whitespace-normal break-words\"><strong>Critical Tip: Non-Unit Vectors<\/strong><\/p>\r\n<p class=\"whitespace-normal break-words\">The direction vector <strong>must<\/strong> be a unit vector (magnitude 1). If you're given a direction like [latex]\\langle 3, 4 \\rangle[\/latex], first find its magnitude: [latex]\\sqrt{3^2 + 4^2} = 5[\/latex]. Then normalize it: [latex]{\\bf{u}} = \\langle 3\/5, 4\/5 \\rangle[\/latex]. Now you can use this unit vector in your directional derivative formula.<\/p>\r\n<p class=\"whitespace-normal break-words\"><strong>Key Insight<\/strong><\/p>\r\n<p class=\"whitespace-normal break-words\">Notice that [latex]f_x[\/latex] and [latex]f_y[\/latex] are actually special cases of directional derivatives\u2014they're the rates of change in the [latex]x[\/latex]-direction ([latex]\\theta = 0[\/latex]) and [latex]y[\/latex]-direction ([latex]\\theta = 90\u00b0[\/latex]).<\/p>\r\n\r\n<\/div>\r\n<section class=\"textbox example\" aria-label=\"Example\">Find the directional derivative\u00a0[latex]D_{\\bf{u}}f(x,y)[\/latex] of\u00a0[latex]f(x,y)=3x^2y-4xy^3+3y^2-4x[\/latex] in the direction of\u00a0[latex]{\\bf{u}}=(\\cos\\frac{\\pi}3){\\bf{i}}+(\\sin\\frac{\\pi}3)\\bf{j}[\/latex] using\u00a0the Directional Derivative of a Function of Two Variables. What is\u00a0[latex]D_{\\bf{u}}f(3,4)[\/latex]?[reveal-answer q=\"541286411\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"541286411\"]\r\n\r\n[latex]\\hspace{5cm}\\begin{align}\r\n\r\nD_{\\bf{u}}f(x,y)&amp;=\\frac{(6xy-4y^3-4)(1)}2+\\frac{(3x^2-12xy^2+6y)\\sqrt3}2 \\\\\r\n\r\nD_{\\bf{u}}f(3,4)&amp;=\\frac{72-256-4}2+\\frac{(27-576+24)\\sqrt3}2=-94-\\frac{525\\sqrt3}2.\r\n\r\n\\end{align}[\/latex]\r\n\r\n[\/hidden-answer]\r\n\r\n<\/section><section class=\"textbox watchIt\" aria-label=\"Watch It\">Watch the following video to see the worked solution to the above example.<center><iframe src=\"\/\/plugin.3playmedia.com\/show?mf=8186163&amp;p3sdk_version=1.10.1&amp;p=20361&amp;pt=375&amp;video_id=wPZAE8M5F6k&amp;video_target=tpm-plugin-kevk5ynk-wPZAE8M5F6k\" width=\"800px\" height=\"450px\" frameborder=\"0\" marginwidth=\"0px\" marginheight=\"0px\" data-mce-fragment=\"1\"><\/iframe><\/center><center>You can view the <a href=\"https:\/\/course-building.s3.us-west-2.amazonaws.com\/Calculus+3\/Calc+3+transcripts\/CP4.28_transcript.html\">transcript for \u201cCP 4.28\u201d here (opens in new window).<\/a><\/center><\/section>\r\n<h2>Gradient<\/h2>\r\n<div class=\"textbox shaded\">\r\n\r\n<strong>The Main Idea\u00a0<\/strong>\r\n<p class=\"whitespace-normal break-words\">The gradient packages both partial derivatives into a single vector that tells you everything about how a function is changing at a point. It's one of the most powerful tools in multivariable calculus.<\/p>\r\n<p class=\"whitespace-normal break-words\">For [latex]z = f(x, y)[\/latex], the gradient at any point is:<\/p>\r\n<p class=\"whitespace-normal break-words\" style=\"text-align: center;\">[latex]\\nabla f(x, y) = f_x(x, y){\\bf{i}} + f_y(x, y){\\bf{j}}[\/latex]<\/p>\r\n<p class=\"whitespace-normal break-words\">The symbol [latex]\\nabla[\/latex] is called \"nabla\" or \"del,\" and you read this as \"gradient of [latex]f[\/latex]\" or \"del [latex]f[\/latex].\"<\/p>\r\n<p class=\"whitespace-normal break-words\">The gradient vector points in the direction of steepest ascent on the surface. Its magnitude [latex]|\\nabla f|[\/latex] tells you how steep that climb is. If you're on a hillside, the gradient points straight uphill, and its length measures the steepness.<\/p>\r\n<p class=\"whitespace-normal break-words\"><strong>Key Properties<\/strong><\/p>\r\n\r\n<ul class=\"[&amp;:not(:last-child)_ul]:pb-1 [&amp;:not(:last-child)_ol]:pb-1 list-disc space-y-2.5 pl-7\">\r\n \t<li class=\"whitespace-normal break-words\"><strong>Maximum increase<\/strong>: The directional derivative is largest when you move in the direction of [latex]\\nabla f[\/latex], and that maximum value is [latex]|\\nabla f|[\/latex]<\/li>\r\n \t<li class=\"whitespace-normal break-words\"><strong>Maximum decrease<\/strong>: The directional derivative is most negative when you move opposite to [latex]\\nabla f[\/latex], with minimum value [latex]-|\\nabla f|[\/latex]<\/li>\r\n \t<li class=\"whitespace-normal break-words\"><strong>No change<\/strong>: If [latex]\\nabla f = {\\bf{0}}[\/latex] at a point, the function isn't changing in any direction there<\/li>\r\n<\/ul>\r\n<p class=\"whitespace-normal break-words\"><strong>Connection to Directional Derivatives<\/strong><\/p>\r\n<p class=\"whitespace-normal break-words\">The directional derivative in direction [latex]\\bf{u}[\/latex] is simply: [latex]D_{\\bf{u}}f = \\nabla f \\cdot {\\bf{u}}[\/latex]<\/p>\r\n<p class=\"whitespace-normal break-words\">This dot product formula makes calculations much easier than using the limit definition.<\/p>\r\n<p class=\"whitespace-normal break-words\"><strong>Problem-Solving Strategy<\/strong><\/p>\r\n\r\n<ol class=\"[&amp;:not(:last-child)_ul]:pb-1 [&amp;:not(:last-child)_ol]:pb-1 list-decimal space-y-2.5 pl-7\">\r\n \t<li class=\"whitespace-normal break-words\"><strong>Calculate<\/strong> both partial derivatives [latex]f_x[\/latex] and [latex]f_y[\/latex]<\/li>\r\n \t<li class=\"whitespace-normal break-words\"><strong>Form the gradient vector<\/strong> [latex]\\nabla f = f_x{\\bf{i}} + f_y{\\bf{j}}[\/latex]<\/li>\r\n \t<li class=\"whitespace-normal break-words\"><strong>Evaluate<\/strong> at your point of interest<\/li>\r\n \t<li class=\"whitespace-normal break-words\"><strong>Interpret<\/strong>: The direction of this vector is steepest ascent; its magnitude is the rate of climb<\/li>\r\n<\/ol>\r\n<\/div>\r\n<section class=\"textbox example\" aria-label=\"Example\">Find the gradient\u00a0[latex]\\nabla{f}(x,y)[\/latex] of\u00a0[latex]f(x,y)=(x^2-3y^2)\/(2x+y)[\/latex].[reveal-answer q=\"985372461\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"985372461\"]\r\n<p style=\"text-align: center;\">[latex]\\large{\\nabla{f}(x,y)=\\frac{2x^2+2xy+6y^2}{(2x+y)^2}{\\bf{i}}-\\frac{x^2+12xy+3y^2}{(2x+y)^2}{\\bf{j}}}[\/latex]<\/p>\r\n[\/hidden-answer]\r\n\r\n<\/section><section class=\"textbox example\" aria-label=\"Example\">Find the direction for which the directional derivative of\u00a0[latex]g(x, y)=4x-xy+2y^{2}[\/latex] at [latex](-2, 3)[\/latex] is a maximum. What is the maximum value?[reveal-answer q=\"161657349\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"161657349\"]\r\n\r\nThe gradient of [latex]g[\/latex] at\u00a0[latex](-2,3)[\/latex] is\u00a0[latex]\\nabla{g}(-2,3)={\\bf{i}}+14{\\bf{j}}[\/latex]. The unit vector that points in the same direction as\u00a0[latex]\\nabla{g}(-2,3)[\/latex] is\u00a0[latex]\\frac{\\nabla{g}(-2,3)}{\\|\\nabla{g}(-2,3)\\|}=\\frac{1}{\\sqrt{197}}{\\bf{i}}+\\frac{14}{\\sqrt{197}}{\\bf{j}}=\\frac{\\sqrt{197}}{197}{\\bf{i}}+\\frac{14\\sqrt{197}}{197}{\\bf{j}}[\/latex], which gives an angle of\u00a0[latex]\\theta=\\arcsin((14\\sqrt{197})\/197\\approx1.499\\text{ rad}[\/latex]. The maximum value of the directional derivative is\u00a0[latex]\\nabla{g}(-2,3)\\approx\\sqrt{197}[\/latex].\r\n\r\n[\/hidden-answer]\r\n\r\n<\/section><section class=\"textbox watchIt\" aria-label=\"Watch It\">Watch the following video to see the worked solution to the above example.<center><iframe src=\"\/\/plugin.3playmedia.com\/show?mf=8186164&amp;p3sdk_version=1.10.1&amp;p=20361&amp;pt=375&amp;video_id=n8TmTVwACTM&amp;video_target=tpm-plugin-rpwvmbgw-n8TmTVwACTM\" width=\"800px\" height=\"450px\" frameborder=\"0\" marginwidth=\"0px\" marginheight=\"0px\" data-mce-fragment=\"1\"><\/iframe><\/center><center>You can view the <a href=\"https:\/\/course-building.s3.us-west-2.amazonaws.com\/Calculus+3\/Calc+3+transcripts\/CP4.30_transcript.html\">transcript for \u201cCP 4.30\u201d here (opens in new window).<\/a><\/center><\/section>\r\n<h2 data-type=\"title\">Gradients and Level Curves<\/h2>\r\n<div class=\"textbox shaded\">\r\n\r\n<strong>The Main Idea\u00a0<\/strong>\r\n<p class=\"whitespace-normal break-words\">The gradient has a remarkable geometric property: at any point on a level curve, the gradient vector points perpendicular to that curve. This connection gives you a powerful way to understand both the gradient and level curves simultaneously.<\/p>\r\n<p class=\"whitespace-normal break-words\">For a function [latex]f(x, y)[\/latex], level curves are defined by [latex]f(x, y) = k[\/latex] for various constants [latex]k[\/latex]. At any point [latex](x_0, y_0)[\/latex] on a level curve, the gradient [latex]\\nabla f(x_0, y_0)[\/latex] is perpendicular (normal) to the level curve at that point.<\/p>\r\n<p class=\"whitespace-normal break-words\"><strong>Why This Matters<\/strong><\/p>\r\n<p class=\"whitespace-normal break-words\">Since the gradient points in the direction of steepest ascent, and it's perpendicular to level curves, this tells you that level curves represent paths of no change\u2014moving along a level curve doesn't change the function value. The steepest climb is always perpendicular to these \"flat\" paths.<\/p>\r\n<p class=\"whitespace-normal break-words\"><strong>Practical Uses<\/strong><\/p>\r\n<p class=\"whitespace-normal break-words\">This perpendicularity makes finding tangent and normal vectors to level curves straightforward:<\/p>\r\n\r\n<ul class=\"[&amp;:not(:last-child)_ul]:pb-1 [&amp;:not(:last-child)_ol]:pb-1 list-disc space-y-2.5 pl-7\">\r\n \t<li class=\"whitespace-normal break-words\"><strong>Normal vector to the curve<\/strong>: Just compute [latex]\\nabla f[\/latex] at your point<\/li>\r\n \t<li class=\"whitespace-normal break-words\"><strong>Tangent vector to the curve<\/strong>: Swap the components of [latex]\\nabla f[\/latex] and negate one of them<\/li>\r\n<\/ul>\r\n<p class=\"whitespace-normal break-words\"><strong>Problem-Solving Strategy<\/strong><\/p>\r\n\r\n<ol class=\"[&amp;:not(:last-child)_ul]:pb-1 [&amp;:not(:last-child)_ol]:pb-1 list-decimal space-y-2.5 pl-7\">\r\n \t<li class=\"whitespace-normal break-words\"><strong>Calculate the gradient<\/strong> [latex]\\nabla f = f_x{\\bf{i}} + f_y{\\bf{j}}[\/latex]<\/li>\r\n \t<li class=\"whitespace-normal break-words\"><strong>Evaluate at your point<\/strong> to get the normal vector to the level curve<\/li>\r\n \t<li class=\"whitespace-normal break-words\"><strong>For a tangent vector<\/strong>: swap components and negate one (e.g., if gradient is [latex]\\langle a, b \\rangle[\/latex], use [latex]\\langle -b, a \\rangle[\/latex] or [latex]\\langle b, -a \\rangle[\/latex])<\/li>\r\n<\/ol>\r\n<p class=\"whitespace-normal break-words\"><strong>Visual Insight<\/strong><\/p>\r\n<p class=\"whitespace-normal break-words\">On a contour map, the gradient arrows always point perpendicular to the contour lines, toward higher values. Where contour lines bunch together, gradients are longer, indicating steeper terrain.<\/p>\r\n\r\n<\/div>\r\n<section class=\"textbox example\" aria-label=\"Example\">For the function\u00a0[latex]f(x,y)=x^2-2xy+5y^2+3x-2y+4[\/latex],\u00a0<span style=\"white-space: nowrap;\">f<\/span><span style=\"font-size: 1rem; text-align: initial;\">ind the tangent to the level curve at point [latex](1, 1)[\/latex]. Draw the graph of the level curve corresponding to [latex]f(x, y)=8[\/latex] and draw [latex]\\nabla{f}(1,1)[\/latex] and a tangent vector.<\/span>[reveal-answer q=\"833476002\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"833476002\"]\r\n\r\n[latex]\\nabla{f}(x,y)=(2x-2y+3){\\bf{i}}+(-2x+10y-2){\\bf{j}}[\/latex]\r\n\r\n[latex]\\nabla{f}(1,1)=3{\\bf{i}}+6{\\bf{j}}[\/latex]\r\n\r\nTangent vector:\u00a0[latex]6{\\bf{i}}-6{\\bf{j}}[\/latex] or [latex]-6{\\bf{i}}+3{\\bf{j}}[\/latex]\r\n\r\n[caption id=\"attachment_1274\" align=\"aligncenter\" width=\"342\"]<img class=\"size-full wp-image-1274\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/5667\/2021\/09\/23133904\/4-6-tryitans1.jpeg\" alt=\"A rotated ellipse with equation f(x, y) = 8. At the point (1, 1) on the ellipse, there are drawn two arrows, one tangent vector and one normal vector. The normal vector is marked \u2207f(1, 1) and is perpendicular to the tangent vector.\" width=\"342\" height=\"347\" \/> Figure 6.[\/caption]\r\n\r\n[\/hidden-answer]\r\n\r\n<\/section>\r\n<h2>Three-Dimensional Gradients and Directional Derivatives<\/h2>\r\n<div class=\"textbox shaded\">\r\n\r\n<strong>The Main Idea\u00a0<\/strong>\r\n<p class=\"whitespace-normal break-words\">Everything you learned about gradients and directional derivatives in two dimensions extends naturally to three dimensions. The main difference is that you're now working with three partial derivatives instead of two, and direction vectors have three components instead of two.<\/p>\r\n<p class=\"whitespace-normal break-words\"><strong>The Three-Dimensional Gradient<\/strong><\/p>\r\n<p class=\"whitespace-normal break-words\">For a function [latex]w = f(x, y, z)[\/latex], the gradient is:<\/p>\r\n<p class=\"whitespace-normal break-words\" 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<p class=\"whitespace-normal break-words\">Just calculate all three partial derivatives and assemble them into a vector.<\/p>\r\n<p class=\"whitespace-normal break-words\"><strong>Directional Derivatives in 3D<\/strong><\/p>\r\n<p class=\"whitespace-normal break-words\">The directional derivative formula works the same way as in two dimensions:<\/p>\r\n<p class=\"whitespace-normal break-words\" style=\"text-align: center;\">[latex]D_{\\bf{u}}f(x, y, z) = \\nabla f(x, y, z) \\cdot {\\bf{u}}[\/latex]<\/p>\r\n<p class=\"whitespace-normal break-words\">where [latex]{\\bf{u}}[\/latex] must be a unit vector.<\/p>\r\n<p class=\"whitespace-normal break-words\"><strong>Problem-Solving Strategy<\/strong><\/p>\r\n\r\n<ol class=\"[&amp;:not(:last-child)_ul]:pb-1 [&amp;:not(:last-child)_ol]:pb-1 list-decimal space-y-2.5 pl-7\">\r\n \t<li class=\"whitespace-normal break-words\"><strong>Find all three partial derivatives<\/strong> [latex]f_x[\/latex], [latex]f_y[\/latex], and [latex]f_z[\/latex]<\/li>\r\n \t<li class=\"whitespace-normal break-words\"><strong>Form the gradient<\/strong> [latex]\\nabla f = f_x{\\bf{i}} + f_y{\\bf{j}} + f_z{\\bf{k}}[\/latex]<\/li>\r\n \t<li class=\"whitespace-normal break-words\"><strong>Normalize your direction vector<\/strong>: If given [latex]{\\bf{v}}[\/latex], compute [latex]{\\bf{u}} = \\frac{{\\bf{v}}}{|{\\bf{v}}|}[\/latex]<\/li>\r\n \t<li class=\"whitespace-normal break-words\"><strong>Calculate the dot product<\/strong> [latex]\\nabla f \\cdot {\\bf{u}}[\/latex]<\/li>\r\n \t<li class=\"whitespace-normal break-words\"><strong>Evaluate at your point<\/strong> by substituting coordinates<\/li>\r\n<\/ol>\r\n<p class=\"whitespace-normal break-words\"><strong>Critical Reminder<\/strong><\/p>\r\n<p class=\"whitespace-normal break-words\">Always normalize your direction vector first. A common mistake is forgetting to divide by the magnitude. For example, if [latex]{\\bf{v}} = -{\\bf{i}} + 2{\\bf{j}} + 2{\\bf{k}}[\/latex], its magnitude is [latex]\\sqrt{1 + 4 + 4} = 3[\/latex], so [latex]{\\bf{u}} = -\\frac{1}{3}{\\bf{i}} + \\frac{2}{3}{\\bf{j}} + \\frac{2}{3}{\\bf{k}}[\/latex].<\/p>\r\n<p class=\"whitespace-normal break-words\"><strong>Key Properties<\/strong><\/p>\r\n<p class=\"whitespace-normal break-words\">The same properties from two dimensions still hold: the gradient points toward the steepest increase, its magnitude gives the maximum rate of change, and moving perpendicular to the gradient means no change in function value.<\/p>\r\n\r\n<\/div>\r\n<section class=\"textbox example\" aria-label=\"Example\">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].[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<\/section><section class=\"textbox watchIt\" aria-label=\"Watch It\">Watch the following video to see the worked solution to the above example.<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\" data-mce-fragment=\"1\"><\/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><\/section><section class=\"textbox example\" aria-label=\"Example\">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].[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<\/section><section class=\"textbox watchIt\" aria-label=\"Watch It\">Watch the following video to see the worked solution to the above example.<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\" data-mce-fragment=\"1\"><\/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><\/section>","rendered":"<section class=\"textbox learningGoals\" aria-label=\"Learning Goals\">\n<ul>\n<li>Calculate directional derivatives in two dimensions<\/li>\n<li>Find and interpret the gradient vector<\/li>\n<li>Use the gradient to find the tangent to a level curve of a given function<\/li>\n<li>Calculate directional derivatives in three dimensions<\/li>\n<\/ul>\n<\/section>\n<h2>Directional Derivatives<\/h2>\n<div class=\"textbox shaded\">\n<p><strong>The Main Idea\u00a0<\/strong><\/p>\n<p class=\"whitespace-normal break-words\">Partial derivatives tell you the slope of a surface in directions parallel to the coordinate axes. But what if you want to know how steeply the surface is climbing or descending in some other direction\u2014say, northeast or at a 37\u00b0 angle? That&#8217;s what directional derivatives measure.<\/p>\n<p class=\"whitespace-normal break-words\">A directional derivative [latex]D_{\\bf{u}}f(a,b)[\/latex] gives the instantaneous rate of change of [latex]f[\/latex] at point [latex](a,b)[\/latex] in the direction of a unit vector [latex]\\bf{u}[\/latex]. It&#8217;s the slope of the tangent line to the surface in that specific direction.<\/p>\n<p class=\"whitespace-normal break-words\"><strong>The Practical Formula<\/strong><\/p>\n<p class=\"whitespace-normal break-words\">For a direction given by angle [latex]\\theta[\/latex] (measured counterclockwise from the positive [latex]x[\/latex]-axis), the directional derivative is:<\/p>\n<p class=\"whitespace-normal break-words\" style=\"text-align: center;\">[latex]D_{\\bf{u}}f(x,y) = f_x(x,y)\\cos\\theta + f_y(x,y)\\sin\\theta[\/latex]<\/p>\n<p class=\"whitespace-normal break-words\">where [latex]{\\bf{u}} = \\cos\\theta{\\bf{i}} + \\sin\\theta{\\bf{j}}[\/latex] is your unit direction vector.<\/p>\n<p class=\"whitespace-normal break-words\"><strong>Problem-Solving Strategy<\/strong><\/p>\n<ol class=\"[&amp;:not(:last-child)_ul]:pb-1 [&amp;:not(:last-child)_ol]:pb-1 list-decimal space-y-2.5 pl-7\">\n<li class=\"whitespace-normal break-words\"><strong>Find the partial derivatives<\/strong> [latex]f_x[\/latex] and [latex]f_y[\/latex]<\/li>\n<li class=\"whitespace-normal break-words\"><strong>Evaluate them<\/strong> at your point of interest<\/li>\n<li class=\"whitespace-normal break-words\"><strong>Identify your direction<\/strong>: If given an angle [latex]\\theta[\/latex], use [latex]\\cos\\theta[\/latex] and [latex]\\sin\\theta[\/latex] directly<\/li>\n<li class=\"whitespace-normal break-words\"><strong>Calculate<\/strong> [latex]D_{\\bf{u}}f = f_x\\cos\\theta + f_y\\sin\\theta[\/latex]<\/li>\n<\/ol>\n<p class=\"whitespace-normal break-words\"><strong>Critical Tip: Non-Unit Vectors<\/strong><\/p>\n<p class=\"whitespace-normal break-words\">The direction vector <strong>must<\/strong> be a unit vector (magnitude 1). If you&#8217;re given a direction like [latex]\\langle 3, 4 \\rangle[\/latex], first find its magnitude: [latex]\\sqrt{3^2 + 4^2} = 5[\/latex]. Then normalize it: [latex]{\\bf{u}} = \\langle 3\/5, 4\/5 \\rangle[\/latex]. Now you can use this unit vector in your directional derivative formula.<\/p>\n<p class=\"whitespace-normal break-words\"><strong>Key Insight<\/strong><\/p>\n<p class=\"whitespace-normal break-words\">Notice that [latex]f_x[\/latex] and [latex]f_y[\/latex] are actually special cases of directional derivatives\u2014they&#8217;re the rates of change in the [latex]x[\/latex]-direction ([latex]\\theta = 0[\/latex]) and [latex]y[\/latex]-direction ([latex]\\theta = 90\u00b0[\/latex]).<\/p>\n<\/div>\n<section class=\"textbox example\" aria-label=\"Example\">Find the directional derivative\u00a0[latex]D_{\\bf{u}}f(x,y)[\/latex] of\u00a0[latex]f(x,y)=3x^2y-4xy^3+3y^2-4x[\/latex] in the direction of\u00a0[latex]{\\bf{u}}=(\\cos\\frac{\\pi}3){\\bf{i}}+(\\sin\\frac{\\pi}3)\\bf{j}[\/latex] using\u00a0the Directional Derivative of a Function of Two Variables. What is\u00a0[latex]D_{\\bf{u}}f(3,4)[\/latex]?<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><button class=\"show-answer show-answer-button collapsed\" data-target=\"q541286411\">Show Solution<\/button><\/p>\n<div id=\"q541286411\" class=\"hidden-answer\" style=\"display: none\">\n<p>[latex]\\hspace{5cm}\\begin{align}    D_{\\bf{u}}f(x,y)&=\\frac{(6xy-4y^3-4)(1)}2+\\frac{(3x^2-12xy^2+6y)\\sqrt3}2 \\\\    D_{\\bf{u}}f(3,4)&=\\frac{72-256-4}2+\\frac{(27-576+24)\\sqrt3}2=-94-\\frac{525\\sqrt3}2.    \\end{align}[\/latex]<\/p>\n<\/div>\n<\/div>\n<\/section>\n<section class=\"textbox watchIt\" aria-label=\"Watch It\">Watch the following video to see the worked solution to the above example.<\/p>\n<div style=\"text-align: center;\"><iframe loading=\"lazy\" src=\"\/\/plugin.3playmedia.com\/show?mf=8186163&amp;p3sdk_version=1.10.1&amp;p=20361&amp;pt=375&amp;video_id=wPZAE8M5F6k&amp;video_target=tpm-plugin-kevk5ynk-wPZAE8M5F6k\" width=\"800px\" height=\"450px\" frameborder=\"0\" marginwidth=\"0px\" marginheight=\"0px\" data-mce-fragment=\"1\"><\/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.28_transcript.html\">transcript for \u201cCP 4.28\u201d here (opens in new window).<\/a><\/div>\n<\/section>\n<h2>Gradient<\/h2>\n<div class=\"textbox shaded\">\n<p><strong>The Main Idea\u00a0<\/strong><\/p>\n<p class=\"whitespace-normal break-words\">The gradient packages both partial derivatives into a single vector that tells you everything about how a function is changing at a point. It&#8217;s one of the most powerful tools in multivariable calculus.<\/p>\n<p class=\"whitespace-normal break-words\">For [latex]z = f(x, y)[\/latex], the gradient at any point is:<\/p>\n<p class=\"whitespace-normal break-words\" style=\"text-align: center;\">[latex]\\nabla f(x, y) = f_x(x, y){\\bf{i}} + f_y(x, y){\\bf{j}}[\/latex]<\/p>\n<p class=\"whitespace-normal break-words\">The symbol [latex]\\nabla[\/latex] is called &#8220;nabla&#8221; or &#8220;del,&#8221; and you read this as &#8220;gradient of [latex]f[\/latex]&#8221; or &#8220;del [latex]f[\/latex].&#8221;<\/p>\n<p class=\"whitespace-normal break-words\">The gradient vector points in the direction of steepest ascent on the surface. Its magnitude [latex]|\\nabla f|[\/latex] tells you how steep that climb is. If you&#8217;re on a hillside, the gradient points straight uphill, and its length measures the steepness.<\/p>\n<p class=\"whitespace-normal break-words\"><strong>Key Properties<\/strong><\/p>\n<ul class=\"[&amp;:not(:last-child)_ul]:pb-1 [&amp;:not(:last-child)_ol]:pb-1 list-disc space-y-2.5 pl-7\">\n<li class=\"whitespace-normal break-words\"><strong>Maximum increase<\/strong>: The directional derivative is largest when you move in the direction of [latex]\\nabla f[\/latex], and that maximum value is [latex]|\\nabla f|[\/latex]<\/li>\n<li class=\"whitespace-normal break-words\"><strong>Maximum decrease<\/strong>: The directional derivative is most negative when you move opposite to [latex]\\nabla f[\/latex], with minimum value [latex]-|\\nabla f|[\/latex]<\/li>\n<li class=\"whitespace-normal break-words\"><strong>No change<\/strong>: If [latex]\\nabla f = {\\bf{0}}[\/latex] at a point, the function isn&#8217;t changing in any direction there<\/li>\n<\/ul>\n<p class=\"whitespace-normal break-words\"><strong>Connection to Directional Derivatives<\/strong><\/p>\n<p class=\"whitespace-normal break-words\">The directional derivative in direction [latex]\\bf{u}[\/latex] is simply: [latex]D_{\\bf{u}}f = \\nabla f \\cdot {\\bf{u}}[\/latex]<\/p>\n<p class=\"whitespace-normal break-words\">This dot product formula makes calculations much easier than using the limit definition.<\/p>\n<p class=\"whitespace-normal break-words\"><strong>Problem-Solving Strategy<\/strong><\/p>\n<ol class=\"[&amp;:not(:last-child)_ul]:pb-1 [&amp;:not(:last-child)_ol]:pb-1 list-decimal space-y-2.5 pl-7\">\n<li class=\"whitespace-normal break-words\"><strong>Calculate<\/strong> both partial derivatives [latex]f_x[\/latex] and [latex]f_y[\/latex]<\/li>\n<li class=\"whitespace-normal break-words\"><strong>Form the gradient vector<\/strong> [latex]\\nabla f = f_x{\\bf{i}} + f_y{\\bf{j}}[\/latex]<\/li>\n<li class=\"whitespace-normal break-words\"><strong>Evaluate<\/strong> at your point of interest<\/li>\n<li class=\"whitespace-normal break-words\"><strong>Interpret<\/strong>: The direction of this vector is steepest ascent; its magnitude is the rate of climb<\/li>\n<\/ol>\n<\/div>\n<section class=\"textbox example\" aria-label=\"Example\">Find the gradient\u00a0[latex]\\nabla{f}(x,y)[\/latex] of\u00a0[latex]f(x,y)=(x^2-3y^2)\/(2x+y)[\/latex].<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><button class=\"show-answer show-answer-button collapsed\" data-target=\"q985372461\">Show Solution<\/button><\/p>\n<div id=\"q985372461\" class=\"hidden-answer\" style=\"display: none\">\n<p style=\"text-align: center;\">[latex]\\large{\\nabla{f}(x,y)=\\frac{2x^2+2xy+6y^2}{(2x+y)^2}{\\bf{i}}-\\frac{x^2+12xy+3y^2}{(2x+y)^2}{\\bf{j}}}[\/latex]<\/p>\n<\/div>\n<\/div>\n<\/section>\n<section class=\"textbox example\" aria-label=\"Example\">Find the direction for which the directional derivative of\u00a0[latex]g(x, y)=4x-xy+2y^{2}[\/latex] at [latex](-2, 3)[\/latex] is a maximum. What is the maximum value?<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><button class=\"show-answer show-answer-button collapsed\" data-target=\"q161657349\">Show Solution<\/button><\/p>\n<div id=\"q161657349\" class=\"hidden-answer\" style=\"display: none\">\n<p>The gradient of [latex]g[\/latex] at\u00a0[latex](-2,3)[\/latex] is\u00a0[latex]\\nabla{g}(-2,3)={\\bf{i}}+14{\\bf{j}}[\/latex]. The unit vector that points in the same direction as\u00a0[latex]\\nabla{g}(-2,3)[\/latex] is\u00a0[latex]\\frac{\\nabla{g}(-2,3)}{\\|\\nabla{g}(-2,3)\\|}=\\frac{1}{\\sqrt{197}}{\\bf{i}}+\\frac{14}{\\sqrt{197}}{\\bf{j}}=\\frac{\\sqrt{197}}{197}{\\bf{i}}+\\frac{14\\sqrt{197}}{197}{\\bf{j}}[\/latex], which gives an angle of\u00a0[latex]\\theta=\\arcsin((14\\sqrt{197})\/197\\approx1.499\\text{ rad}[\/latex]. The maximum value of the directional derivative is\u00a0[latex]\\nabla{g}(-2,3)\\approx\\sqrt{197}[\/latex].<\/p>\n<\/div>\n<\/div>\n<\/section>\n<section class=\"textbox watchIt\" aria-label=\"Watch It\">Watch the following video to see the worked solution to the above example.<\/p>\n<div style=\"text-align: center;\"><iframe loading=\"lazy\" src=\"\/\/plugin.3playmedia.com\/show?mf=8186164&amp;p3sdk_version=1.10.1&amp;p=20361&amp;pt=375&amp;video_id=n8TmTVwACTM&amp;video_target=tpm-plugin-rpwvmbgw-n8TmTVwACTM\" width=\"800px\" height=\"450px\" frameborder=\"0\" marginwidth=\"0px\" marginheight=\"0px\" data-mce-fragment=\"1\"><\/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.30_transcript.html\">transcript for \u201cCP 4.30\u201d here (opens in new window).<\/a><\/div>\n<\/section>\n<h2 data-type=\"title\">Gradients and Level Curves<\/h2>\n<div class=\"textbox shaded\">\n<p><strong>The Main Idea\u00a0<\/strong><\/p>\n<p class=\"whitespace-normal break-words\">The gradient has a remarkable geometric property: at any point on a level curve, the gradient vector points perpendicular to that curve. This connection gives you a powerful way to understand both the gradient and level curves simultaneously.<\/p>\n<p class=\"whitespace-normal break-words\">For a function [latex]f(x, y)[\/latex], level curves are defined by [latex]f(x, y) = k[\/latex] for various constants [latex]k[\/latex]. At any point [latex](x_0, y_0)[\/latex] on a level curve, the gradient [latex]\\nabla f(x_0, y_0)[\/latex] is perpendicular (normal) to the level curve at that point.<\/p>\n<p class=\"whitespace-normal break-words\"><strong>Why This Matters<\/strong><\/p>\n<p class=\"whitespace-normal break-words\">Since the gradient points in the direction of steepest ascent, and it&#8217;s perpendicular to level curves, this tells you that level curves represent paths of no change\u2014moving along a level curve doesn&#8217;t change the function value. The steepest climb is always perpendicular to these &#8220;flat&#8221; paths.<\/p>\n<p class=\"whitespace-normal break-words\"><strong>Practical Uses<\/strong><\/p>\n<p class=\"whitespace-normal break-words\">This perpendicularity makes finding tangent and normal vectors to level curves straightforward:<\/p>\n<ul class=\"[&amp;:not(:last-child)_ul]:pb-1 [&amp;:not(:last-child)_ol]:pb-1 list-disc space-y-2.5 pl-7\">\n<li class=\"whitespace-normal break-words\"><strong>Normal vector to the curve<\/strong>: Just compute [latex]\\nabla f[\/latex] at your point<\/li>\n<li class=\"whitespace-normal break-words\"><strong>Tangent vector to the curve<\/strong>: Swap the components of [latex]\\nabla f[\/latex] and negate one of them<\/li>\n<\/ul>\n<p class=\"whitespace-normal break-words\"><strong>Problem-Solving Strategy<\/strong><\/p>\n<ol class=\"[&amp;:not(:last-child)_ul]:pb-1 [&amp;:not(:last-child)_ol]:pb-1 list-decimal space-y-2.5 pl-7\">\n<li class=\"whitespace-normal break-words\"><strong>Calculate the gradient<\/strong> [latex]\\nabla f = f_x{\\bf{i}} + f_y{\\bf{j}}[\/latex]<\/li>\n<li class=\"whitespace-normal break-words\"><strong>Evaluate at your point<\/strong> to get the normal vector to the level curve<\/li>\n<li class=\"whitespace-normal break-words\"><strong>For a tangent vector<\/strong>: swap components and negate one (e.g., if gradient is [latex]\\langle a, b \\rangle[\/latex], use [latex]\\langle -b, a \\rangle[\/latex] or [latex]\\langle b, -a \\rangle[\/latex])<\/li>\n<\/ol>\n<p class=\"whitespace-normal break-words\"><strong>Visual Insight<\/strong><\/p>\n<p class=\"whitespace-normal break-words\">On a contour map, the gradient arrows always point perpendicular to the contour lines, toward higher values. Where contour lines bunch together, gradients are longer, indicating steeper terrain.<\/p>\n<\/div>\n<section class=\"textbox example\" aria-label=\"Example\">For the function\u00a0[latex]f(x,y)=x^2-2xy+5y^2+3x-2y+4[\/latex],\u00a0<span style=\"white-space: nowrap;\">f<\/span><span style=\"font-size: 1rem; text-align: initial;\">ind the tangent to the level curve at point [latex](1, 1)[\/latex]. Draw the graph of the level curve corresponding to [latex]f(x, y)=8[\/latex] and draw [latex]\\nabla{f}(1,1)[\/latex] and a tangent vector.<\/span><\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><button class=\"show-answer show-answer-button collapsed\" data-target=\"q833476002\">Show Solution<\/button><\/p>\n<div id=\"q833476002\" class=\"hidden-answer\" style=\"display: none\">\n<p>[latex]\\nabla{f}(x,y)=(2x-2y+3){\\bf{i}}+(-2x+10y-2){\\bf{j}}[\/latex]<\/p>\n<p>[latex]\\nabla{f}(1,1)=3{\\bf{i}}+6{\\bf{j}}[\/latex]<\/p>\n<p>Tangent vector:\u00a0[latex]6{\\bf{i}}-6{\\bf{j}}[\/latex] or [latex]-6{\\bf{i}}+3{\\bf{j}}[\/latex]<\/p>\n<figure id=\"attachment_1274\" aria-describedby=\"caption-attachment-1274\" style=\"width: 342px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1274\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/5667\/2021\/09\/23133904\/4-6-tryitans1.jpeg\" alt=\"A rotated ellipse with equation f(x, y) = 8. At the point (1, 1) on the ellipse, there are drawn two arrows, one tangent vector and one normal vector. The normal vector is marked \u2207f(1, 1) and is perpendicular to the tangent vector.\" width=\"342\" height=\"347\" \/><figcaption id=\"caption-attachment-1274\" class=\"wp-caption-text\">Figure 6.<\/figcaption><\/figure>\n<\/div>\n<\/div>\n<\/section>\n<h2>Three-Dimensional Gradients and Directional Derivatives<\/h2>\n<div class=\"textbox shaded\">\n<p><strong>The Main Idea\u00a0<\/strong><\/p>\n<p class=\"whitespace-normal break-words\">Everything you learned about gradients and directional derivatives in two dimensions extends naturally to three dimensions. The main difference is that you&#8217;re now working with three partial derivatives instead of two, and direction vectors have three components instead of two.<\/p>\n<p class=\"whitespace-normal break-words\"><strong>The Three-Dimensional Gradient<\/strong><\/p>\n<p class=\"whitespace-normal break-words\">For a function [latex]w = f(x, y, z)[\/latex], the gradient is:<\/p>\n<p class=\"whitespace-normal break-words\" 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 class=\"whitespace-normal break-words\">Just calculate all three partial derivatives and assemble them into a vector.<\/p>\n<p class=\"whitespace-normal break-words\"><strong>Directional Derivatives in 3D<\/strong><\/p>\n<p class=\"whitespace-normal break-words\">The directional derivative formula works the same way as in two dimensions:<\/p>\n<p class=\"whitespace-normal break-words\" style=\"text-align: center;\">[latex]D_{\\bf{u}}f(x, y, z) = \\nabla f(x, y, z) \\cdot {\\bf{u}}[\/latex]<\/p>\n<p class=\"whitespace-normal break-words\">where [latex]{\\bf{u}}[\/latex] must be a unit vector.<\/p>\n<p class=\"whitespace-normal break-words\"><strong>Problem-Solving Strategy<\/strong><\/p>\n<ol class=\"[&amp;:not(:last-child)_ul]:pb-1 [&amp;:not(:last-child)_ol]:pb-1 list-decimal space-y-2.5 pl-7\">\n<li class=\"whitespace-normal break-words\"><strong>Find all three partial derivatives<\/strong> [latex]f_x[\/latex], [latex]f_y[\/latex], and [latex]f_z[\/latex]<\/li>\n<li class=\"whitespace-normal break-words\"><strong>Form the gradient<\/strong> [latex]\\nabla f = f_x{\\bf{i}} + f_y{\\bf{j}} + f_z{\\bf{k}}[\/latex]<\/li>\n<li class=\"whitespace-normal break-words\"><strong>Normalize your direction vector<\/strong>: If given [latex]{\\bf{v}}[\/latex], compute [latex]{\\bf{u}} = \\frac{{\\bf{v}}}{|{\\bf{v}}|}[\/latex]<\/li>\n<li class=\"whitespace-normal break-words\"><strong>Calculate the dot product<\/strong> [latex]\\nabla f \\cdot {\\bf{u}}[\/latex]<\/li>\n<li class=\"whitespace-normal break-words\"><strong>Evaluate at your point<\/strong> by substituting coordinates<\/li>\n<\/ol>\n<p class=\"whitespace-normal break-words\"><strong>Critical Reminder<\/strong><\/p>\n<p class=\"whitespace-normal break-words\">Always normalize your direction vector first. A common mistake is forgetting to divide by the magnitude. For example, if [latex]{\\bf{v}} = -{\\bf{i}} + 2{\\bf{j}} + 2{\\bf{k}}[\/latex], its magnitude is [latex]\\sqrt{1 + 4 + 4} = 3[\/latex], so [latex]{\\bf{u}} = -\\frac{1}{3}{\\bf{i}} + \\frac{2}{3}{\\bf{j}} + \\frac{2}{3}{\\bf{k}}[\/latex].<\/p>\n<p class=\"whitespace-normal break-words\"><strong>Key Properties<\/strong><\/p>\n<p class=\"whitespace-normal break-words\">The same properties from two dimensions still hold: the gradient points toward the steepest increase, its magnitude gives the maximum rate of change, and moving perpendicular to the gradient means no change in function value.<\/p>\n<\/div>\n<section class=\"textbox example\" aria-label=\"Example\">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\"><button class=\"show-answer show-answer-button collapsed\" data-target=\"q123678759\">Show Solution<\/button><\/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<\/section>\n<section class=\"textbox watchIt\" aria-label=\"Watch It\">Watch the following video to see the worked solution to the above example.<\/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\" data-mce-fragment=\"1\"><\/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<\/section>\n<section class=\"textbox example\" aria-label=\"Example\">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\"><button class=\"show-answer show-answer-button collapsed\" data-target=\"q370457713\">Show Solution<\/button><\/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<\/section>\n<section class=\"textbox watchIt\" aria-label=\"Watch It\">Watch the following video to see the worked solution to the above example.<\/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\" data-mce-fragment=\"1\"><\/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<\/section>\n","protected":false},"author":15,"menu_order":21,"template":"","meta":{"_candela_citation":"[]","pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"class_list":["post-631","chapter","type-chapter","status-publish","hentry"],"part":428,"module-header":"fresh_take","content_attributions":[],"internal_book_links":[],"video_content":null,"cc_video_embed_content":{"cc_scripts":"","media_targets":[]},"try_it_collection":null,"_links":{"self":[{"href":"https:\/\/content.one.lumenlearning.com\/calculus3\/wp-json\/pressbooks\/v2\/chapters\/631","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/content.one.lumenlearning.com\/calculus3\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/content.one.lumenlearning.com\/calculus3\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/calculus3\/wp-json\/wp\/v2\/users\/15"}],"version-history":[{"count":6,"href":"https:\/\/content.one.lumenlearning.com\/calculus3\/wp-json\/pressbooks\/v2\/chapters\/631\/revisions"}],"predecessor-version":[{"id":1838,"href":"https:\/\/content.one.lumenlearning.com\/calculus3\/wp-json\/pressbooks\/v2\/chapters\/631\/revisions\/1838"}],"part":[{"href":"https:\/\/content.one.lumenlearning.com\/calculus3\/wp-json\/pressbooks\/v2\/parts\/428"}],"metadata":[{"href":"https:\/\/content.one.lumenlearning.com\/calculus3\/wp-json\/pressbooks\/v2\/chapters\/631\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/content.one.lumenlearning.com\/calculus3\/wp-json\/wp\/v2\/media?parent=631"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/calculus3\/wp-json\/pressbooks\/v2\/chapter-type?post=631"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/calculus3\/wp-json\/wp\/v2\/contributor?post=631"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/calculus3\/wp-json\/wp\/v2\/license?post=631"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}