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

Gradient question

  1. Aug 5, 2014 #1
    This is a bit counterintuitive to me that the gradient vector is always normal to the level curve
    and the level surface.

    lets say we have a function f(x,y)=z

    then the gradient is,

    f(x,y) partial derivative with respect to x*i +f(x,y) partial derivative with respect to y*j


    what we actually get is,

    dz/dx*i+dz/dy*j=grad_f(x,y)

    then,

    [(dz/dx*i)+(dz/dy)*j]/sqrt((dz/dx*i)^2+(dz/dy*j)^2)

    this is always perpendicular to the level curve. But why does that direction always maximize the function?
     
  2. jcsd
  3. Aug 6, 2014 #2
    Think of going up a hill. You always have to go perpendicular to the level curve. You're not going to be winding around the side if you want the most direct route.
     
  4. Aug 6, 2014 #3

    HallsofIvy

    User Avatar
    Staff Emeritus
    Science Advisor

    Another way of looking at it: if z= f(x, y) then the "directional derivative", [itex]f_{\theta}[/itex], the rate of change of f as you move in the direction that makes angle [itex]\theta[/itex] with the positive x axis, is [itex]\nabla f\cdot \vec{e}_{\theta}[/itex] where [itex]\vec{e}_{\theta}[/itex] is the unit vector in that direction, which, in turn, is equal to [tex]\left(\frac{\partial f}{\partial x}\vec{i}+ \frac{\partial f}{\partial y}\vec{j}\right)\cdot \left(\vec{i}cos(\theta)+ \vec{j}sin(\theta)\right)= cos(\theta)\frac{\partial f}{\partial x}+ sin(\theta)\frac{\partial f}{\partial x}[/tex].

    To maximize (or minimize) that with respect to [itex]\theta[/itex], take the derivative with respect to [itex]\theta[/itex], set it equal to 0 and solve for [itex]\theta[/itex]. you will get
    [tex]tan(\theta)= \frac{\frac{\partial f}{\partial y}}{\frac{\partial f}{\partial x}}[/tex]
    showing that [itex]\theta[/itex] for the maximum is, indeed, the direction in which [itex]\nabla f[/itex] points while the minimum is in the opposite direction.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Gradient question
  1. Divergence of gradient (Replies: 1)

Loading...