# Another one on contours

1. Feb 21, 2006

### mmh37

I shall plot the contour diagram of

$$z = (x^2 - y^2) * e^ {-x^2 - y^2}$$

for z = O this is easy, however, if z = 1 one gets

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

Does anyone know how to draw this?

I tried to find the intersection between two functions y1 and y2 being the lhs and rhs of the above equation respectively; but since I don't know how to draw y = ln (x^2 - y^2) either I have no clue how this is supposed to work.

2. Feb 21, 2006

### AKG

Maybe start by looking at x² as X, and y² as Y, so you're just looking at ln(X-Y) = X+Y. Also, you do not want to see where y = ln(x² - y²) and y = x² + y² intersect. For example, if you wanted to plot the diagram for

cos(y) = sin(y)

you wouldn't want to see where:

y = sin(y), and y = cos(y)

intersected. y = cos(y) will just be the horizontal line y = 0.74 (approximately), and y = sin(y) will just be the horizontal line y = 0, so their intersection will be empty. On the other hand, sin(y) = cos(y) will have a solution consisting of infinitely many horizontal lines, a distance of $\pi$ apart from one another.

So you really just have to solve ln(X-Y) = X+Y.

3. Feb 21, 2006

### mmh37

thanks for this. I do understand your argument. however, I do not understand how I could draw ln(X-Y) = X+Y either, since solving for x and y looks impossible.

4. Feb 22, 2006

### saltydog

I belive you're approaching it wrong. Do not take the log but rather solve for y in the equation:

$$a=(x^2-y^2)e^{-(x^2+y^2)}$$

Yea, it could happen via the Lambert W function. How about I start it for you:

Switch it around to:

$$(x^2-y^2)=ae^{(x^2-y^2)}$$

Now here comes the tricky part: What do I have to multiply both sides by so that the LHS is:

$$fe^{f}$$

(where f is some algebraic expression)

That's the form to extract the Lambert-W function. Then solve for y . . . equal rights and all that stuf.

Last edited: Feb 22, 2006