Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Partial Derivatives with Respect To Lines That Are Not In The Direction of Axis

  1. Aug 11, 2012 #1
    A 3-dimensional graph has infinite number of derivatives (in different directions) at a single point. I've learned how to find the partial derivative with respect to x and y, simply taking y and x to be constant respectively. But what do I do if I want to take the partial derivative with respect to a line that is not in the direction of an axis, but rather a diagonal line, like a line cutting through the x-axis at 45 degrees? In this case you can't simply take one of the axis to be a constant, right?
  2. jcsd
  3. Aug 11, 2012 #2
    These are so-called directional derivatives.

    So, let's say we are given a function [itex]f:\mathbb{R}^3\rightarrow \mathbb{R}[/itex] and a unit vector [itex]\mathbf{v}=(v_1,v_2,v_3)[/itex]. The the directional derivative of f in v is given by

    [tex]D_\mathbb{v} f = v_1\frac{\partial f}{\partial x}+v_2\frac{\partial f}{\partial y}+v_2\frac{\partial f}{\partial z}[/tex]

    First of all, note that if [itex]\mathbb{v}=(1,0,0)[/itex], then we just obtain the partial derivative with respect to x. So this is clearly the case where you differentiate with respect to the x-axis.

    As an example, given [itex]f(x,y,z)=x^5yz^4+\log(x)\sin(yz)[/itex]. We wish to find the partial derivative with respect to the line x=y=-z. A unit vector on this line is given by [itex]\mathbb{v}=(\frac{1}{\sqrt{3}},\frac{1}{\sqrt{3}},-\frac{1}{\sqrt{3}})[/itex]. (of course, [itex]-\mathbb{v}[/itex] is another unit vector but this vector will give us the same directional derivative up to a sign). So, we have

    [tex]\frac{\partial f}{\partial x}=5x^4yz^4 + \frac{\sin(yz)}{x}[/tex]
    [tex]\frac{\partial f}{\partial y}=x^5z^4 + z\log(x)\cos(yz)[/tex]
    [tex]\frac{\partial f}{\partial z}= 4x^5yz^3 + y\log(x)\cos(yz)[/tex]


    [tex]D_\mathbb{v} f = \frac{1}{\sqrt{3}}(5x^4yz^4 + \frac{\sin(yz)}{x})+\frac{1}{\sqrt{3}}(x^5z^4 + z\log(x)\cos(yz)) -\frac{1}{\sqrt{3}}(4x^5yz^3 + y\log(x)\cos(yz))[/tex]
  4. Aug 11, 2012 #3
    The previous post gave information on how to calculate it, but not on why this is the derivative with respect to a line. To see how to define it, take a function

    [tex]f:\mathbb{R}^3\rightarrow \mathbb{R}[/tex]

    We want to find the derivative when this is restricted to a line.
    First, take a point [itex]\mathbb{a}[/itex] in which we wish to find the directional derivative. We wish to find the directional derivative with respect to a line L.
    First, take a unit vector [itex]\mathbb{v}[/itex] which is parallel to L. Then we can write all points on L in the form [itex]\mathbb{a}+\alpha\mathbb{v}[/itex].

    So f restricted on the line gives us the function


    Note that [itex]g(0)=f(\mathbb{a})[/itex]. So we wish to find the derivative of g with respect to [itex]\alpha[/itex], and we wish to find the derivative of this in 0. This is

    [tex]g^\prime(0)=\lim_{h\rightarrow 0}\frac{g(h)-g(0)}{h} = \lim_{h\rightarrow 0} \frac{ f(\mathbb{a}+h\mathbb{v})-f(\mathbb{a})}{h}[/tex]

    This expression is called the directional derivative of f in [itex]\mathbb{a}[/itex]. So

    [tex]D_\mathbb{v} f = \lim_{h\rightarrow 0} \frac{ f(\mathbb{a}+h\mathbb{v})-f(\mathbb{a})}{h}[/tex]

    Now, you may wonder, how are the things in this post and my previous post equal. Why is

    [tex]g^\prime(0)=v_1\frac{\partial f}{\partial x}+v_2\frac{\partial f}{\partial y}+v_3\frac{\partial f}{\partial z}[/tex]

    The equality of these two things can very easily be shown by the chain rule. Try it yourself once you've seen the chain rule!
  5. Aug 11, 2012 #4
    If you have a parametric curve, r(t), then the directional derivative of a scalar function along that curve is
    Df/dt=r'(t) O f'(t)

    O is the dot product, f'(t) is a vector with components equal to the respective derivatives of f
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook