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

Homework Help: Partial Derivatives

  1. Nov 4, 2008 #1
    1. The problem statement, all variables and given/known data
    The original problem:
    Given that: ax+by+c=0, Find the minimum possible value of z.
    x1,y1,x2,y2,a,b and c are constants.

    3. The attempt at a solution

    I think I need to apply the partial derivative. I would get a relation in x and y. I have a second relation in x and y which might simultaneously solve.
    But my concepts of partial derivative seem shaky. I don't know how to find the least value of a function which is dependent on 2 variables. I tried going through the articles given in wikipedia and wolfram(Mathworld) but they dont talk about the minimum value of such a function. I would also like to draw your attention to my previous post:

    I hope someone will help me understand this!!
  2. jcsd
  3. Nov 4, 2008 #2


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    You know that if you're at a minimum value of a function f(x), it must be that df/dx=0 right? The same concept applies... you have a function z(x,y). Hold x constant. Then if z is a minimum, it must be dz/dy = 0. (treating x as a constant in the derivative. This is a partial derivative). Now hold y constant instead. dz/dx=0 is necessary for it to be a minimum. So for z to be a minimum at a point, you have to have dz/dx=dz/dy=0 at the point
  4. Nov 4, 2008 #3


    User Avatar
    Homework Helper
    Gold Member

    Hint: What do you know about the total derivative of a function, at a local minimum or maximum?

    In this case the function your looking to find the minimum of is [itex]z(x,y)[/itex]...Use that chain rule to find [itex]dz[/itex] in terms of the partial derivatives [tex]\frac{\partial z}{\partial x}[/tex], [tex]\frac{\partial z}{\partial y}[/tex] and [itex]dx[/itex] and [itex]dy[/itex]

    As for incorporating your constraint equation, have you studied Lagrange multipliers yet?
  5. Nov 4, 2008 #4


    User Avatar
    Science Advisor
    Homework Helper

    Hi ritwik06! :smile:

    I don't know whether you're allowed to do it this way, but you can do it by ordinary geometry.

    Call (x1,y1) and (x2,y2) A and B. Call ax+by+c=0 the line L, then you're looking for the point P = (x,y) on L with PA + PB = minimum.

    Hint: do the case of L lying between A and B first. :wink:
  6. Nov 4, 2008 #5
    The total derivative should be 0.
    whats the chain rule?

    What are these? If you can give me some links I will definitely make my best efforts to go through them.
  7. Nov 4, 2008 #6
    I can easily see that this would be the case when what you call P lies on line connecting A and image of b in the given line. Right? But I want to do it this way!
  8. Nov 4, 2008 #7


    User Avatar
    Homework Helper
    Gold Member

    Yes, [itex]dz=0[/itex] at a local max/min.

    The chain rule for a function [itex]z(x,y)[/itex]of two variables [itex]x[/itex] and [itex]y[/itex] is:

    [tex]dz=\left| \frac{\partial z}{\partial x} \right| d x +\left| \frac{\partial z}{\partial y} \right| d y[/tex]

    Here is a link for lagrange multipliers: http://en.wikipedia.org/wiki/Lagrange_multipliers....feel free to ask me any questions you might have on them.
  9. Nov 4, 2008 #8
    Lagrange's Multipliers seem interesting! Though I don't think I may be able to grasp the proof with my current level of knowledge. But I think I can remember it as a law for the time being.
    But when I applied this to my problem, it resulted in huge equations and I dont think I might be able to solve them
    As directed i assume a function say [tex]\Delta(x,y,\lambda)[/tex]


    setting partial derivatives to 0;
    [tex]\frac{\partial \Delta}{\partial x}=\frac{x-x1}{\sqrt{(x1-x)^{2}+(y1-y)^{2}}}+\frac{x-x2}{\sqrt{(x2-x)^{2}+(y2-y)^{2}}} + \lambda a=0[/tex]

    [tex]\frac{\partial \Delta}{\partial y}=\frac{y-y1}{\sqrt{(x1-x)^{2}+(y1-y)^{2}}}+\frac{y-y2}{\sqrt{(x2-x)^{2}+(y2-y)^{2}}} + \lambda b=0[/tex]

    [tex]\frac{\partial \Delta}{\partial \lambda}=ax+by+c=0[/tex]

    But how am I going to solve this now???? Arent these too huge?
  10. Nov 4, 2008 #9


    User Avatar
    Homework Helper
    Gold Member

    If you put your first two equations over a common denominator, then you will only need to worry about where the numerator is zero....It's still a fair bit of algebra, but it's not too bad.

    Alternatively, since you can probably already guess the answer from TinyTim's Geometrical method, it's probably good enough to just show that your guess satisfies all three of the above equations.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook