# Level curves

1. Dec 25, 2005

### Benny

Hi, I'm having trouble drawing the level curves of a function because I can't really visualise what's going on.

$$f\left( {x,y} \right) = \frac{{2xy}}{{x^2 + y^2 }}$$

In polar coordinates (x,y) = (rcos(phi),rsin(phi)) I get:$$f\left( {r\cos \phi ,r\sin \phi } \right) = \sin \left( {2\phi } \right)$$.

Level curves are obtained by setting f equal to a constant. In the case of a circle for example f(x,y) = x^2 - y^2 - 9 if I set f(x,y) = k where -9 < k <= 0, in the x-y plane I get level curves which are circles with radii between 0 and 3 (3 inclusive).

I'm not sure which happens here though. I have f(polar) = sin(2phi) where phi is the polar angle. Since, 1- <= sin(x) <= 1 then does that mean I can only set f equal to values in the range [-1,1]?

I'm still not really sure what the level curves should be like. Any help would be good thanks.

2. Dec 25, 2005

### HallsofIvy

Staff Emeritus
Do you have a particular reason for converting to polar coordinates?

Level curves are points (x,y) that give f(x,y) a constant value:
$$f(x,y)= \frac{2xy}{x^2+y^2}= c$$.

That is the same as 2xy= c(x2+ y2 or
x2+ (2/c)xy+ y2= 0. Obvious point: if c= 1 that is
x2+ 2xy+ y2= (x+ y)2= 0 which is the single straight line y= -x. It should be easy to show that for other values of c, it can still be factored and the graph will be two straight lines intersecting at (0,0).

3. Dec 25, 2005

### benorin

$f(x,y)= \frac{2xy}{x^2+y^2}= c\Rightarrow y^2-\frac{2xy}{c}+x^2= 0$, which is quadratic in y, hence

$$y=\frac{ \frac{2x}{c} \pm\sqrt{ \left( \frac{2x}{c}\right) ^2 - 4x^2} }{2}$$

Last edited: Dec 26, 2005
4. Dec 25, 2005

### Benny

Converting to polar coordinates just seemed to simplify the expression. I'll have another look at it. Thanks for the help.

5. Dec 26, 2005

### benorin

A little more detail...

$f(x,y)= \frac{2xy}{x^2+y^2}= c\Rightarrow y^2-\frac{2xy}{c}+x^2= 0$, which is quadratic in y, hence

$$y=\frac{ \frac{2x}{c} \pm\sqrt{ \left( \frac{2x}{c}\right) ^2 - 4x^2} }{2} = \frac{x}{c}\left( 1\pm\sqrt{1-c^2}\right)$$

note that this family of level curves given by $f(x,y)=c$ is only meaningful for $-1\leq c\leq 1$. This is because, for every $(x,y)\in \mathbb{R} ^2$, we have

$$0\leq (x - y)^2 =x^2 - 2xy + y^2 \Rightarrow 2xy\leq x^2 + y^2 \Rightarrow f(x,y)= \frac{2xy}{x^2+y^2} \leq 1$$

and

$$0\leq (x + y)^2 =x^2 + 2xy + y^2 \Rightarrow -2xy\leq x^2 + y^2 \Rightarrow -1\leq\frac{2xy}{x^2+y^2} =f(x,y)$$

thus

$$f(x,y)= \left| \frac{2xy}{x^2+y^2} \right| \leq 1$$

so no other values of c are even possible (except c=0) and we thereby gain assurence that our family of curves is complete. The plot below shows 7 level curves superimposed on the plot of f(x,y) over -3 < x < 3, -3 < y < 3 .

For c=0, we get 2xy=0, so either x=0 or y=0, but not both, as that would involve division by zero, and so among our level curves, count also the x-axis & the y-axis less the origin.

#### Attached Files:

• ###### level curves.jpg
File size:
18.8 KB
Views:
98
Last edited: Dec 26, 2005
6. Dec 26, 2005

### Benny

Thanks again for your help. I'll go over your work after I get some sleep.:zzz:

7. Dec 26, 2005

### benorin

I too will go over my work after I get some sleep. So be careful if you get up before me.

8. Dec 26, 2005

### HallsofIvy

Staff Emeritus
In other words, if c= 0, the level curve is a single straight line through the origin and for other values of c, the level curve is two straight lines passing through the origin, as I said above.