{"id":869,"date":"2021-09-03T17:27:21","date_gmt":"2021-09-03T17:27:21","guid":{"rendered":"https:\/\/courses.lumenlearning.com\/calculus3\/?post_type=chapter&#038;p=869"},"modified":"2022-10-29T02:02:34","modified_gmt":"2022-10-29T02:02:34","slug":"chain-rule","status":"publish","type":"chapter","link":"https:\/\/courses.lumenlearning.com\/calculus3\/chapter\/chain-rule\/","title":{"raw":"Chain Rule","rendered":"Chain Rule"},"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\">State the chain rules for one or two independent variables.<\/span><\/li>\r\n \t<li><span class=\"os-abstract-content\">Use tree diagrams as an aid to understanding the chain rule for several independent and intermediate variables.<\/span><\/li>\r\n<\/ul>\r\n<\/div>\r\n<h2 data-type=\"title\">Chain Rules for One or Two Independent Variables<\/h2>\r\n<p id=\"fs-id1167793879032\">Recall that the chain rule for the derivative of a composite of two functions can be written in the form<\/p>\r\n<p style=\"text-align: center;\">[latex]\\large{\\frac{d}{dx}(f(g(x)))=f'(g(x))g'(x)}.[\/latex]<\/p>\r\nIn this equation, both [latex]f(x)[\/latex] and [latex]g(x)[\/latex] are functions of one variable. Now suppose that [latex]f[\/latex] is a function of two variables and [latex]g[\/latex] is a function of one variable. Or perhaps they are both functions of two variables, or even more. How would we calculate the derivative in these cases? The following theorem gives us the answer for the case of one independent variable.\r\n<div class=\"textbox shaded\">\r\n<h3 style=\"text-align: center;\">theorem: Chain rule for one independent variable<\/h3>\r\n\r\n<hr \/>\r\n<p id=\"fs-id1167794143923\">Suppose that <span style=\"white-space: nowrap;\">[latex]x=g(t)[\/latex]\u00a0<\/span>and [latex]y=h(t)[\/latex] are differentiable functions of [latex]t[\/latex] and [latex]z=f(x, y)[\/latex] is a differentiable function of [latex]x[\/latex] and [latex]y[\/latex]. Then [latex]z=f(x(t), y(t))[\/latex] is a differentiable function of [latex]t[\/latex] and<\/p>\r\n<p style=\"text-align: center;\">[latex]\\LARGE{\\frac{dz}{dt}=\\frac{\\partial{z}}{\\partial{x}}\\cdot\\frac{dx}{dt}+\\frac{\\partial{z}}{\\partial{y}}\\cdot\\frac{dy}{dt}},[\/latex]<\/p>\r\nwhere the ordinary derivatives are evaluated at [latex]t[\/latex] and the partial derivatives are evaluated at [latex](x, y)[\/latex].\r\n\r\n<\/div>\r\n<h2 data-type=\"title\">Proof<\/h2>\r\n<p id=\"fs-id1167793901389\">The proof of this theorem uses the definition of differentiability of a function of two variables. Suppose that [latex]f[\/latex] is differentiable at the point\u00a0[latex]P(x_0, y_0)[\/latex], where [latex]x_0=g(t_0)[\/latex] and [latex]y_0=h(t_0)[\/latex] for a fixed value of [latex]t_0[\/latex]. We wish to prove that [latex]z=f(x(t), y(t))[\/latex] is differentiable at [latex]t=t_0[\/latex] and that\u00a0the Chain Rule for One Independent Variable\u00a0holds at that point as well.<\/p>\r\n<p id=\"fs-id1167793264165\">Since [latex]f[\/latex] is differentiable at [latex]P[\/latex], we know that<\/p>\r\n<p style=\"text-align: center;\">[latex]\\large{z(t)=f(x,y)=f(x_0,y_0)+f_x(x_0,y_0)(x-x_0)+f_y(x_0,y_0)(y-y_0)+E(x,y)},[\/latex]<\/p>\r\nwhere [latex]\\displaystyle{\\lim_{(x,y)\\to(x_0,y_0)}}\\frac{E(x,y)}{\\sqrt{(x-x_0)^2+(y-y_0)^2}}=0[\/latex]. We then subtract\u00a0[latex]z_0=f(x_0,y_0)[\/latex] from both sides of this equation:\r\n\r\n[latex]\\hspace{3cm}\\large{\\begin{alignat}{2}\r\n\r\nz(t)-z(t_0) &amp;= f(x(t),y(t))-f(x(t_0),y(t_0)) \\\\\r\n\r\n&amp;= f_x(x_0,y_0)(x(t)-x(t_0))+f_y(x_0,y_0)(y(t)-y(t_0))+E(x(t),y(t)). \\\\\r\n\r\n\\end{alignat}}[\/latex]\r\n\r\nNext, we divide both sides by\u00a0[latex]t-t_0[\/latex]:\r\n<p style=\"text-align: center;\">[latex]\\large{\\frac{z(t)-z(t_0)}{t-t_0}=f_x(x_0,y_0)\\left(\\frac{x(t)-x(t_0)}{t-t_0}\\right)+f_y(x_0,y_0)\\left(\\frac{y(t)-y(t_0)}{t-t_0}\\right)+\\frac{E(x(t),y(t))}{t-t_0}}.[\/latex]<\/p>\r\nThen we take the limit as\u00a0[latex]t[\/latex] approaches\u00a0[latex]t_0[\/latex]:\r\n<p style=\"text-align: center;\">[latex]\\large{\\displaystyle\\lim_{t\\to t_0}\\frac{z(t)-z(t_0)}{t-t_0} = f_x(x_0,y_0)\\displaystyle\\lim_{t\\to t_0}\\left(\\frac{x(t)-x(t_)}{t-t_0}\\right)+f_y(x_0,y_0)\\displaystyle\\lim_{t\\to t_0}\\left(\\frac{y(t)-y(t_0)}{t-t_0}\\right)+ \\displaystyle\\lim_{t\\to t_0}\\frac{E(x(t),y(t))}{t-t_0}}.[\/latex]<\/p>\r\nThe left-hand side of this equation is equal to\u00a0[latex]dz\/dt[\/latex], which leads to\r\n<p style=\"text-align: center;\">[latex]\\large{\\frac{dz}{dt}=f_x(x_0,y_0)\\frac{dx}{dt}+f_y(x_0,y_0)\\frac{dy}{dt}+\\displaystyle\\lim_{t\\to t_0}\\frac{E(x(t),y(t))}{t-t_0}}.[\/latex]<\/p>\r\nThe last term can be rewritten as\r\n\r\n[latex]\\hspace{3cm}\\large{\\begin{alignat}{2}\r\n\r\n\\displaystyle\\lim_{t\\to t_0}\\frac{E(x(t),y(t))}{t-t_0} &amp;= \\displaystyle\\lim_{t\\to t_0}\\left(\\frac{E(x,y)}{\\sqrt{(x-x_0)^2+(y-y_0)^2}}\\frac{\\sqrt{(x-x_0)^2+(y-y_0)^2}}{t-t_0}\\right) \\\\\r\n\r\n&amp;= \\displaystyle\\lim_{t\\to t_0}\\left(\\frac{E(x,y)}{\\sqrt{(x-x_0)^2+(y-y_0)^2}}\\right)\\displaystyle\\lim_{t\\to t_0}\\left(\\frac{\\sqrt{(x-x_0)^2+(y-y_0)^2}}{t-t_0}\\right). \\\\\r\n\r\n\\end{alignat}}[\/latex]\r\n\r\nAs [latex]t[\/latex] approaches [latex]t_0, (x(t), y(t))[\/latex] approaches [latex](x(t_0), y(t_0))[\/latex], so we can rewrite the last product as\r\n<p style=\"text-align: center;\">[latex]\\displaystyle\\lim_{(x,y)\\to (x_0,y_0)}\\left(\\frac{E(x,y)}{\\sqrt{(x-x_0)^2+(y-y_0)^2}}\\right)\\displaystyle\\lim_{(x,y)\\to (x_0,y_0)}\\left(\\frac{\\sqrt{(x-x_0)^2+(y-y_0)^2}}{t-t_0}\\right)[\/latex]<\/p>\r\nSince the first limit is equal to zero, we need only show that the second limit is finite:\r\n\r\n[latex]\\hspace{3cm}\\begin{alignat}{2}\r\n\r\n\\displaystyle\\lim_{(x,y)\\to (x_0,y_0)}\\left(\\frac{\\sqrt{(x-x_0)^2+(y-y_0)^2}}{t-t_0}\\right) &amp;= \\displaystyle\\lim_{(x,y)\\to (x_0,y_0)}\\left(\\sqrt{\\frac{(x-x_0)^2+(y-y_0)^2}{(t-t_0)^2}}\\right) \\\\\r\n\r\n&amp;= \\displaystyle\\lim_{(x,y)\\to (x_0,y_0)}\\left(\\sqrt{\\left(\\frac{x-x_0}{t-t_0}\\right)^2+\\left(\\frac{y-y_0}{t-t_0}\\right)^2}\\right) \\\\\r\n\r\n&amp;= \\sqrt{\\left(\\displaystyle\\lim_{(x,y)\\to (x_0,y_0)}\\left(\\frac{x-x_0}{t-t_0}\\right)\\right)^2+\\left( \\displaystyle\\lim_{(x,y)\\to (x_0,y_0)}\\left(\\frac{y-y_0}{t-t_0}\\right)\\right)^2}.\r\n\r\n\\end{alignat}[\/latex]\r\n\r\nSince [latex]x(t)[\/latex] and [latex]y(t)[\/latex] are both differentiable functions of [latex]t[\/latex], both limits inside the last radical exist. Therefore, this value is finite. This proves the chain rule at [latex]t=t_0[\/latex]; the rest of the theorem follows from the assumption that all functions are differentiable over their entire domains.\r\n\r\n[latex]_\\blacksquare[\/latex]\r\n\r\nCloser examination of\u00a0the Chain Rule for One Independent Variable\u00a0reveals an interesting pattern. The first term in the equation is [latex]\\frac{\\partial f}{\\partial x}\\cdot\\frac{dx}{dt}[\/latex] and the second term is [latex]\\frac{\\partial f}{\\partial y}\\cdot\\frac{dy}{dt}[\/latex]. Recall that when multiplying fractions, cancelation can be used. If we treat these derivatives as fractions, then each product \u201csimplifies\u201d to something resembling [latex]\\partial f\/dt[\/latex]. The variables [latex]x[\/latex] and [latex]y[\/latex] that disappear in this simplification are often called\u00a0<strong><span id=\"f10a2a32-9eca-48cf-9e84-10c18a890484_term185\" data-type=\"term\">intermediate variables<\/span><\/strong>: they are independent variables for the function [latex]f[\/latex], but are dependent variables for the variable [latex]t[\/latex]. Two terms appear on the right-hand side of the formula, and [latex]f[\/latex] is a function of two variables. This pattern works with functions of more than two variables as well, as we see later in this section.\r\n<div class=\"textbox exercises\">\r\n<h3>Example: Using the chain rule<\/h3>\r\nCalculate [latex]dz\/dt[\/latex] for each of the following functions:\r\n<p style=\"padding-left: 30px;\">a. [latex]z=f(x,y)=4x^2+3y^2, x=x(t)=\\sin{t},y=y(t)=\\cos{t}[\/latex]<\/p>\r\n<p style=\"padding-left: 30px;\">b.\u00a0[latex]z=f(x,y)=\\sqrt{x^2-y^2},x=x(t)=e^{2t},y=y(t)=e^{-t}[\/latex]<\/p>\r\n[reveal-answer q=\"761249035\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"761249035\"]\r\n\r\na. To use the chain rule, we need four quantities\u2014[latex]\\partial z\/\\partial x, \\partial z\/\\partial y, dx\/dt,[\/latex] and [latex]dy\/dt[\/latex]:\r\n\r\n[latex]\\hspace{8cm}\\begin{alignat}{2}\r\n\r\n\\frac{\\partial z}{\\partial x} &amp;= 8x &amp;\\quad &amp;\\quad \\frac{\\partial z}{\\partial y} &amp;= 6y \\\\\r\n\r\n\\frac{dx}{dt}&amp;=\\cos{t} &amp;\\quad &amp;\\quad \\frac{dy}{dt}&amp;=-\\sin{t}.\r\n\r\n\\end{alignat}[\/latex]\r\n\r\nNow, we substitute each of these into\u00a0the Chain Rule for One Independent Variable:\r\n\r\n[latex]\\hspace{8cm}\\begin{alignat}{2}\r\n\r\n\\frac{dz}{dt} &amp;=\\frac{\\partial z}{\\partial x}\\cdot\\frac{dx}{dt}+\\frac{\\partial z}{\\partial y}\\cdot\\frac{dy}{dt} \\\\\r\n\r\n&amp;=(8x)(\\cos{t})+(6y)(-\\sin{t}) \\\\\r\n\r\n&amp;= 8x\\cos{t}-6y\\sin{t}.\r\n\r\n\\end{alignat}[\/latex]\r\n\r\nThis answer has three variables in it. To reduce it to one variable, use the fact that [latex]x(t)=\\sin t[\/latex] and [latex]y(t)=\\cos t[\/latex]. We obtain\r\n\r\n[latex]\\hspace{8cm}\\begin{alignat}{2}\r\n\r\n\\frac{dz}{dt} &amp;=8x\\cos{t}-6y\\sin{t} \\\\\r\n\r\n&amp;=8(\\sin t)\\cos t - 6(\\cos t)\\sin t \\\\\r\n\r\n&amp;= 2\\sin t\\cos t.\r\n\r\n\\end{alignat}[\/latex]\r\n\r\nThis derivative can also be calculated by first substituting [latex]x(t)[\/latex] and [latex]y(t)[\/latex] into [latex]f(x, y)[\/latex], then differentiating with respect to [latex]t[\/latex]:\r\n\r\n[latex]\r\n\r\n\\hspace{8cm}\\begin{alignat}{2}\r\n\r\nz &amp;=f(x,y) \\\\\r\n\r\n&amp;=f(x(t),y(t)) \\\\\r\n\r\n&amp;= 4(x(t))^2+3(y(t))^2 \\\\\r\n\r\n&amp;=4\\sin^2t+3\\cos^2t.\r\n\r\n\\end{alignat}\r\n\r\n[\/latex]\r\n\r\nThen\r\n\r\n[latex]\r\n\r\n\\hspace{8cm}\\begin{alignat}{2}\r\n\r\n\\frac{dz}{dt} &amp;=2(4\\sin t)(\\cos t)+2(3\\cos t)(-\\sin t) \\\\\r\n\r\n&amp;=8\\sin t\\cos t-6\\sin t\\cos t \\\\\r\n\r\n&amp;=2\\sin t\\cos t,\r\n\r\n\\end{alignat}\r\n\r\n[\/latex]\r\n\r\nwhich\u00a0is the same solution. However, it may not always be this easy to differentiate in this form.\r\n\r\nb.\u00a0To use the chain rule, we again need four quantities\u2014[latex]\\partial z\/\\partial x, \\partial z\/\\partial y, dx\/dt,[\/latex], and [latex]dy\/dt[\/latex]:\r\n\r\n[latex]\r\n\r\n\\hspace{8cm}\\begin{alignat}{2}\r\n\r\n\\frac{\\partial z}{\\partial x} &amp;= \\frac{x}{\\sqrt{x^2-y^2}} &amp;\\quad &amp;\\quad \\frac{\\partial z}{\\partial y} &amp;= \\frac{-y}{\\sqrt{x^2-y^2}} \\\\\r\n\r\n\\frac{dx}{dt}&amp;=2e^{2t} &amp;\\quad &amp;\\quad \\frac{dy}{dt}&amp;=-e^{-t}{t}.\r\n\r\n\\end{alignat}\r\n\r\n[\/latex]\r\n\r\nWe substitute each of these into\u00a0the Chain Rule for One Independent Variable:\r\n\r\n[latex]\r\n\r\n\\hspace{8cm}\\begin{alignat}{2}\r\n\r\n\\frac{dz}{dt} &amp;=\\frac{\\partial z}{\\partial x}\\cdot\\frac{dx}{dt}+\\frac{\\partial z}{\\partial y}\\cdot\\frac{dy}{dt} \\\\\r\n\r\n&amp;=\\left(\\frac{x}{\\sqrt{x^2-y^2}}\\right)(2e^{2t})+\\left(\\frac{-y}{\\sqrt{x^2-y^2}}\\right)(-e^{-t}) \\\\\r\n\r\n&amp;= \\frac{2xe^{2t}-ye^{-t}}{\\sqrt{x^2-y^2}}.\r\n\r\n\\end{alignat}\r\n\r\n[\/latex]\r\n\r\nTo reduce this to one variable, we use the fact that [latex]x(t)=e^{2t}[\/latex] and [latex]y(t)=e^{-1}[\/latex]. Therefore,\r\n\r\n[latex]\r\n\r\n\\hspace{8cm}\\begin{alignat}{2}\r\n\r\n\\frac{dz}{dt} &amp;=\\frac{2xe^{2t}-ye^{-t}}{\\sqrt{x^2-y^2}} \\\\\r\n\r\n&amp;=\\frac{2(e^{2t})e^{2t}+(e^{-t})e^{-t}}{\\sqrt{e^{4t}-e^{-2t}}} \\\\\r\n\r\n&amp;=\\frac{2e^{4t}+e^{-2t}}{\\sqrt{e^{4t}-e^{-2t}}}.\r\n\r\n\\end{alignat}\r\n\r\n[\/latex]\r\n\r\nTo eliminate negative exponents, we multiply the top by [latex]e^{2t}[\/latex] and the bottom by [latex]\\sqrt{e^{4t}}[\/latex]:\r\n\r\n[latex]\r\n\r\n\\hspace{8cm}\\begin{alignat}{2}\r\n\r\n\\frac{dz}{dt} &amp;=\\frac{2e^{4t}+e^{-2t}}{\\sqrt{e^{4t}-e^{-2t}}}\\cdot\\frac{e^{2t}}{\\sqrt{e^{4t}}} \\\\\r\n\r\n&amp;=\\frac{2e^{6t}+1}{\\sqrt{e^{8t}-e^{2t}}} \\\\\r\n\r\n&amp;=\\frac{2e^{6t}+1}{\\sqrt{e^{2t}(e^{6t}-1)}} \\\\\r\n\r\n&amp;=\\frac{2e^{6t}+1}{e^t\\sqrt{e^{6t}-1}}.\r\n\r\n\\end{alignat}\r\n\r\n[\/latex]\r\n\r\nAgain, this derivative can also be calculated by first substituting [latex]x(t)[\/latex] and [latex]y(t)[\/latex] into [latex]f(x, y)[\/latex], then differentiating with respect to [latex]t[\/latex]:\r\n\r\n[latex]\r\n\r\n\\hspace{8cm}\\begin{alignat}{2}\r\n\r\nz &amp;=f(x,y) \\\\\r\n\r\n&amp;=f(x(t),y(t))\\\\\r\n\r\n&amp;=\\sqrt{(x(t))^2-(y(t))^2} \\\\\r\n\r\n&amp;=\\sqrt{e^{4t}-e^{-2t}} \\\\\r\n\r\n&amp;=(e^{4t}-e^{-2t})^{1\/2}.\r\n\r\n\\end{alignat}\r\n\r\n[\/latex]\r\n\r\nThen\r\n\r\n[latex]\r\n\r\n\\hspace{8cm}\\begin{alignat}{2}\r\n\r\n\\frac{dz}{dt} &amp;=\\frac12(e^{4t}-e^{-2t})^{-1\/2}(4e^{4t}+2e^{-2t}) \\\\\r\n\r\n&amp;=\\frac{2e^{4t}+e^{-2t}}{\\sqrt{e^{4t}-e^{-2t}}}.\r\n\r\n\\end{alignat}\r\n\r\n[\/latex]\r\n\r\nThis is the same solution.\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 [latex]dz\/dt[\/latex] given the following functions. Express the final answer in terms of [latex]t[\/latex].\r\n<p style=\"text-align: center;\">[latex]z=f(x, y)=x^{2}-3xy+2y^{2}, x=x(t)=3\\sin 2t, y=y(t)=4\\cos 2t[\/latex]<\/p>\r\n[reveal-answer q=\"142579180\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"142579180\"]\r\n\r\n[latex]\\hspace{5cm} \\begin{align}\r\n\r\n&amp;=(2x-3y)(6\\cos 2t)+(-3x+y4)(-8\\sin 2t) \\\\\r\n\r\n&amp;=-92\\sin 2t\\cos 2t - 72(\\cos^2{2t}-\\sin^2{2t} \\\\\r\n\r\n&amp;=-46\\sin 4t - 72\\cos 4t.\r\n\r\n\\end{align}[\/latex]\r\n\r\n[\/hidden-answer]\r\n\r\n<\/div>\r\nIt is often useful to create a visual representation of\u00a0the Chain Rule for One Independent Variable\u00a0for the chain rule. This is called a\u00a0<strong><span id=\"f10a2a32-9eca-48cf-9e84-10c18a890484_term186\" data-type=\"term\">tree diagram<\/span><\/strong>\u00a0for the chain rule for functions of one variable and it provides a way to remember the formula (Figure 1). This diagram can be expanded for functions of more than one variable, as we shall see very shortly.\r\n\r\n[caption id=\"attachment_1244\" align=\"aligncenter\" width=\"455\"]<img class=\"size-full wp-image-1244\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/5667\/2021\/09\/22221516\/4-5-1.jpeg\" alt=\"A diagram that starts with z = f(x, y). Along the first branch, it is written \u2202z\/\u2202x, then x = x(t), then dx\/dt, then t, and finally it says \u2202z\/\u2202x dx\/dt. Along the other branch, it is written \u2202z\/\u2202y, then y = y(t), then dy\/dt, then t, and finally it says \u2202z\/\u2202y dy\/dt.\" width=\"455\" height=\"291\" \/> Figure 1. Tree diagram for the case\u00a0[latex]\\small{\\dfrac{dz}{dt}=\\dfrac{\\partial z}{\\partial x}\\cdot\\dfrac{dx}{dt}+\\dfrac{\\partial z}{\\partial y}\\cdot\\dfrac{dy}{dt}}[\/latex].[\/caption]\r\n<p id=\"fs-id1167793900591\">In this diagram, the leftmost corner corresponds to [latex]z=f(x, y)[\/latex]. Since [latex]f[\/latex] has two\u00a0<span id=\"f10a2a32-9eca-48cf-9e84-10c18a890484_term187\" class=\"no-emphasis\" data-type=\"term\">independent variables<\/span>, there are two lines coming from this corner. The upper branch corresponds to the variable [latex]x[\/latex] and the lower branch corresponds to the variable [latex]y[\/latex]. Since each of these variables is then dependent on one variable [latex]t[\/latex], one branch then comes from [latex]x[\/latex] and one branch comes from [latex]y[\/latex]. Last, each of the branches on the far right has a label that represents the path traveled to reach that branch. The top branch is reached by following the [latex]x[\/latex] branch, then the [latex]t[\/latex] branch; therefore, it is labeled\u00a0[latex](\\partial z\/\\partial x)\\times(dx\/dt)[\/latex]. The bottom branch is similar: first the [latex]y[\/latex] branch, then the [latex]t[\/latex] branch. This branch is labeled [latex](\\partial z\/\\partial x)\\times(dy\/dt)[\/latex]. To get the formula for [latex]dz\/dt[\/latex], add all the terms that appear on the rightmost side of the diagram. This gives us\u00a0the Chain Rule for One Independent Variable.<\/p>\r\n<p id=\"fs-id1167793949238\">In\u00a0the Chain Rule for Two Independent Variables, [latex]z=f(x, y)[\/latex] is a function of\u00a0[latex]x[\/latex] and [latex]y[\/latex], and both [latex]x=g(u, v)[\/latex] and [latex]y=h(u, v)[\/latex] are functions of the independent variables\u00a0[latex]u[\/latex] and\u00a0[latex]v[\/latex].<\/p>\r\n\r\n<div class=\"textbox shaded\">\r\n<h3 style=\"text-align: center;\">Theorem: Chain Rule for two independent variables<\/h3>\r\n\r\n<hr \/>\r\n<p id=\"fs-id1167793956651\">Suppose [latex]x=g(u, v)[\/latex] and [latex]y=h(u, v)[\/latex] are differentiable functions of [latex]u[\/latex] and [latex]v[\/latex], and [latex]z=f(x, y)[\/latex] is a differentiable function of\u00a0[latex]x[\/latex] and [latex]y[\/latex]. Then, [latex]z=f(g(u, v), h(u, v))[\/latex] is a differentiable function of\u00a0[latex]u[\/latex] and\u00a0[latex]v[\/latex], and<\/p>\r\n<p style=\"text-align: center;\">[latex]\\large{\\frac{\\partial z}{\\partial u}=\\frac{\\partial z}{\\partial x}\\frac{\\partial x}{\\partial u}+\\frac{\\partial z}{\\partial y}\\frac{\\partial y}{\\partial u}}[\/latex]<\/p>\r\nand\r\n<p style=\"text-align: center;\">[latex]\\large{\\frac{\\partial x}{\\partial v}=\\frac{\\partial z}{\\partial x}\\frac{\\partial x}{\\partial v}+\\frac{\\partial z}{\\partial y}\\frac{\\partial y}{\\partial v}}[\/latex]<\/p>\r\n\r\n<\/div>\r\n<div>We can draw a tree diagram for each of these formulas as well as follows.<\/div>\r\n<div><\/div>\r\n<div>[caption id=\"attachment_1247\" align=\"aligncenter\" width=\"428\"]<img class=\"size-full wp-image-1247\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/5667\/2021\/09\/22221655\/4-5-2.jpeg\" alt=\"A diagram that starts with z = f(x, y). Along the first branch, it is written \u2202z\/\u2202x, then x = g(u, v), at which point it breaks into another two branches: the first subbranch says \u2202x\/\u2202u, then u, and finally it says \u2202z\/\u2202x \u2202x\/\u2202u; the second subbranch says \u2202x\/\u2202v, then v, and finally it says \u2202z\/\u2202x \u2202x\/\u2202v. Along the other branch, it is written \u2202z\/\u2202y, then y = h(u, v), at which point it breaks into another two branches: the first subbranch says \u2202y\/\u2202u, then u, and finally it says \u2202z\/\u2202y \u2202y\/\u2202u; the second subbranch says \u2202y\/\u2202v, then v, and finally it says \u2202z\/\u2202y \u2202y\/\u2202v.\" width=\"428\" height=\"336\" \/> Figure 2. Tree diagram for\u00a0[latex]\\small{\\frac{\\partial z}{\\partial u}=\\frac{\\partial z}{\\partial x}\\frac{\\partial x}{\\partial u}+\\frac{\\partial z}{\\partial y}\\frac{\\partial y}{\\partial u}}[\/latex] and\u00a0[latex]\\small{\\frac{\\partial x}{\\partial v}=\\frac{\\partial z}{\\partial x}\\frac{\\partial x}{\\partial v}+\\frac{\\partial z}{\\partial y}\\frac{\\partial y}{\\partial v}}.[\/latex][\/caption]<\/div>\r\n<div><\/div>\r\n<div>\r\n<p id=\"fs-id1167793371102\">To derive the formula for [latex]\\partial z\/\\partial u[\/latex], start from the left side of the diagram, then follow only the branches that end with [latex]u[\/latex] and<span style=\"font-size: 1rem; text-align: initial;\">\u00a0add the terms that appear at the end of those branches. For the formula for [latex]\\partial z\/\\partial v[\/latex], follow only the branches that end with [latex]v[\/latex] and add the terms that appear at the end of those branches.<\/span><\/p>\r\n<p id=\"fs-id1167793450624\">There is an important difference between these two chain rule theorems. In\u00a0the Chain Rule for One Independent Variable, the left-hand side of the formula for the derivative is not a partial derivative, but in\u00a0the Chain Rule for Two Independent Variables\u00a0it is. The reason is that, in\u00a0The reason is that, in\u00a0the Chain Rule for One Independent Variable, [latex]z[\/latex] is ultimately\u00a0a function of [latex]t[\/latex] alone, whereas in\u00a0Chain Rule for Two Independent Variables, [latex]z[\/latex] is a function of both [latex]u[\/latex] and\u00a0[latex]v[\/latex].<\/p>\r\n\r\n<\/div>\r\n<div>\r\n<div class=\"textbox exercises\">\r\n<h3>Example: using the chain rule for two variables<\/h3>\r\nCalculate [latex]\\partial z\/\\partial u[\/latex] and [latex]\\partial z\/\\partial v[\/latex] using the following functions:\r\n<p style=\"text-align: center;\">[latex]z=f(x,y)=3x^2-2xy+y^2,x=x(u,v)=3u+2v,y=y(u,v)=4u-v[\/latex]<\/p>\r\n[reveal-answer q=\"977241165\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"977241165\"]\r\n\r\nTo implement the chain rule for two variables, we need six partial derivatives\u2014[latex]\\partial z\/\\partial x, \\partial z\/\\partial y, \\partial x\/\\partial u, \\partial x\/\\partial v, \\partial y\/\\partial u,[\/latex], and\u00a0[latex]\\partial y\/\\partial v[\/latex]:\r\n\r\n[latex]\r\n\r\n\\hspace{8cm}\\begin{alignat}{2}\r\n\r\n\\frac{\\partial z}{\\partial x} &amp;= 6x-2y &amp;\\quad &amp;\\quad \\frac{\\partial z}{\\partial y} &amp;= -2x+2y \\\\\r\n\r\n\\frac{\\partial x}{\\partial u} &amp;= 3 &amp;\\quad &amp;\\quad \\frac{\\partial x}{\\partial v}&amp;=2 \\\\\r\n\r\n\\frac{\\partial y}{\\partial u}&amp;= 4 &amp;\\quad &amp;\\quad \\frac{\\partial y}{\\partial v}&amp;=-1.\r\n\r\n\\end{alignat}\r\n\r\n[\/latex]\r\n\r\nTo find\u00a0[latex]\\partial z\/\\partial u[\/latex],\u00a0we use\u00a0the Chain Rule for Two Independent Variables:\r\n\r\n[latex]\r\n\r\n\\hspace{8cm}\\begin{alignat}{2}\r\n\r\n\\frac{\\partial z}{\\partial u} &amp;= \\frac{\\partial z}{\\partial x}\\frac{\\partial x}{\\partial u}+\\frac{\\partial x}{\\partial y}\\frac{\\partial y}{\\partial u} \\\\\r\n\r\n&amp;= 3(6x-2y)+4(-2x+2y) \\\\\r\n\r\n&amp;= 10x+2y.\r\n\r\n\\end{alignat}\r\n\r\n[\/latex]\r\n\r\nNext, we substitute\u00a0[latex]x(u,v)=3u+2v[\/latex] and\u00a0[latex]y(u,v)=4u-v[\/latex]:\r\n\r\n[latex]\r\n\r\n\\hspace{8cm}\\begin{alignat}{2}\r\n\r\n\\frac{\\partial z}{\\partial u} &amp;= 10x+2y \\\\\r\n\r\n&amp;= 10(3u+2v)+2(4u-v) \\\\\r\n\r\n&amp;= 38u+18v.\r\n\r\n\\end{alignat}\r\n\r\n[\/latex]\r\n\r\nTo find\u00a0[latex]\\partial z\/\\partial v[\/latex], we use\u00a0the Chain Rule for Two Independent Variables:\r\n\r\n[latex]\r\n\r\n\\hspace{8cm}\\begin{alignat}{2}\r\n\r\n\\frac{\\partial z}{\\partial v} &amp;= \\frac{\\partial z}{\\partial x}\\frac{\\partial x}{\\partial v}+\\frac{\\partial x}{\\partial y}\\frac{\\partial y}{\\partial v} \\\\\r\n\r\n&amp;= 2(6x-2y)+(-1)(-2x+2y) \\\\\r\n\r\n&amp;= 14x-6y.\r\n\r\n\\end{alignat}\r\n\r\n[\/latex]\r\n\r\nThen we substitute [latex]x(u,v)=3u+2v[\/latex] and\u00a0[latex]y(u,v)=4u-v[\/latex]:\r\n\r\n[latex]\r\n\r\n\\hspace{8cm}\\begin{alignat}{2}\r\n\r\n\\frac{\\partial z}{\\partial v} &amp;= 14x-6y \\\\\r\n\r\n&amp;= 14(3u+2v)-6(4u-v) \\\\\r\n\r\n&amp;= 18u+34v.\r\n\r\n\\end{alignat}\r\n\r\n[\/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]\\partial x\/\\partial u[\/latex] and\u00a0[latex]\\partial z\/\\partial v[\/latex] given the following functions:\r\n<p style=\"text-align: center;\">[latex]z=f(x,y)=\\frac{2x-y}{x+3y},x(u,v)=e^{2u}\\cos 3v, y(u,v)=e^{2u}\\sin 3v[\/latex]<\/p>\r\n[reveal-answer q=\"825766032\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"825766032\"]\r\n<p style=\"text-align: center;\">[latex]\\frac{\\partial z}{\\partial u}=0, \\frac{\\partial z}{\\partial v}=\\frac{-21}{(3\\sin 3v + \\cos 3v)^2}[\/latex]<\/p>\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=8186160&amp;p3sdk_version=1.10.1&amp;p=20361&amp;pt=375&amp;video_id=IBYLL6KOi80&amp;video_target=tpm-plugin-po9x6dci-IBYLL6KOi80\" 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.24_transcript.html\">transcript for \u201cCP 4.24\u201d here (opens in new window).<\/a><\/center>\r\n<h2 data-type=\"title\">The Generalized Chain Rule<\/h2>\r\n<p id=\"fs-id1167794026716\">Now that we\u2019ve see how to extend the original chain rule to functions of two variables, it is natural to ask: Can we extend the rule to more than two variables? The answer is yes, as the\u00a0<strong><span id=\"f10a2a32-9eca-48cf-9e84-10c18a890484_term188\" data-type=\"term\">generalized chain rule<\/span><\/strong>\u00a0states.<\/p>\r\n\r\n<\/div>\r\n<div class=\"textbox shaded\">\r\n<h3 style=\"text-align: center;\">Theorem: Generalized Chain Rule<\/h3>\r\n\r\n<hr \/>\r\n<p id=\"fs-id1167793956651\">Let\u00a0[latex]w=f(x_1,x_2,\\ldots,x_m)[\/latex] be a differentiable function of\u00a0[latex]m[\/latex] independent variables, and for each\u00a0[latex]i\\in\\{1,\\ldots,m\\}[\/latex], let\u00a0[latex]x_i=x_i(t_1,t_2,\\ldots,t_n)[\/latex] be a differentiable function of\u00a0[latex]n[\/latex] independent variables. Then<\/p>\r\n<p style=\"text-align: center;\">[latex]\\large{\\frac{\\partial w}{\\partial t_j}=\\frac{\\partial w}{\\partial x_1}\\frac{\\partial x_1}{\\partial t_j}+\\frac{\\partial w}{\\partial x_2}\\frac{\\partial x_2}{\\partial t_j}+\\cdots+\\frac{\\partial w}{\\partial x_m}\\frac{\\partial x_m}{\\partial t_j}}[\/latex]<\/p>\r\nfor any\u00a0[latex]j\\in\\{1,2,\\ldots,n\\}[\/latex].\r\n\r\n<\/div>\r\nIn the next example we calculate the derivative of a function of three independent variables in which each of the three variables is dependent on two other variables.\r\n<div id=\"fs-id1167794044156\" class=\"theorem ui-has-child-title\" data-type=\"note\">\r\n<div class=\"textbox exercises\">\r\n<h3>Example: using the generalized Chain Rule<\/h3>\r\nCalculate\u00a0[latex]\\partial w\/\\partial u[\/latex] and\u00a0[latex]\\partial w\/\\partial v[\/latex] using the following functions:\r\n\r\n[latex]\\hspace{9cm}\\begin{align}\r\n\r\nw&amp;=f(x,y,z)=3x^2-2xy+4z^2 \\\\\r\n\r\nx&amp;=x(u,v)=e^u\\sin v \\\\\r\n\r\ny&amp;=y(u,v)=e^y\\cos v \\\\\r\n\r\nz&amp;=z(u,v)=e^u.\r\n\r\n\\end{align}[\/latex]\r\n\r\n[reveal-answer q=\"667124093\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"667124093\"]\r\n\r\nThe formulas for\u00a0[latex]\\partial w\/\\partial u[\/latex] and\u00a0[latex]\\partial w\/\\partial v[\/latex] are\r\n<p style=\"text-align: center;\">[latex]\\frac{\\partial w}{\\partial u}=\\frac{\\partial w}{\\partial x}\\cdot \\frac{\\partial x}{\\partial u}+\\frac{\\partial w}{\\partial y}\\cdot \\frac{\\partial y}{\\partial u}+\\frac{\\partial w}{\\partial z}\\cdot \\frac{\\partial z}{\\partial u}[\/latex]<\/p>\r\n<p style=\"text-align: center;\">[latex]\\frac{\\partial w}{\\partial v}=\\frac{\\partial w}{\\partial x}\\cdot \\frac{\\partial x}{\\partial v}+\\frac{\\partial w}{\\partial y}\\cdot \\frac{\\partial y}{\\partial v}+\\frac{\\partial w}{\\partial z}\\cdot \\frac{\\partial z}{\\partial v}.[\/latex]<\/p>\r\nTherefore, there are nine different partial derivatives that need to be calculated and substituted. We need to calculate each of them:\r\n\r\n[latex]\\hspace{6cm}\\begin{alignat}{2}\r\n\r\n\\frac{\\partial w}{\\partial x} &amp;= 6x -2y &amp;\\quad &amp;\\quad \\frac{\\partial w}{\\partial y} &amp;=-2x &amp;\\quad &amp;\\quad\\frac{\\partial w}{\\partial z} &amp;= 8z \\\\\r\n\r\n\\frac{\\partial x}{\\partial u} &amp;= e^u\\sin v &amp;\\quad &amp;\\quad \\frac{\\partial y}{\\partial u} &amp;=e^u\\cos v &amp;\\quad &amp;\\quad\\frac{\\partial z}{\\partial u} &amp;= e^u \\\\\r\n\r\n\\frac{\\partial x}{\\partial v} &amp;= e^u\\cos v &amp;\\quad &amp;\\quad\\frac{\\partial y}{\\partial v} &amp;=-e^u\\sin v &amp;\\quad &amp;\\quad \\frac{\\partial z}{\\partial v} &amp;= 0.\r\n\r\n\\end{alignat}[\/latex]\r\n\r\nNow, we substitute each of them into the first formula to calculate\u00a0[latex]\\partial w\/\\partial u[\/latex]:\r\n\r\n[latex]\\hspace{5cm} \\begin{align}\r\n\r\n\\frac{\\partial w}{\\partial u}&amp;=\\frac{\\partial w}{\\partial x}\\cdot \\frac{\\partial x}{\\partial u}+\\frac{\\partial w}{\\partial y}\\cdot \\frac{\\partial y}{\\partial u}+\\frac{\\partial w}{\\partial z}\\cdot \\frac{\\partial z}{\\partial u} \\\\\r\n\r\n&amp;=(6x-2y)e^u\\sin v-2xe^u\\cos v+8ze^u,\r\n\r\n\\end{align}[\/latex]\r\n\r\nthen substitute [latex]x(u,v)=e^u\\sin v,y(u,v)=e^u\\cos v[\/latex], and [latex]z(u,v)=e^u[\/latex], into this equation:\r\n\r\n[latex]\\hspace{5cm}\\begin{align}\r\n\r\n\\frac{\\partial w}{\\partial u}&amp;=(6x-2y)e^u\\sin v-2xe^u\\cos v+8ze^u \\\\\r\n\r\n&amp;=(6e^u\\sin v-2e^u\\cos v)e^u\\sin v-2(e^u\\sin v)e^u\\cos v+8e^{2u} \\\\\r\n\r\n&amp;=6e^{2u}\\sin^2{v}-4e^{2u}\\sin v\\cos v+8e^{2u} \\\\\r\n\r\n&amp;=2e^{2u}(3\\sin^2{v}-2\\sin v\\cos v+4).\r\n\r\n\\end{align}[\/latex]\r\n\r\nNext, we calculate\u00a0[latex]\\partial w\/\\partial v[\/latex]:\r\n\r\n[latex]\\hspace{5cm} \\begin{align}\r\n\r\n\\frac{\\partial w}{\\partial v}&amp;=\\frac{\\partial w}{\\partial x}\\cdot \\frac{\\partial x}{\\partial v}+\\frac{\\partial w}{\\partial y}\\cdot \\frac{\\partial y}{\\partial v}+\\frac{\\partial w}{\\partial z}\\cdot \\frac{\\partial z}{\\partial v} \\\\\r\n\r\n&amp;=(6x-2y)e^u\\cos v-2x(-e^u\\sin v)+8z(0),\r\n\r\n\\end{align}[\/latex]\r\n\r\nthen we substitute [latex]x(u,v)=e^u\\sin v,y(u,v)=e^u\\cos v,[\/latex] and\u00a0[latex]z(u,v)=e^u[\/latex] into this equation:\r\n\r\n[latex]\r\n\r\n\\hspace{5cm}\\begin{align}\r\n\r\n\\frac{\\partial w}{\\partial v}&amp;=(6x-2y)e^u\\cos v-2x(-e^u\\sin v) \\\\\r\n\r\n&amp;=(6e^u\\sin v-2e^u\\cos v)e^u\\cos v+2(e^u\\sin v)(e^u\\sin) \\\\\r\n\r\n&amp;=2e^{2u}\\sin^2{v}+6e^{2u}\\sin v\\cos v-2e^{2u}\\cos^2{v} \\\\\r\n\r\n&amp;=2e^{2u}(\\sin^2{v}+\\sin v\\cos v-\\cos^2{v}).\r\n\r\n\\end{align}\r\n\r\n[\/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]\\partial w\/\\partial u[\/latex] and\u00a0[latex]\\partial w\/\\partial v[\/latex] given the following functions:\r\n\r\n[latex]\\hspace{8cm} \\begin{align}\r\n\r\nw&amp;=f(x,y,z)=\\frac{x+2y-4z}{2x-y+3z} \\\\\r\n\r\nx&amp;=x(u,v) = e^{2u}\\cos 3v \\\\\r\n\r\ny&amp;=y(u,v) = e^{2u}\\sin 3v \\\\\r\n\r\nz&amp;=z(u,v) = e^{2u}.\r\n\r\n\\end{align}[\/latex]\r\n\r\n[reveal-answer q=\"135764289\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"135764289\"]\r\n\r\n[latex]\\hspace{8cm} \\begin{align}\r\n\r\n\\frac{\\partial w}{\\partial u}&amp;=0 \\\\\r\n\r\n\\frac{\\partial w}{\\partial v}&amp;=\\frac{15-33\\sin 3v+6\\cos 3v}{(3+2 \\cos 3v-\\sin 3v)^2}\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=8186161&amp;p3sdk_version=1.10.1&amp;p=20361&amp;pt=375&amp;video_id=roL0IpV1FBU&amp;video_target=tpm-plugin-d4ysvvp8-roL0IpV1FBU\" 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.25_transcript.html\">transcript for \"CP 4.25\u201d here (opens in new window).<\/a><\/center>\r\n<div class=\"textbox exercises\">\r\n<h3>Example: drawing a tree diagram<\/h3>\r\nCreate a tree diagram for the case when\r\n<p style=\"text-align: center;\">[latex]\\large{w=f(x,y,z),x=x(t,u,v),y=y(t,u,v),z=z(t,u,v)}[\/latex]<\/p>\r\nand write out the formulas for the three partial derivatives of\u00a0[latex]w[\/latex].\r\n\r\n[reveal-answer q=\"348851212\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"348851212\"]\r\n\r\nStarting from the left, the function [latex]f[\/latex]\u00a0has three independent variables: [latex]x[\/latex], [latex]y[\/latex], and [latex]z[\/latex]. Therefore, three branches must be emanating from the first node. Each of these three branches also has three branches, for each of the variables\u00a0[latex]t[\/latex], [latex]u[\/latex], and [latex]v[\/latex].\r\n\r\n[caption id=\"attachment_1248\" align=\"aligncenter\" width=\"587\"]<img class=\"size-full wp-image-1248\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/5667\/2021\/09\/22221925\/4-5-3.jpeg\" alt=\"A diagram that starts with w = f(x, y, z). Along the first branch, it is written \u2202w\/\u2202x, then x = x(t, u, v), at which point it breaks into another three subbranches: the first subbranch says t and then \u2202w\/\u2202x \u2202x\/\u2202t; the second subbranch says u and then \u2202w\/\u2202x \u2202x\/\u2202u; and the third subbranch says v and then \u2202w\/\u2202x \u2202x\/\u2202v. Along the second branch, it is written \u2202w\/\u2202y, then y = y(t, u, v), at which point it breaks into another three subbranches: the first subbranch says t and then \u2202w\/\u2202y \u2202y\/\u2202t; the second subbranch says u and then \u2202w\/\u2202y \u2202y\/\u2202u; and the third subbranch says v and then \u2202w\/\u2202y \u2202y\/\u2202v. Along the third branch, it is written \u2202w\/\u2202z, then z = z(t, u, v), at which point it breaks into another three subbranches: the first subbranch says t and then \u2202w\/\u2202z \u2202z\/\u2202t; the second subbranch says u and then \u2202w\/\u2202z \u2202z\/\u2202u; and the third subbranch says v and then \u2202w\/\u2202z \u2202z\/\u2202v.\" width=\"587\" height=\"551\" \/> Figure 3. Tree diagram for a function of three variables, each of which is a function of three independent variables.[\/caption]\r\n\r\nThe three formulas are\r\n<p style=\"text-align: center;\">[latex]\\large{\\frac{\\partial w}{\\partial t}=\\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial t}+\\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial t}+\\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial t}}[\/latex]<\/p>\r\n<p style=\"text-align: center;\">[latex]\\large{\\frac{\\partial w}{\\partial u}=\\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial u}+\\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial u}+\\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial u}}[\/latex]<\/p>\r\n<p style=\"text-align: center;\">[latex]\\large{\\frac{\\partial w}{\\partial v}=\\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial v}+\\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial v}+\\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial v}}.[\/latex]<\/p>\r\n[\/hidden-answer]\r\n\r\n<\/div>\r\n<div class=\"textbox key-takeaways\">\r\n<h3>Try it<\/h3>\r\nCreate a tree diagram for the case when\r\n<p style=\"text-align: center;\">[latex]\\large{w=f(x,y),x=x(t,u,v),y=y(t,u,v)}[\/latex]<\/p>\r\nand write out the formulas for the three partial derivatives of\u00a0[latex]w[\/latex].\r\n\r\n[reveal-answer q=\"567910368\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"567910368\"]\r\n<p style=\"text-align: center;\">[latex]\\large{\\frac{\\partial w}{\\partial t}=\\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial t}+\\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial t}}[\/latex]<\/p>\r\n<p style=\"text-align: center;\">[latex]\\large{\\frac{\\partial w}{\\partial u}=\\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial u}+\\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial u}}[\/latex]<\/p>\r\n<p style=\"text-align: center;\">[latex]\\large{\\frac{\\partial w}{\\partial v}=\\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial v}+\\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial v}}.[\/latex]<\/p>\r\n\r\n\r\n[caption id=\"attachment_1253\" align=\"aligncenter\" width=\"437\"]<img class=\"size-full wp-image-1253\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/5667\/2021\/09\/22222504\/4-5-tryitans1.jpeg\" alt=\"A diagram that starts with w = f(x, y). Along the first branch, it is written \u2202w\/\u2202x, then x = x(t, u, v), at which point it breaks into another three subbranches: the first subbranch says t and then \u2202w\/\u2202x \u2202x\/\u2202t; the second subbranch says u and then \u2202w\/\u2202x \u2202x\/\u2202u; and the third subbranch says v and then \u2202w\/\u2202x \u2202x\/\u2202v. Along the second branch, it is written \u2202w\/\u2202y, then y = y(t, u, v), at which point it breaks into another three subbranches: the first subbranch says t and then \u2202w\/\u2202y \u2202y\/\u2202t; the second subbranch says u and then \u2202w\/\u2202y \u2202y\/\u2202u; and the third subbranch says v and then \u2202w\/\u2202y \u2202y\/\u2202v.\" width=\"437\" height=\"328\" \/> Figure 4.[\/caption]\r\n\r\n[\/hidden-answer]\r\n\r\n<\/div>\r\n<\/div>","rendered":"<div class=\"textbox learning-objectives\">\n<h3>Learning Objectives<\/h3>\n<ul>\n<li><span class=\"os-abstract-content\">State the chain rules for one or two independent variables.<\/span><\/li>\n<li><span class=\"os-abstract-content\">Use tree diagrams as an aid to understanding the chain rule for several independent and intermediate variables.<\/span><\/li>\n<\/ul>\n<\/div>\n<h2 data-type=\"title\">Chain Rules for One or Two Independent Variables<\/h2>\n<p id=\"fs-id1167793879032\">Recall that the chain rule for the derivative of a composite of two functions can be written in the form<\/p>\n<p style=\"text-align: center;\">[latex]\\large{\\frac{d}{dx}(f(g(x)))=f'(g(x))g'(x)}.[\/latex]<\/p>\n<p>In this equation, both [latex]f(x)[\/latex] and [latex]g(x)[\/latex] are functions of one variable. Now suppose that [latex]f[\/latex] is a function of two variables and [latex]g[\/latex] is a function of one variable. Or perhaps they are both functions of two variables, or even more. How would we calculate the derivative in these cases? The following theorem gives us the answer for the case of one independent variable.<\/p>\n<div class=\"textbox shaded\">\n<h3 style=\"text-align: center;\">theorem: Chain rule for one independent variable<\/h3>\n<hr \/>\n<p id=\"fs-id1167794143923\">Suppose that <span style=\"white-space: nowrap;\">[latex]x=g(t)[\/latex]\u00a0<\/span>and [latex]y=h(t)[\/latex] are differentiable functions of [latex]t[\/latex] and [latex]z=f(x, y)[\/latex] is a differentiable function of [latex]x[\/latex] and [latex]y[\/latex]. Then [latex]z=f(x(t), y(t))[\/latex] is a differentiable function of [latex]t[\/latex] and<\/p>\n<p style=\"text-align: center;\">[latex]\\LARGE{\\frac{dz}{dt}=\\frac{\\partial{z}}{\\partial{x}}\\cdot\\frac{dx}{dt}+\\frac{\\partial{z}}{\\partial{y}}\\cdot\\frac{dy}{dt}},[\/latex]<\/p>\n<p>where the ordinary derivatives are evaluated at [latex]t[\/latex] and the partial derivatives are evaluated at [latex](x, y)[\/latex].<\/p>\n<\/div>\n<h2 data-type=\"title\">Proof<\/h2>\n<p id=\"fs-id1167793901389\">The proof of this theorem uses the definition of differentiability of a function of two variables. Suppose that [latex]f[\/latex] is differentiable at the point\u00a0[latex]P(x_0, y_0)[\/latex], where [latex]x_0=g(t_0)[\/latex] and [latex]y_0=h(t_0)[\/latex] for a fixed value of [latex]t_0[\/latex]. We wish to prove that [latex]z=f(x(t), y(t))[\/latex] is differentiable at [latex]t=t_0[\/latex] and that\u00a0the Chain Rule for One Independent Variable\u00a0holds at that point as well.<\/p>\n<p id=\"fs-id1167793264165\">Since [latex]f[\/latex] is differentiable at [latex]P[\/latex], we know that<\/p>\n<p style=\"text-align: center;\">[latex]\\large{z(t)=f(x,y)=f(x_0,y_0)+f_x(x_0,y_0)(x-x_0)+f_y(x_0,y_0)(y-y_0)+E(x,y)},[\/latex]<\/p>\n<p>where [latex]\\displaystyle{\\lim_{(x,y)\\to(x_0,y_0)}}\\frac{E(x,y)}{\\sqrt{(x-x_0)^2+(y-y_0)^2}}=0[\/latex]. We then subtract\u00a0[latex]z_0=f(x_0,y_0)[\/latex] from both sides of this equation:<\/p>\n<p>[latex]\\hspace{3cm}\\large{\\begin{alignat}{2}    z(t)-z(t_0) &= f(x(t),y(t))-f(x(t_0),y(t_0)) \\\\    &= f_x(x_0,y_0)(x(t)-x(t_0))+f_y(x_0,y_0)(y(t)-y(t_0))+E(x(t),y(t)). \\\\    \\end{alignat}}[\/latex]<\/p>\n<p>Next, we divide both sides by\u00a0[latex]t-t_0[\/latex]:<\/p>\n<p style=\"text-align: center;\">[latex]\\large{\\frac{z(t)-z(t_0)}{t-t_0}=f_x(x_0,y_0)\\left(\\frac{x(t)-x(t_0)}{t-t_0}\\right)+f_y(x_0,y_0)\\left(\\frac{y(t)-y(t_0)}{t-t_0}\\right)+\\frac{E(x(t),y(t))}{t-t_0}}.[\/latex]<\/p>\n<p>Then we take the limit as\u00a0[latex]t[\/latex] approaches\u00a0[latex]t_0[\/latex]:<\/p>\n<p style=\"text-align: center;\">[latex]\\large{\\displaystyle\\lim_{t\\to t_0}\\frac{z(t)-z(t_0)}{t-t_0} = f_x(x_0,y_0)\\displaystyle\\lim_{t\\to t_0}\\left(\\frac{x(t)-x(t_)}{t-t_0}\\right)+f_y(x_0,y_0)\\displaystyle\\lim_{t\\to t_0}\\left(\\frac{y(t)-y(t_0)}{t-t_0}\\right)+ \\displaystyle\\lim_{t\\to t_0}\\frac{E(x(t),y(t))}{t-t_0}}.[\/latex]<\/p>\n<p>The left-hand side of this equation is equal to\u00a0[latex]dz\/dt[\/latex], which leads to<\/p>\n<p style=\"text-align: center;\">[latex]\\large{\\frac{dz}{dt}=f_x(x_0,y_0)\\frac{dx}{dt}+f_y(x_0,y_0)\\frac{dy}{dt}+\\displaystyle\\lim_{t\\to t_0}\\frac{E(x(t),y(t))}{t-t_0}}.[\/latex]<\/p>\n<p>The last term can be rewritten as<\/p>\n<p>[latex]\\hspace{3cm}\\large{\\begin{alignat}{2}    \\displaystyle\\lim_{t\\to t_0}\\frac{E(x(t),y(t))}{t-t_0} &= \\displaystyle\\lim_{t\\to t_0}\\left(\\frac{E(x,y)}{\\sqrt{(x-x_0)^2+(y-y_0)^2}}\\frac{\\sqrt{(x-x_0)^2+(y-y_0)^2}}{t-t_0}\\right) \\\\    &= \\displaystyle\\lim_{t\\to t_0}\\left(\\frac{E(x,y)}{\\sqrt{(x-x_0)^2+(y-y_0)^2}}\\right)\\displaystyle\\lim_{t\\to t_0}\\left(\\frac{\\sqrt{(x-x_0)^2+(y-y_0)^2}}{t-t_0}\\right). \\\\    \\end{alignat}}[\/latex]<\/p>\n<p>As [latex]t[\/latex] approaches [latex]t_0, (x(t), y(t))[\/latex] approaches [latex](x(t_0), y(t_0))[\/latex], so we can rewrite the last product as<\/p>\n<p style=\"text-align: center;\">[latex]\\displaystyle\\lim_{(x,y)\\to (x_0,y_0)}\\left(\\frac{E(x,y)}{\\sqrt{(x-x_0)^2+(y-y_0)^2}}\\right)\\displaystyle\\lim_{(x,y)\\to (x_0,y_0)}\\left(\\frac{\\sqrt{(x-x_0)^2+(y-y_0)^2}}{t-t_0}\\right)[\/latex]<\/p>\n<p>Since the first limit is equal to zero, we need only show that the second limit is finite:<\/p>\n<p>[latex]\\hspace{3cm}\\begin{alignat}{2}    \\displaystyle\\lim_{(x,y)\\to (x_0,y_0)}\\left(\\frac{\\sqrt{(x-x_0)^2+(y-y_0)^2}}{t-t_0}\\right) &= \\displaystyle\\lim_{(x,y)\\to (x_0,y_0)}\\left(\\sqrt{\\frac{(x-x_0)^2+(y-y_0)^2}{(t-t_0)^2}}\\right) \\\\    &= \\displaystyle\\lim_{(x,y)\\to (x_0,y_0)}\\left(\\sqrt{\\left(\\frac{x-x_0}{t-t_0}\\right)^2+\\left(\\frac{y-y_0}{t-t_0}\\right)^2}\\right) \\\\    &= \\sqrt{\\left(\\displaystyle\\lim_{(x,y)\\to (x_0,y_0)}\\left(\\frac{x-x_0}{t-t_0}\\right)\\right)^2+\\left( \\displaystyle\\lim_{(x,y)\\to (x_0,y_0)}\\left(\\frac{y-y_0}{t-t_0}\\right)\\right)^2}.    \\end{alignat}[\/latex]<\/p>\n<p>Since [latex]x(t)[\/latex] and [latex]y(t)[\/latex] are both differentiable functions of [latex]t[\/latex], both limits inside the last radical exist. Therefore, this value is finite. This proves the chain rule at [latex]t=t_0[\/latex]; the rest of the theorem follows from the assumption that all functions are differentiable over their entire domains.<\/p>\n<p>[latex]_\\blacksquare[\/latex]<\/p>\n<p>Closer examination of\u00a0the Chain Rule for One Independent Variable\u00a0reveals an interesting pattern. The first term in the equation is [latex]\\frac{\\partial f}{\\partial x}\\cdot\\frac{dx}{dt}[\/latex] and the second term is [latex]\\frac{\\partial f}{\\partial y}\\cdot\\frac{dy}{dt}[\/latex]. Recall that when multiplying fractions, cancelation can be used. If we treat these derivatives as fractions, then each product \u201csimplifies\u201d to something resembling [latex]\\partial f\/dt[\/latex]. The variables [latex]x[\/latex] and [latex]y[\/latex] that disappear in this simplification are often called\u00a0<strong><span id=\"f10a2a32-9eca-48cf-9e84-10c18a890484_term185\" data-type=\"term\">intermediate variables<\/span><\/strong>: they are independent variables for the function [latex]f[\/latex], but are dependent variables for the variable [latex]t[\/latex]. Two terms appear on the right-hand side of the formula, and [latex]f[\/latex] is a function of two variables. This pattern works with functions of more than two variables as well, as we see later in this section.<\/p>\n<div class=\"textbox exercises\">\n<h3>Example: Using the chain rule<\/h3>\n<p>Calculate [latex]dz\/dt[\/latex] for each of the following functions:<\/p>\n<p style=\"padding-left: 30px;\">a. [latex]z=f(x,y)=4x^2+3y^2, x=x(t)=\\sin{t},y=y(t)=\\cos{t}[\/latex]<\/p>\n<p style=\"padding-left: 30px;\">b.\u00a0[latex]z=f(x,y)=\\sqrt{x^2-y^2},x=x(t)=e^{2t},y=y(t)=e^{-t}[\/latex]<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q761249035\">Show Solution<\/span><\/p>\n<div id=\"q761249035\" class=\"hidden-answer\" style=\"display: none\">\n<p>a. To use the chain rule, we need four quantities\u2014[latex]\\partial z\/\\partial x, \\partial z\/\\partial y, dx\/dt,[\/latex] and [latex]dy\/dt[\/latex]:<\/p>\n<p>[latex]\\hspace{8cm}\\begin{alignat}{2}    \\frac{\\partial z}{\\partial x} &= 8x &\\quad &\\quad \\frac{\\partial z}{\\partial y} &= 6y \\\\    \\frac{dx}{dt}&=\\cos{t} &\\quad &\\quad \\frac{dy}{dt}&=-\\sin{t}.    \\end{alignat}[\/latex]<\/p>\n<p>Now, we substitute each of these into\u00a0the Chain Rule for One Independent Variable:<\/p>\n<p>[latex]\\hspace{8cm}\\begin{alignat}{2}    \\frac{dz}{dt} &=\\frac{\\partial z}{\\partial x}\\cdot\\frac{dx}{dt}+\\frac{\\partial z}{\\partial y}\\cdot\\frac{dy}{dt} \\\\    &=(8x)(\\cos{t})+(6y)(-\\sin{t}) \\\\    &= 8x\\cos{t}-6y\\sin{t}.    \\end{alignat}[\/latex]<\/p>\n<p>This answer has three variables in it. To reduce it to one variable, use the fact that [latex]x(t)=\\sin t[\/latex] and [latex]y(t)=\\cos t[\/latex]. We obtain<\/p>\n<p>[latex]\\hspace{8cm}\\begin{alignat}{2}    \\frac{dz}{dt} &=8x\\cos{t}-6y\\sin{t} \\\\    &=8(\\sin t)\\cos t - 6(\\cos t)\\sin t \\\\    &= 2\\sin t\\cos t.    \\end{alignat}[\/latex]<\/p>\n<p>This derivative can also be calculated by first substituting [latex]x(t)[\/latex] and [latex]y(t)[\/latex] into [latex]f(x, y)[\/latex], then differentiating with respect to [latex]t[\/latex]:<\/p>\n<p>[latex]\\hspace{8cm}\\begin{alignat}{2}    z &=f(x,y) \\\\    &=f(x(t),y(t)) \\\\    &= 4(x(t))^2+3(y(t))^2 \\\\    &=4\\sin^2t+3\\cos^2t.    \\end{alignat}[\/latex]<\/p>\n<p>Then<\/p>\n<p>[latex]\\hspace{8cm}\\begin{alignat}{2}    \\frac{dz}{dt} &=2(4\\sin t)(\\cos t)+2(3\\cos t)(-\\sin t) \\\\    &=8\\sin t\\cos t-6\\sin t\\cos t \\\\    &=2\\sin t\\cos t,    \\end{alignat}[\/latex]<\/p>\n<p>which\u00a0is the same solution. However, it may not always be this easy to differentiate in this form.<\/p>\n<p>b.\u00a0To use the chain rule, we again need four quantities\u2014[latex]\\partial z\/\\partial x, \\partial z\/\\partial y, dx\/dt,[\/latex], and [latex]dy\/dt[\/latex]:<\/p>\n<p>[latex]\\hspace{8cm}\\begin{alignat}{2}    \\frac{\\partial z}{\\partial x} &= \\frac{x}{\\sqrt{x^2-y^2}} &\\quad &\\quad \\frac{\\partial z}{\\partial y} &= \\frac{-y}{\\sqrt{x^2-y^2}} \\\\    \\frac{dx}{dt}&=2e^{2t} &\\quad &\\quad \\frac{dy}{dt}&=-e^{-t}{t}.    \\end{alignat}[\/latex]<\/p>\n<p>We substitute each of these into\u00a0the Chain Rule for One Independent Variable:<\/p>\n<p>[latex]\\hspace{8cm}\\begin{alignat}{2}    \\frac{dz}{dt} &=\\frac{\\partial z}{\\partial x}\\cdot\\frac{dx}{dt}+\\frac{\\partial z}{\\partial y}\\cdot\\frac{dy}{dt} \\\\    &=\\left(\\frac{x}{\\sqrt{x^2-y^2}}\\right)(2e^{2t})+\\left(\\frac{-y}{\\sqrt{x^2-y^2}}\\right)(-e^{-t}) \\\\    &= \\frac{2xe^{2t}-ye^{-t}}{\\sqrt{x^2-y^2}}.    \\end{alignat}[\/latex]<\/p>\n<p>To reduce this to one variable, we use the fact that [latex]x(t)=e^{2t}[\/latex] and [latex]y(t)=e^{-1}[\/latex]. Therefore,<\/p>\n<p>[latex]\\hspace{8cm}\\begin{alignat}{2}    \\frac{dz}{dt} &=\\frac{2xe^{2t}-ye^{-t}}{\\sqrt{x^2-y^2}} \\\\    &=\\frac{2(e^{2t})e^{2t}+(e^{-t})e^{-t}}{\\sqrt{e^{4t}-e^{-2t}}} \\\\    &=\\frac{2e^{4t}+e^{-2t}}{\\sqrt{e^{4t}-e^{-2t}}}.    \\end{alignat}[\/latex]<\/p>\n<p>To eliminate negative exponents, we multiply the top by [latex]e^{2t}[\/latex] and the bottom by [latex]\\sqrt{e^{4t}}[\/latex]:<\/p>\n<p>[latex]\\hspace{8cm}\\begin{alignat}{2}    \\frac{dz}{dt} &=\\frac{2e^{4t}+e^{-2t}}{\\sqrt{e^{4t}-e^{-2t}}}\\cdot\\frac{e^{2t}}{\\sqrt{e^{4t}}} \\\\    &=\\frac{2e^{6t}+1}{\\sqrt{e^{8t}-e^{2t}}} \\\\    &=\\frac{2e^{6t}+1}{\\sqrt{e^{2t}(e^{6t}-1)}} \\\\    &=\\frac{2e^{6t}+1}{e^t\\sqrt{e^{6t}-1}}.    \\end{alignat}[\/latex]<\/p>\n<p>Again, this derivative can also be calculated by first substituting [latex]x(t)[\/latex] and [latex]y(t)[\/latex] into [latex]f(x, y)[\/latex], then differentiating with respect to [latex]t[\/latex]:<\/p>\n<p>[latex]\\hspace{8cm}\\begin{alignat}{2}    z &=f(x,y) \\\\    &=f(x(t),y(t))\\\\    &=\\sqrt{(x(t))^2-(y(t))^2} \\\\    &=\\sqrt{e^{4t}-e^{-2t}} \\\\    &=(e^{4t}-e^{-2t})^{1\/2}.    \\end{alignat}[\/latex]<\/p>\n<p>Then<\/p>\n<p>[latex]\\hspace{8cm}\\begin{alignat}{2}    \\frac{dz}{dt} &=\\frac12(e^{4t}-e^{-2t})^{-1\/2}(4e^{4t}+2e^{-2t}) \\\\    &=\\frac{2e^{4t}+e^{-2t}}{\\sqrt{e^{4t}-e^{-2t}}}.    \\end{alignat}[\/latex]<\/p>\n<p>This is the same solution.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"textbox key-takeaways\">\n<h3>Try it<\/h3>\n<p>Calculate [latex]dz\/dt[\/latex] given the following functions. Express the final answer in terms of [latex]t[\/latex].<\/p>\n<p style=\"text-align: center;\">[latex]z=f(x, y)=x^{2}-3xy+2y^{2}, x=x(t)=3\\sin 2t, y=y(t)=4\\cos 2t[\/latex]<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q142579180\">Show Solution<\/span><\/p>\n<div id=\"q142579180\" class=\"hidden-answer\" style=\"display: none\">\n<p>[latex]\\hspace{5cm} \\begin{align}    &=(2x-3y)(6\\cos 2t)+(-3x+y4)(-8\\sin 2t) \\\\    &=-92\\sin 2t\\cos 2t - 72(\\cos^2{2t}-\\sin^2{2t} \\\\    &=-46\\sin 4t - 72\\cos 4t.    \\end{align}[\/latex]<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p>It is often useful to create a visual representation of\u00a0the Chain Rule for One Independent Variable\u00a0for the chain rule. This is called a\u00a0<strong><span id=\"f10a2a32-9eca-48cf-9e84-10c18a890484_term186\" data-type=\"term\">tree diagram<\/span><\/strong>\u00a0for the chain rule for functions of one variable and it provides a way to remember the formula (Figure 1). This diagram can be expanded for functions of more than one variable, as we shall see very shortly.<\/p>\n<div id=\"attachment_1244\" style=\"width: 465px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1244\" class=\"size-full wp-image-1244\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/5667\/2021\/09\/22221516\/4-5-1.jpeg\" alt=\"A diagram that starts with z = f(x, y). Along the first branch, it is written \u2202z\/\u2202x, then x = x(t), then dx\/dt, then t, and finally it says \u2202z\/\u2202x dx\/dt. Along the other branch, it is written \u2202z\/\u2202y, then y = y(t), then dy\/dt, then t, and finally it says \u2202z\/\u2202y dy\/dt.\" width=\"455\" height=\"291\" \/><\/p>\n<p id=\"caption-attachment-1244\" class=\"wp-caption-text\">Figure 1. Tree diagram for the case\u00a0[latex]\\small{\\dfrac{dz}{dt}=\\dfrac{\\partial z}{\\partial x}\\cdot\\dfrac{dx}{dt}+\\dfrac{\\partial z}{\\partial y}\\cdot\\dfrac{dy}{dt}}[\/latex].<\/p>\n<\/div>\n<p id=\"fs-id1167793900591\">In this diagram, the leftmost corner corresponds to [latex]z=f(x, y)[\/latex]. Since [latex]f[\/latex] has two\u00a0<span id=\"f10a2a32-9eca-48cf-9e84-10c18a890484_term187\" class=\"no-emphasis\" data-type=\"term\">independent variables<\/span>, there are two lines coming from this corner. The upper branch corresponds to the variable [latex]x[\/latex] and the lower branch corresponds to the variable [latex]y[\/latex]. Since each of these variables is then dependent on one variable [latex]t[\/latex], one branch then comes from [latex]x[\/latex] and one branch comes from [latex]y[\/latex]. Last, each of the branches on the far right has a label that represents the path traveled to reach that branch. The top branch is reached by following the [latex]x[\/latex] branch, then the [latex]t[\/latex] branch; therefore, it is labeled\u00a0[latex](\\partial z\/\\partial x)\\times(dx\/dt)[\/latex]. The bottom branch is similar: first the [latex]y[\/latex] branch, then the [latex]t[\/latex] branch. This branch is labeled [latex](\\partial z\/\\partial x)\\times(dy\/dt)[\/latex]. To get the formula for [latex]dz\/dt[\/latex], add all the terms that appear on the rightmost side of the diagram. This gives us\u00a0the Chain Rule for One Independent Variable.<\/p>\n<p id=\"fs-id1167793949238\">In\u00a0the Chain Rule for Two Independent Variables, [latex]z=f(x, y)[\/latex] is a function of\u00a0[latex]x[\/latex] and [latex]y[\/latex], and both [latex]x=g(u, v)[\/latex] and [latex]y=h(u, v)[\/latex] are functions of the independent variables\u00a0[latex]u[\/latex] and\u00a0[latex]v[\/latex].<\/p>\n<div class=\"textbox shaded\">\n<h3 style=\"text-align: center;\">Theorem: Chain Rule for two independent variables<\/h3>\n<hr \/>\n<p id=\"fs-id1167793956651\">Suppose [latex]x=g(u, v)[\/latex] and [latex]y=h(u, v)[\/latex] are differentiable functions of [latex]u[\/latex] and [latex]v[\/latex], and [latex]z=f(x, y)[\/latex] is a differentiable function of\u00a0[latex]x[\/latex] and [latex]y[\/latex]. Then, [latex]z=f(g(u, v), h(u, v))[\/latex] is a differentiable function of\u00a0[latex]u[\/latex] and\u00a0[latex]v[\/latex], and<\/p>\n<p style=\"text-align: center;\">[latex]\\large{\\frac{\\partial z}{\\partial u}=\\frac{\\partial z}{\\partial x}\\frac{\\partial x}{\\partial u}+\\frac{\\partial z}{\\partial y}\\frac{\\partial y}{\\partial u}}[\/latex]<\/p>\n<p>and<\/p>\n<p style=\"text-align: center;\">[latex]\\large{\\frac{\\partial x}{\\partial v}=\\frac{\\partial z}{\\partial x}\\frac{\\partial x}{\\partial v}+\\frac{\\partial z}{\\partial y}\\frac{\\partial y}{\\partial v}}[\/latex]<\/p>\n<\/div>\n<div>We can draw a tree diagram for each of these formulas as well as follows.<\/div>\n<div><\/div>\n<div>\n<div id=\"attachment_1247\" style=\"width: 438px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1247\" class=\"size-full wp-image-1247\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/5667\/2021\/09\/22221655\/4-5-2.jpeg\" alt=\"A diagram that starts with z = f(x, y). Along the first branch, it is written \u2202z\/\u2202x, then x = g(u, v), at which point it breaks into another two branches: the first subbranch says \u2202x\/\u2202u, then u, and finally it says \u2202z\/\u2202x \u2202x\/\u2202u; the second subbranch says \u2202x\/\u2202v, then v, and finally it says \u2202z\/\u2202x \u2202x\/\u2202v. Along the other branch, it is written \u2202z\/\u2202y, then y = h(u, v), at which point it breaks into another two branches: the first subbranch says \u2202y\/\u2202u, then u, and finally it says \u2202z\/\u2202y \u2202y\/\u2202u; the second subbranch says \u2202y\/\u2202v, then v, and finally it says \u2202z\/\u2202y \u2202y\/\u2202v.\" width=\"428\" height=\"336\" \/><\/p>\n<p id=\"caption-attachment-1247\" class=\"wp-caption-text\">Figure 2. Tree diagram for\u00a0[latex]\\small{\\frac{\\partial z}{\\partial u}=\\frac{\\partial z}{\\partial x}\\frac{\\partial x}{\\partial u}+\\frac{\\partial z}{\\partial y}\\frac{\\partial y}{\\partial u}}[\/latex] and\u00a0[latex]\\small{\\frac{\\partial x}{\\partial v}=\\frac{\\partial z}{\\partial x}\\frac{\\partial x}{\\partial v}+\\frac{\\partial z}{\\partial y}\\frac{\\partial y}{\\partial v}}.[\/latex]<\/p>\n<\/div>\n<\/div>\n<div><\/div>\n<div>\n<p id=\"fs-id1167793371102\">To derive the formula for [latex]\\partial z\/\\partial u[\/latex], start from the left side of the diagram, then follow only the branches that end with [latex]u[\/latex] and<span style=\"font-size: 1rem; text-align: initial;\">\u00a0add the terms that appear at the end of those branches. For the formula for [latex]\\partial z\/\\partial v[\/latex], follow only the branches that end with [latex]v[\/latex] and add the terms that appear at the end of those branches.<\/span><\/p>\n<p id=\"fs-id1167793450624\">There is an important difference between these two chain rule theorems. In\u00a0the Chain Rule for One Independent Variable, the left-hand side of the formula for the derivative is not a partial derivative, but in\u00a0the Chain Rule for Two Independent Variables\u00a0it is. The reason is that, in\u00a0The reason is that, in\u00a0the Chain Rule for One Independent Variable, [latex]z[\/latex] is ultimately\u00a0a function of [latex]t[\/latex] alone, whereas in\u00a0Chain Rule for Two Independent Variables, [latex]z[\/latex] is a function of both [latex]u[\/latex] and\u00a0[latex]v[\/latex].<\/p>\n<\/div>\n<div>\n<div class=\"textbox exercises\">\n<h3>Example: using the chain rule for two variables<\/h3>\n<p>Calculate [latex]\\partial z\/\\partial u[\/latex] and [latex]\\partial z\/\\partial v[\/latex] using the following functions:<\/p>\n<p style=\"text-align: center;\">[latex]z=f(x,y)=3x^2-2xy+y^2,x=x(u,v)=3u+2v,y=y(u,v)=4u-v[\/latex]<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q977241165\">Show Solution<\/span><\/p>\n<div id=\"q977241165\" class=\"hidden-answer\" style=\"display: none\">\n<p>To implement the chain rule for two variables, we need six partial derivatives\u2014[latex]\\partial z\/\\partial x, \\partial z\/\\partial y, \\partial x\/\\partial u, \\partial x\/\\partial v, \\partial y\/\\partial u,[\/latex], and\u00a0[latex]\\partial y\/\\partial v[\/latex]:<\/p>\n<p>[latex]\\hspace{8cm}\\begin{alignat}{2}    \\frac{\\partial z}{\\partial x} &= 6x-2y &\\quad &\\quad \\frac{\\partial z}{\\partial y} &= -2x+2y \\\\    \\frac{\\partial x}{\\partial u} &= 3 &\\quad &\\quad \\frac{\\partial x}{\\partial v}&=2 \\\\    \\frac{\\partial y}{\\partial u}&= 4 &\\quad &\\quad \\frac{\\partial y}{\\partial v}&=-1.    \\end{alignat}[\/latex]<\/p>\n<p>To find\u00a0[latex]\\partial z\/\\partial u[\/latex],\u00a0we use\u00a0the Chain Rule for Two Independent Variables:<\/p>\n<p>[latex]\\hspace{8cm}\\begin{alignat}{2}    \\frac{\\partial z}{\\partial u} &= \\frac{\\partial z}{\\partial x}\\frac{\\partial x}{\\partial u}+\\frac{\\partial x}{\\partial y}\\frac{\\partial y}{\\partial u} \\\\    &= 3(6x-2y)+4(-2x+2y) \\\\    &= 10x+2y.    \\end{alignat}[\/latex]<\/p>\n<p>Next, we substitute\u00a0[latex]x(u,v)=3u+2v[\/latex] and\u00a0[latex]y(u,v)=4u-v[\/latex]:<\/p>\n<p>[latex]\\hspace{8cm}\\begin{alignat}{2}    \\frac{\\partial z}{\\partial u} &= 10x+2y \\\\    &= 10(3u+2v)+2(4u-v) \\\\    &= 38u+18v.    \\end{alignat}[\/latex]<\/p>\n<p>To find\u00a0[latex]\\partial z\/\\partial v[\/latex], we use\u00a0the Chain Rule for Two Independent Variables:<\/p>\n<p>[latex]\\hspace{8cm}\\begin{alignat}{2}    \\frac{\\partial z}{\\partial v} &= \\frac{\\partial z}{\\partial x}\\frac{\\partial x}{\\partial v}+\\frac{\\partial x}{\\partial y}\\frac{\\partial y}{\\partial v} \\\\    &= 2(6x-2y)+(-1)(-2x+2y) \\\\    &= 14x-6y.    \\end{alignat}[\/latex]<\/p>\n<p>Then we substitute [latex]x(u,v)=3u+2v[\/latex] and\u00a0[latex]y(u,v)=4u-v[\/latex]:<\/p>\n<p>[latex]\\hspace{8cm}\\begin{alignat}{2}    \\frac{\\partial z}{\\partial v} &= 14x-6y \\\\    &= 14(3u+2v)-6(4u-v) \\\\    &= 18u+34v.    \\end{alignat}[\/latex]<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"textbox key-takeaways\">\n<h3>Try it<\/h3>\n<p>Calculate\u00a0[latex]\\partial x\/\\partial u[\/latex] and\u00a0[latex]\\partial z\/\\partial v[\/latex] given the following functions:<\/p>\n<p style=\"text-align: center;\">[latex]z=f(x,y)=\\frac{2x-y}{x+3y},x(u,v)=e^{2u}\\cos 3v, y(u,v)=e^{2u}\\sin 3v[\/latex]<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q825766032\">Show Solution<\/span><\/p>\n<div id=\"q825766032\" class=\"hidden-answer\" style=\"display: none\">\n<p style=\"text-align: center;\">[latex]\\frac{\\partial z}{\\partial u}=0, \\frac{\\partial z}{\\partial v}=\\frac{-21}{(3\\sin 3v + \\cos 3v)^2}[\/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=8186160&amp;p3sdk_version=1.10.1&amp;p=20361&amp;pt=375&amp;video_id=IBYLL6KOi80&amp;video_target=tpm-plugin-po9x6dci-IBYLL6KOi80\" 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.24_transcript.html\">transcript for \u201cCP 4.24\u201d here (opens in new window).<\/a><\/div>\n<h2 data-type=\"title\">The Generalized Chain Rule<\/h2>\n<p id=\"fs-id1167794026716\">Now that we\u2019ve see how to extend the original chain rule to functions of two variables, it is natural to ask: Can we extend the rule to more than two variables? The answer is yes, as the\u00a0<strong><span id=\"f10a2a32-9eca-48cf-9e84-10c18a890484_term188\" data-type=\"term\">generalized chain rule<\/span><\/strong>\u00a0states.<\/p>\n<\/div>\n<div class=\"textbox shaded\">\n<h3 style=\"text-align: center;\">Theorem: Generalized Chain Rule<\/h3>\n<hr \/>\n<p id=\"fs-id1167793956651\">Let\u00a0[latex]w=f(x_1,x_2,\\ldots,x_m)[\/latex] be a differentiable function of\u00a0[latex]m[\/latex] independent variables, and for each\u00a0[latex]i\\in\\{1,\\ldots,m\\}[\/latex], let\u00a0[latex]x_i=x_i(t_1,t_2,\\ldots,t_n)[\/latex] be a differentiable function of\u00a0[latex]n[\/latex] independent variables. Then<\/p>\n<p style=\"text-align: center;\">[latex]\\large{\\frac{\\partial w}{\\partial t_j}=\\frac{\\partial w}{\\partial x_1}\\frac{\\partial x_1}{\\partial t_j}+\\frac{\\partial w}{\\partial x_2}\\frac{\\partial x_2}{\\partial t_j}+\\cdots+\\frac{\\partial w}{\\partial x_m}\\frac{\\partial x_m}{\\partial t_j}}[\/latex]<\/p>\n<p>for any\u00a0[latex]j\\in\\{1,2,\\ldots,n\\}[\/latex].<\/p>\n<\/div>\n<p>In the next example we calculate the derivative of a function of three independent variables in which each of the three variables is dependent on two other variables.<\/p>\n<div id=\"fs-id1167794044156\" class=\"theorem ui-has-child-title\" data-type=\"note\">\n<div class=\"textbox exercises\">\n<h3>Example: using the generalized Chain Rule<\/h3>\n<p>Calculate\u00a0[latex]\\partial w\/\\partial u[\/latex] and\u00a0[latex]\\partial w\/\\partial v[\/latex] using the following functions:<\/p>\n<p>[latex]\\hspace{9cm}\\begin{align}    w&=f(x,y,z)=3x^2-2xy+4z^2 \\\\    x&=x(u,v)=e^u\\sin v \\\\    y&=y(u,v)=e^y\\cos v \\\\    z&=z(u,v)=e^u.    \\end{align}[\/latex]<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q667124093\">Show Solution<\/span><\/p>\n<div id=\"q667124093\" class=\"hidden-answer\" style=\"display: none\">\n<p>The formulas for\u00a0[latex]\\partial w\/\\partial u[\/latex] and\u00a0[latex]\\partial w\/\\partial v[\/latex] are<\/p>\n<p style=\"text-align: center;\">[latex]\\frac{\\partial w}{\\partial u}=\\frac{\\partial w}{\\partial x}\\cdot \\frac{\\partial x}{\\partial u}+\\frac{\\partial w}{\\partial y}\\cdot \\frac{\\partial y}{\\partial u}+\\frac{\\partial w}{\\partial z}\\cdot \\frac{\\partial z}{\\partial u}[\/latex]<\/p>\n<p style=\"text-align: center;\">[latex]\\frac{\\partial w}{\\partial v}=\\frac{\\partial w}{\\partial x}\\cdot \\frac{\\partial x}{\\partial v}+\\frac{\\partial w}{\\partial y}\\cdot \\frac{\\partial y}{\\partial v}+\\frac{\\partial w}{\\partial z}\\cdot \\frac{\\partial z}{\\partial v}.[\/latex]<\/p>\n<p>Therefore, there are nine different partial derivatives that need to be calculated and substituted. We need to calculate each of them:<\/p>\n<p>[latex]\\hspace{6cm}\\begin{alignat}{2}    \\frac{\\partial w}{\\partial x} &= 6x -2y &\\quad &\\quad \\frac{\\partial w}{\\partial y} &=-2x &\\quad &\\quad\\frac{\\partial w}{\\partial z} &= 8z \\\\    \\frac{\\partial x}{\\partial u} &= e^u\\sin v &\\quad &\\quad \\frac{\\partial y}{\\partial u} &=e^u\\cos v &\\quad &\\quad\\frac{\\partial z}{\\partial u} &= e^u \\\\    \\frac{\\partial x}{\\partial v} &= e^u\\cos v &\\quad &\\quad\\frac{\\partial y}{\\partial v} &=-e^u\\sin v &\\quad &\\quad \\frac{\\partial z}{\\partial v} &= 0.    \\end{alignat}[\/latex]<\/p>\n<p>Now, we substitute each of them into the first formula to calculate\u00a0[latex]\\partial w\/\\partial u[\/latex]:<\/p>\n<p>[latex]\\hspace{5cm} \\begin{align}    \\frac{\\partial w}{\\partial u}&=\\frac{\\partial w}{\\partial x}\\cdot \\frac{\\partial x}{\\partial u}+\\frac{\\partial w}{\\partial y}\\cdot \\frac{\\partial y}{\\partial u}+\\frac{\\partial w}{\\partial z}\\cdot \\frac{\\partial z}{\\partial u} \\\\    &=(6x-2y)e^u\\sin v-2xe^u\\cos v+8ze^u,    \\end{align}[\/latex]<\/p>\n<p>then substitute [latex]x(u,v)=e^u\\sin v,y(u,v)=e^u\\cos v[\/latex], and [latex]z(u,v)=e^u[\/latex], into this equation:<\/p>\n<p>[latex]\\hspace{5cm}\\begin{align}    \\frac{\\partial w}{\\partial u}&=(6x-2y)e^u\\sin v-2xe^u\\cos v+8ze^u \\\\    &=(6e^u\\sin v-2e^u\\cos v)e^u\\sin v-2(e^u\\sin v)e^u\\cos v+8e^{2u} \\\\    &=6e^{2u}\\sin^2{v}-4e^{2u}\\sin v\\cos v+8e^{2u} \\\\    &=2e^{2u}(3\\sin^2{v}-2\\sin v\\cos v+4).    \\end{align}[\/latex]<\/p>\n<p>Next, we calculate\u00a0[latex]\\partial w\/\\partial v[\/latex]:<\/p>\n<p>[latex]\\hspace{5cm} \\begin{align}    \\frac{\\partial w}{\\partial v}&=\\frac{\\partial w}{\\partial x}\\cdot \\frac{\\partial x}{\\partial v}+\\frac{\\partial w}{\\partial y}\\cdot \\frac{\\partial y}{\\partial v}+\\frac{\\partial w}{\\partial z}\\cdot \\frac{\\partial z}{\\partial v} \\\\    &=(6x-2y)e^u\\cos v-2x(-e^u\\sin v)+8z(0),    \\end{align}[\/latex]<\/p>\n<p>then we substitute [latex]x(u,v)=e^u\\sin v,y(u,v)=e^u\\cos v,[\/latex] and\u00a0[latex]z(u,v)=e^u[\/latex] into this equation:<\/p>\n<p>[latex]\\hspace{5cm}\\begin{align}    \\frac{\\partial w}{\\partial v}&=(6x-2y)e^u\\cos v-2x(-e^u\\sin v) \\\\    &=(6e^u\\sin v-2e^u\\cos v)e^u\\cos v+2(e^u\\sin v)(e^u\\sin) \\\\    &=2e^{2u}\\sin^2{v}+6e^{2u}\\sin v\\cos v-2e^{2u}\\cos^2{v} \\\\    &=2e^{2u}(\\sin^2{v}+\\sin v\\cos v-\\cos^2{v}).    \\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]\\partial w\/\\partial u[\/latex] and\u00a0[latex]\\partial w\/\\partial v[\/latex] given the following functions:<\/p>\n<p>[latex]\\hspace{8cm} \\begin{align}    w&=f(x,y,z)=\\frac{x+2y-4z}{2x-y+3z} \\\\    x&=x(u,v) = e^{2u}\\cos 3v \\\\    y&=y(u,v) = e^{2u}\\sin 3v \\\\    z&=z(u,v) = e^{2u}.    \\end{align}[\/latex]<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q135764289\">Show Solution<\/span><\/p>\n<div id=\"q135764289\" class=\"hidden-answer\" style=\"display: none\">\n<p>[latex]\\hspace{8cm} \\begin{align}    \\frac{\\partial w}{\\partial u}&=0 \\\\    \\frac{\\partial w}{\\partial v}&=\\frac{15-33\\sin 3v+6\\cos 3v}{(3+2 \\cos 3v-\\sin 3v)^2}    \\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=8186161&amp;p3sdk_version=1.10.1&amp;p=20361&amp;pt=375&amp;video_id=roL0IpV1FBU&amp;video_target=tpm-plugin-d4ysvvp8-roL0IpV1FBU\" 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.25_transcript.html\">transcript for &#8220;CP 4.25\u201d here (opens in new window).<\/a><\/div>\n<div class=\"textbox exercises\">\n<h3>Example: drawing a tree diagram<\/h3>\n<p>Create a tree diagram for the case when<\/p>\n<p style=\"text-align: center;\">[latex]\\large{w=f(x,y,z),x=x(t,u,v),y=y(t,u,v),z=z(t,u,v)}[\/latex]<\/p>\n<p>and write out the formulas for the three partial derivatives of\u00a0[latex]w[\/latex].<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q348851212\">Show Solution<\/span><\/p>\n<div id=\"q348851212\" class=\"hidden-answer\" style=\"display: none\">\n<p>Starting from the left, the function [latex]f[\/latex]\u00a0has three independent variables: [latex]x[\/latex], [latex]y[\/latex], and [latex]z[\/latex]. Therefore, three branches must be emanating from the first node. Each of these three branches also has three branches, for each of the variables\u00a0[latex]t[\/latex], [latex]u[\/latex], and [latex]v[\/latex].<\/p>\n<div id=\"attachment_1248\" style=\"width: 597px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1248\" class=\"size-full wp-image-1248\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/5667\/2021\/09\/22221925\/4-5-3.jpeg\" alt=\"A diagram that starts with w = f(x, y, z). Along the first branch, it is written \u2202w\/\u2202x, then x = x(t, u, v), at which point it breaks into another three subbranches: the first subbranch says t and then \u2202w\/\u2202x \u2202x\/\u2202t; the second subbranch says u and then \u2202w\/\u2202x \u2202x\/\u2202u; and the third subbranch says v and then \u2202w\/\u2202x \u2202x\/\u2202v. Along the second branch, it is written \u2202w\/\u2202y, then y = y(t, u, v), at which point it breaks into another three subbranches: the first subbranch says t and then \u2202w\/\u2202y \u2202y\/\u2202t; the second subbranch says u and then \u2202w\/\u2202y \u2202y\/\u2202u; and the third subbranch says v and then \u2202w\/\u2202y \u2202y\/\u2202v. Along the third branch, it is written \u2202w\/\u2202z, then z = z(t, u, v), at which point it breaks into another three subbranches: the first subbranch says t and then \u2202w\/\u2202z \u2202z\/\u2202t; the second subbranch says u and then \u2202w\/\u2202z \u2202z\/\u2202u; and the third subbranch says v and then \u2202w\/\u2202z \u2202z\/\u2202v.\" width=\"587\" height=\"551\" \/><\/p>\n<p id=\"caption-attachment-1248\" class=\"wp-caption-text\">Figure 3. Tree diagram for a function of three variables, each of which is a function of three independent variables.<\/p>\n<\/div>\n<p>The three formulas are<\/p>\n<p style=\"text-align: center;\">[latex]\\large{\\frac{\\partial w}{\\partial t}=\\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial t}+\\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial t}+\\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial t}}[\/latex]<\/p>\n<p style=\"text-align: center;\">[latex]\\large{\\frac{\\partial w}{\\partial u}=\\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial u}+\\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial u}+\\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial u}}[\/latex]<\/p>\n<p style=\"text-align: center;\">[latex]\\large{\\frac{\\partial w}{\\partial v}=\\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial v}+\\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial v}+\\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial v}}.[\/latex]<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"textbox key-takeaways\">\n<h3>Try it<\/h3>\n<p>Create a tree diagram for the case when<\/p>\n<p style=\"text-align: center;\">[latex]\\large{w=f(x,y),x=x(t,u,v),y=y(t,u,v)}[\/latex]<\/p>\n<p>and write out the formulas for the three partial derivatives of\u00a0[latex]w[\/latex].<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q567910368\">Show Solution<\/span><\/p>\n<div id=\"q567910368\" class=\"hidden-answer\" style=\"display: none\">\n<p style=\"text-align: center;\">[latex]\\large{\\frac{\\partial w}{\\partial t}=\\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial t}+\\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial t}}[\/latex]<\/p>\n<p style=\"text-align: center;\">[latex]\\large{\\frac{\\partial w}{\\partial u}=\\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial u}+\\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial u}}[\/latex]<\/p>\n<p style=\"text-align: center;\">[latex]\\large{\\frac{\\partial w}{\\partial v}=\\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial v}+\\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial v}}.[\/latex]<\/p>\n<div id=\"attachment_1253\" style=\"width: 447px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1253\" class=\"size-full wp-image-1253\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/5667\/2021\/09\/22222504\/4-5-tryitans1.jpeg\" alt=\"A diagram that starts with w = f(x, y). Along the first branch, it is written \u2202w\/\u2202x, then x = x(t, u, v), at which point it breaks into another three subbranches: the first subbranch says t and then \u2202w\/\u2202x \u2202x\/\u2202t; the second subbranch says u and then \u2202w\/\u2202x \u2202x\/\u2202u; and the third subbranch says v and then \u2202w\/\u2202x \u2202x\/\u2202v. Along the second branch, it is written \u2202w\/\u2202y, then y = y(t, u, v), at which point it breaks into another three subbranches: the first subbranch says t and then \u2202w\/\u2202y \u2202y\/\u2202t; the second subbranch says u and then \u2202w\/\u2202y \u2202y\/\u2202u; and the third subbranch says v and then \u2202w\/\u2202y \u2202y\/\u2202v.\" width=\"437\" height=\"328\" \/><\/p>\n<p id=\"caption-attachment-1253\" class=\"wp-caption-text\">Figure 4.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\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-869\">\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.24. <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.25. <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\/about\/pdm\">Public Domain: No Known Copyright<\/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":21,"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\":\"pd\",\"license_terms\":\"Access for free at https:\/\/openstax.org\/books\/calculus-volume-3\/pages\/1-introduction\"},{\"type\":\"original\",\"description\":\"CP 4.24\",\"author\":\"Ryan Melton\",\"organization\":\"\",\"url\":\"\",\"project\":\"\",\"license\":\"cc-by\",\"license_terms\":\"\"},{\"type\":\"original\",\"description\":\"CP 4.25\",\"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-869","chapter","type-chapter","status-publish","hentry"],"part":22,"_links":{"self":[{"href":"https:\/\/courses.lumenlearning.com\/calculus3\/wp-json\/pressbooks\/v2\/chapters\/869","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":197,"href":"https:\/\/courses.lumenlearning.com\/calculus3\/wp-json\/pressbooks\/v2\/chapters\/869\/revisions"}],"predecessor-version":[{"id":5909,"href":"https:\/\/courses.lumenlearning.com\/calculus3\/wp-json\/pressbooks\/v2\/chapters\/869\/revisions\/5909"}],"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\/869\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/courses.lumenlearning.com\/calculus3\/wp-json\/wp\/v2\/media?parent=869"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/courses.lumenlearning.com\/calculus3\/wp-json\/pressbooks\/v2\/chapter-type?post=869"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/courses.lumenlearning.com\/calculus3\/wp-json\/wp\/v2\/contributor?post=869"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/courses.lumenlearning.com\/calculus3\/wp-json\/wp\/v2\/license?post=869"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}