# Homework Help: How to compute the level curves of this function

1. Jul 30, 2012

### lo2

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

I have this function of two variables:

$f(x,y)=x^2-4x+y^2$

Where I have to compute the level curves for:

$f(x,y)=-3, -2, -1, 0, 1$

2. Relevant equations

-

3. The attempt at a solution

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

$-3=x^2-4x+y^2$

$-2=x^2-4x+y^2$

$-1=x^2-4x+y^2$

$0=x^2-4x+y^2$

$1=x^2-4x+y^2$

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. Jul 30, 2012

### SammyS

Staff Emeritus
Complete the square for $x^2-4x+y^2\ .$

$x^2-4x+y^2$
$=x^2-4x+4+y^2-4$

$=(x-2)^2+y^2-4$

3. Jul 30, 2012

### lo2

Ok so I can rearrange it to:

$4=(x-2)^2+y^2$

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.

4. Jul 30, 2012

### LCKurtz

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.

5. Jul 30, 2012

### voko

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.

6. Jul 30, 2012

### SammyS

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

As long as f(x,y) = a ≥ -4, the radius is not imaginary.

7. Jul 30, 2012

### lo2

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

Ok so we have:

$f(x,y)=C=(x-2)^2+y^2-4 \Leftrightarrow C+4=(x-2)^2+y^2$

Ok so this means we have a circle with a center at (2,0) and a radius of $\sqrt{C+4}$, ok?

8. Jul 30, 2012

### LCKurtz

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.

9. Jul 30, 2012

### lo2

Ok thanks for the help!

What if I have this function:

$f(x,y)=xy$

How would I compute the different level curves? What does this family of curves look like?

10. Jul 30, 2012

### LCKurtz

Didn't you read my post #4??

11. Jul 30, 2012

### uart

You set $xy = {\rm const}$ and then solve for $y$. 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.

12. Jul 30, 2012

### Ray Vickson

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

13. Jul 30, 2012

### lo2

I did.

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

$f(x,y)=xy$

I might try this:

$C=xy \Leftrightarrow y=\frac{C}{x}$

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

14. Jul 30, 2012

### LCKurtz

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.

15. Jul 30, 2012

### lo2

Ok well one last question then.

How come I cannot rearrange this one:

$C=x^2-4x+y^2$

to

$C=x^2-4x+y^2 \Leftrightarrow \sqrt{-x^2+4x+C}=y$

16. Jul 30, 2012

### SammyS

Staff Emeritus
You can ... well almost.

$C=x^2-4x+y^2\quad \Leftrightarrow \quad \pm\sqrt{-x^2+4x+C}=y$

... but that doesn't seem too helpful, except perhaps for use in graphing y versus x.

17. Jul 30, 2012

### LCKurtz

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$.

18. Jul 30, 2012

### voko

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.