{"id":1490,"date":"2021-01-29T23:30:00","date_gmt":"2021-01-30T04:30:00","guid":{"rendered":"http:\/\/underthehood.blogwyrm.com\/?p=1490"},"modified":"2022-07-28T06:28:23","modified_gmt":"2022-07-28T10:28:23","slug":"partial-derivatives-completely-done","status":"publish","type":"post","link":"https:\/\/underthehood.blogwyrm.com\/?p=1490","title":{"rendered":"Partial Derivatives &#8211; Completely Done"},"content":{"rendered":"\n<p>Partial derivatives are an important mathematical tool in a number of physics disciplines, most notably field theories (e.g. electricity &amp; magnetism and general relativity) and in thermodynamics.<\/p>\n\n\n\n<p>However, working with partial derivatives are always a bit tricky and teaching students about them is usually fraught with difficulties.&nbsp; So it was to my pleasant surprise that I found a really nice discussion of how to derive the various &#8216;classic&#8217; rules cleanly presented in <em>Classical and Statistical Thermodynamics<\/em> by Ashley H. Carter.&nbsp;<\/p>\n\n\n\n<p>My presentation here is strongly influenced and closely follows her presentation in Appendix A, although I&#8217;ve added on a bit in the theoretical flow and I&#8217;ve also provided explicit examples in terms of the standard paraboloid found in freshman calculus.&nbsp;<\/p>\n\n\n\n<p>Assume a function of 3 variables can be expressed as $$f(x,y,z) = 0$$.&nbsp; This equation can be viewed as a constrain equation linking the values of the variables such that&nbsp;two variables are independent.&nbsp; That means that we can (at least locally) solve for:<\/p>\n\n\n\n<div style=\"width: 20%; margin-left: auto ; margin-right: auto\">\n  <ul><li>$$x(y,z) = 0$$<\/li><li>$$y(x,z) = 0$$<\/li><li>$$z(x,y) = 0$$<\/li><\/ul>\n<\/div>\n\n\n\n<p>Focus on the first and second forms (other pairings will follow a simple relabeling of the variables).&nbsp; The corresponding differentials are<\/p>\n\n\n\n<p>\\[ dx = \\left( \\frac{\\partial x}{\\partial y} \\right)_z dy + \\left( \\frac{\\partial x}{\\partial z} \\right)_y dz \\; \\]<\/p>\n\n\n\n<p>and<\/p>\n\n\n\n<p>\\[ dy = \\left( \\frac{\\partial y}{\\partial x} \\right)_z dx + \\left( \\frac{\\partial y}{\\partial z} \\right)_x dz \\; .\\]<\/p>\n\n\n\n<p>Now substitute the expansion of $$dy$$ into the expansion of $$dx$$<\/p>\n\n\n\n<p>\\[ dx = \\left(\\frac{\\partial x}{\\partial y}\\right)_z \\left[ \\left(\\frac{\\partial y}{\\partial x}\\right)_z dx + \\left(\\frac{\\partial y}{\\partial z}\\right)_x dz \\right] + \\left(\\frac{\\partial x}{\\partial z}\\right)_y dz \\; ,\\]<\/p>\n\n\n\n<p>which simplifies to<\/p>\n\n\n\n<p>\\[ dx = \\left(\\frac{\\partial x}{\\partial y}\\right)_z \\left(\\frac{\\partial y}{\\partial x}\\right)_z dx + \\left[ \\left(\\frac{\\partial x}{\\partial y}\\right)_z \\left(\\frac{\\partial y}{\\partial z}\\right)_x + \\left(\\frac{\\partial x}{\\partial z}\\right)_y \\right] dz \\; .\\]<\/p>\n\n\n\n<p>Putting it all together gives<\/p>\n\n\n\n<p>\\[ \\left[ 1 &#8211; \\left(\\frac{\\partial x}{\\partial y}\\right)_z \\left(\\frac{\\partial y}{\\partial x}\\right)_z \\right] dx &#8211; \\left[ \\left(\\frac{\\partial x}{\\partial y}\\right)_z \\left(\\frac{\\partial y}{\\partial z}\\right)_x + \\left(\\frac{\\partial x}{\\partial z}\\right)_y \\right] dz = 0 \\; .\\]<\/p>\n\n\n\n<p>Since $$dx$$ and $$dz$$ are independent, each differential can be set to zero independently, giving one of the classic identities.<\/p>\n\n\n\n<p>First set&nbsp;$$dz = 0$$ to get<\/p>\n\n\n\n<p>\\[ \\left(\\frac{\\partial x}{\\partial y}\\right)_z = 1\/ \\left(\\frac{\\partial y}{\\partial x}\\right)_z \\; , \\]<\/p>\n\n\n\n<p>which is called the reciprocal rule.<\/p>\n\n\n\n<p>Next, setting $$dx = 0$$ yields<\/p>\n\n\n\n<p>\\[ \\left(\\frac{\\partial x}{\\partial y}\\right)_z \\left(\\frac{\\partial y}{\\partial z}\\right)_x = \\; &#8211; \\; \\left(\\frac{\\partial x}{\\partial z}\\right)_y \\; , \\]<\/p>\n\n\n\n<p>which is called the fraction rule.<\/p>\n\n\n\n<p>The manipulations are complete when using the&nbsp;reciprocal rule in the fraction rule and simplify to get<\/p>\n\n\n\n<p>\\[ \\left(\\frac{\\partial x}{\\partial y}\\right)_z \\left(\\frac{\\partial y}{\\partial z}\\right)_x \\left(\\frac{\\partial z}{\\partial x}\\right)_y = -1 \\; , \\]<\/p>\n\n\n\n<p>which is called the cyclic rule.<\/p>\n\n\n\n<p>Let\u2019s take a look at these relationships in action. Consider the implicit definition of the paraboloid<\/p>\n\n\n\n<p>\\[ x^2 + y^2 &#8211; z = 0 \\; . \\]<\/p>\n\n\n\n<p>As mentioned earlier, this equation can be considered as a constraint equation that selects out a value for any one of the three variables given the other two. In other words, we can imagine a look up table where we select a value of $$x$$ and $$y$$, we rummage through the table to find a row with both values and then we scan to the right to find the allowed value of $$z$$ that makes it satisfy the implicit equation.<\/p>\n\n\n\n<p>How do you construct this table; not at a finite set of points but functionally so that it works at any point? It is natural and easy to determine $$z$$ given $$x$$ and $$y$$ by simply rewriting the implicit equation as<\/p>\n\n\n\n<p>\\[ z(x,y) = x^2 + y^2 \\; .\\]<\/p>\n\n\n\n<p>However, it isn\u2019t as easy to express $$x$$ or $$y$$ as functions of the remaining two variables because of the two possible signs that result from taking the square root. We need to have four functional relationships<\/p>\n\n\n\n<p>\\[ x_p(y,z) = \\sqrt{ z \\; &#8211; \\; y^2 } \\; ,\\]<\/p>\n\n\n\n<p>\\[ x_n(y,z) = \\; &#8211; \\; \\sqrt{z \\; &#8211; \\; y^2} \\; , \\]<\/p>\n\n\n\n<p>\\[ y_p(x,z) = \\sqrt{z \\; &#8211; \\; x^2} \\; , \\]<\/p>\n\n\n\n<p>and<\/p>\n\n\n\n<p>\\[ y_n(x,z) = \\; &#8211; \\; \\sqrt{z \\; &#8211; \\; x^2} \\; , \\]<\/p>\n\n\n\n<p>depending on the particular combination of whether $$x$$ is positive or negative and whether $$y$$ is also positive or negative.&nbsp; In the language of differential geometry, we have a 5 charts in our atlas.<\/p>\n\n\n\n<p>We are now in position to try the various relations derived above. For example, let&#8217;s examine the reciprocal relation in the first quadrant of the $$x$$-$$y$$ plane.&nbsp; We need to use $$x_p$$ as our local chart.<\/p>\n\n\n\n<p>\\[ \\left(\\frac{\\partial x_p}{\\partial z}\\right)_y = \\frac{1}{2} \\frac{1}{\\sqrt{z &#8211; y^2}} \\; \\]<\/p>\n\n\n\n<p>or once we recognize the denominator as $$x_p$$&nbsp;<\/p>\n\n\n\n<p>\\[\\left(\\frac{\\partial x_p}{\\partial z}\\right)_y = \\frac{1}{2 x_p} \\; . \\]<\/p>\n\n\n\n<p>The &#8216;reciprocal&#8217; partial derivative is<\/p>\n\n\n\n<p>\\[ \\left( \\frac{\\partial z}{\\partial x} \\right)_y = 2 x = 2 x_p \\; ,\\]<\/p>\n\n\n\n<p>where there is no need for the $$z$$-chart to distinguish between positive and negative values of $$x$$.&nbsp; As expected the derivatives are reciprocals of each other.<\/p>\n\n\n\n<p>Next, let&#8217;s test the fraction rule.&nbsp; For fun, this time let&#8217;s test it in the 2nd quadrant in the $$x$$-$$y$$ plane ($$x &lt; 0$$ and $$y &gt; 0$$).&nbsp; Calculating the partial derivatives on the left-hand side yields<\/p>\n\n\n\n<p>\\[ \\left(\\frac{\\partial x_n }{\\partial y_p } \\right)_z = \\frac{y_p}{\\sqrt{z &#8211; y_p^2}} = \\; &#8211; \\;  \\frac{y_p}{x_n} \\; \\]<\/p>\n\n\n\n<p>and<\/p>\n\n\n\n<p>\\[ \\left(\\frac{\\partial y_p }{\\partial z} \\right)_{x_n} = \\frac{1}{2\\sqrt{z-x_n^2}} = \\frac{1}{2 y_p} \\; . \\]<\/p>\n\n\n\n<p>It is a simple matter to verify that<\/p>\n\n\n\n<p>\\[ \\left(\\frac{\\partial x_n }{\\partial y_p} \\right)_z \\left(\\frac{\\partial y_p }{\\partial z} \\right)_{x_n} = -\\frac{1}{2 x_n} \\; \\]<\/p>\n\n\n\n<p>is identical to&nbsp;<\/p>\n\n\n\n<p>\\[ &#8211; \\left(\\frac{\\partial x_n }{\\partial z} \\right)_{y_p} = \\frac{1}{2 \\sqrt{z &#8211; y_p^2} } = -\\frac{1}{2 x_n} \\; .\\]<\/p>\n\n\n\n<p>Finally, for the cyclic rule, let&#8217;s go into the 4th quadrant in the $$x$$-$$y$$ plane ($$x&gt;0$$ and $$y&lt;0$$).&nbsp; Taking each partial derivative in turns yields<\/p>\n\n\n\n<p>\\[ \\left(\\frac{\\partial x_p }{\\partial y_n} \\right)_{z} = -\\frac{y_n}{\\sqrt{z-y_n^2}} = -\\frac{y_n}{x_p} \\; ,\\]<\/p>\n\n\n\n<p>\\[ \\left(\\frac{\\partial y_n }{\\partial z} \\right)_{x_p} = -\\frac{1}{2 \\sqrt{z-x_p^2} } = \\frac{1}{2 y_n} \\; ,\\]<\/p>\n\n\n\n<p>and&nbsp;<\/p>\n\n\n\n<p>\\[ \\left(\\frac{\\partial z }{\\partial x_p} \\right)_{y_n} = 2 x_p \\; .\\]<\/p>\n\n\n\n<p>Multiplying these terms in order gives<\/p>\n\n\n\n<p>\\[ -\\frac{y_n}{x_p} \\frac{1}{2 y_n} 2 x_p = -1 \\; .\\]<\/p>\n\n\n\n<p>Nice, neat, and more than partially done.<\/p>\n\n\n\n \n","protected":false},"excerpt":{"rendered":"<p>Partial derivatives are an important mathematical tool in a number of physics disciplines, most notably field theories (e.g. electricity &amp; magnetism and general relativity) and in thermodynamics. However, working with&#8230; <a class=\"read-more-button\" href=\"https:\/\/underthehood.blogwyrm.com\/?p=1490\">Read more &gt;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1490","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/underthehood.blogwyrm.com\/index.php?rest_route=\/wp\/v2\/posts\/1490","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/underthehood.blogwyrm.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/underthehood.blogwyrm.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/underthehood.blogwyrm.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/underthehood.blogwyrm.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1490"}],"version-history":[{"count":16,"href":"https:\/\/underthehood.blogwyrm.com\/index.php?rest_route=\/wp\/v2\/posts\/1490\/revisions"}],"predecessor-version":[{"id":1507,"href":"https:\/\/underthehood.blogwyrm.com\/index.php?rest_route=\/wp\/v2\/posts\/1490\/revisions\/1507"}],"wp:attachment":[{"href":"https:\/\/underthehood.blogwyrm.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1490"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/underthehood.blogwyrm.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1490"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/underthehood.blogwyrm.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1490"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}