1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

How to compute the level curves of this function

  1. Jul 30, 2012 #1

    lo2

    User Avatar

    1. The problem statement, all variables and given/known data

    I have this function of two variables:

    [itex]f(x,y)=x^2-4x+y^2[/itex]

    Where I have to compute the level curves for:

    [itex]f(x,y)=-3, -2, -1, 0, 1[/itex]


    2. Relevant equations

    -

    3. The attempt at a solution

    So yeah well I know that I have to draw the following curves:

    [itex]-3=x^2-4x+y^2[/itex]

    [itex]-2=x^2-4x+y^2[/itex]

    [itex]-1=x^2-4x+y^2[/itex]

    [itex]0=x^2-4x+y^2[/itex]

    [itex]1=x^2-4x+y^2[/itex]

    But I must say that I have no idea how they are going to look. So if I would draw these by hand how would they look? Could I perhaps just isolate y?
     
  2. jcsd
  3. Jul 30, 2012 #2

    SammyS

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Gold Member

    Complete the square for [itex]x^2-4x+y^2\ .[/itex]

    [itex]x^2-4x+y^2[/itex]
    [itex]=x^2-4x+4+y^2-4[/itex]

    [itex]=(x-2)^2+y^2-4[/itex]
     
  4. Jul 30, 2012 #3

    lo2

    User Avatar

    Ok so I can rearrange it to:

    [itex]4=(x-2)^2+y^2[/itex]

    Which is a circle with a radius of 2 and a center at (2,0)?

    And what if I cannot rearrange to become a circle? I guess what I would like to have is a general approach that can be applied in all cases.
     
  5. Jul 30, 2012 #4

    LCKurtz

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    No. Sammy just rearranged your expression for f(x,y) to a more convenient form to recognize. You still have to set f(x,y) = to your various constants and graph what you get.
    You set f(x,y) = C for your various values of C. This problem apparently gives a family of circles. The graphs can be anything depending on the formula for f(x,y) you are given. You graph them like you learned to do in algebra and calculus.
     
  6. Jul 30, 2012 #5
    It is always possible (for this function) to rearrange the terms to have a circle. Just use the generic form

    f(x, y) = a = const

    and you will see that the only effect of a is on the radius. Well, except perhaps that for some values the radius will be imaginary.
     
  7. Jul 30, 2012 #6

    SammyS

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Gold Member

    None of the values in this problem give an imaginary radius.

    As long as f(x,y) = a ≥ -4, the radius is not imaginary.
     
  8. Jul 30, 2012 #7

    lo2

    User Avatar

    Ok yeah well I was being a bit fast there, but that was for c = 0.

    Ok so we have:

    [itex]f(x,y)=C=(x-2)^2+y^2-4 \Leftrightarrow C+4=(x-2)^2+y^2 [/itex]

    Ok so this means we have a circle with a center at (2,0) and a radius of [itex]\sqrt{C+4}[/itex], ok?
     
  9. Jul 30, 2012 #8

    LCKurtz

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    Yes. So you get a family of circles. And, as I mentioned earlier, for different functions f(x,y) you might get anything. But the method is simple enough.
     
  10. Jul 30, 2012 #9

    lo2

    User Avatar

    Ok thanks for the help!

    What if I have this function:

    [itex]f(x,y)=xy[/itex]

    How would I compute the different level curves? What does this family of curves look like?
     
  11. Jul 30, 2012 #10

    LCKurtz

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    Didn't you read my post #4??
     
  12. Jul 30, 2012 #11

    uart

    User Avatar
    Science Advisor

    You set [itex]xy = {\rm const}[/itex] and then solve for [itex]y[/itex]. Surely that is not difficult.

    This type of problem relies on you having a basic knowledge of some elementary functions and recognizing their equations. For example, can you recognize a parabola from it's equation? Same for a hyperbola, a circle, an exponential, a straight line (obviously), and possibly also an ellipse.
     
  13. Jul 30, 2012 #12

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    Most expressions will not allow a closed-form solution, but nevertheless one must deal with them in practice. Most symbolic/graphic computer packages can plot such contours, and they employ numerical root-finding algorithms, to go from a point (x0,y0) on a contour to a neighbouring point (x0 + Δx, y0 + Δy) on the same contour.

    RGV
     
  14. Jul 30, 2012 #13

    lo2

    User Avatar

    I did.

    But I am not just sure how to rearrange this one:

    [itex]f(x,y)=xy[/itex]

    I might try this:

    [itex]C=xy \Leftrightarrow y=\frac{C}{x}[/itex]

    So it is a family of the [itex]\frac{1}{x}[/itex] with just different constants to replace the 1.

    How about that?
     
  15. Jul 30, 2012 #14

    LCKurtz

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    That's all there is to it. So make a simple table of values and plot it for each C required. Or use a graphing calculator.
     
  16. Jul 30, 2012 #15

    lo2

    User Avatar

    Ok well one last question then.

    How come I cannot rearrange this one:

    [itex]C=x^2-4x+y^2[/itex]

    to

    [itex]C=x^2-4x+y^2 \Leftrightarrow \sqrt{-x^2+4x+C}=y[/itex]
     
  17. Jul 30, 2012 #16

    SammyS

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Gold Member

    You can ... well almost.

    [itex]C=x^2-4x+y^2\quad \Leftrightarrow \quad \pm\sqrt{-x^2+4x+C}=y[/itex]

    ... but that doesn't seem too helpful, except perhaps for use in graphing y versus x.
     
  18. Jul 30, 2012 #17

    LCKurtz

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    You could, with the addition of the ##\pm## sign. But if you did, would you have recognized that as a circle and know its center and radius? That's why we use standard forms for straight lines and conics. It isn't always desirable to solve for ##y##.
     
  19. Jul 30, 2012 #18
    Every equation f(x, y) = c, where f(x,y) is a bivariate polynomial of degree 2 (aka "quadratic form"), defines a "conic section", which is an ellipse (of which the circle is a special case), a parabola, or a hyperbola. The c constant, depending on the form of the equation, will affect some of its parameters, so you get a parametric family of conic sections.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: How to compute the level curves of this function
Loading...