Multivariable calculus

Limit of (x^2-y^2)/(x^2+y^2) Does Not Exist at (0,0)

The limit of (x^2 - y^2)/(x^2 + y^2) at the origin does not exist. On the x-axis the function equals 1 at every point, and on the y-axis it equals -1 at every point. Since two paths give different constants, the limit fails. In polar form the function is cos(2 theta).

f(x,y)=x2y2x2+y2f(x,y) = \frac{x^2 - y^2}{x^2 + y^2}

The limit does not exist

PathLimit along it
along y = 01
along x = 0-1
along y = x0

Two axes settle it immediately

This is the cleanest example of a failing limit, because the two coordinate axes already disagree. Set y=0y = 0 and the y2y^2 terms vanish from both numerator and denominator.

f(t,0)=t20t2+0=1f(t, 0) = \frac{t^2 - 0}{t^2 + 0} = 1

Now set x=0x = 0 and the same thing happens with the roles reversed.

f(0,t)=0t20+t2=1f(0, t) = \frac{0 - t^2}{0 + t^2} = -1

Approaching along the xx-axis the function sits at 11; approaching along the yy-axis it sits at 1-1. The limit does not exist. The diagonal y=xy = x gives yet another value, 00, since the numerator t2t2t^2 - t^2 is zero while the denominator is 2t22t^2.

The general line y=mxy = mx gives 1m21+m2\frac{1 - m^2}{1 + m^2}, which runs through every value in (1,1](-1, 1] as the slope changes: it is 11 on the flat line and edges toward 1-1 as the line steepens. The endpoint 1-1 belongs to the vertical line x=0x = 0, the one line the formula cannot reach.

The polar picture: a saddle of directions

Substituting x=rcosθx = r\cos\theta, y=rsinθy = r\sin\theta turns the quotient into a double-angle identity.

f=r2(cos2θsin2θ)r2=cos2θf = \frac{r^2(\cos^2\theta - \sin^2\theta)}{r^2} = \cos 2\theta

Distance from the origin has no effect at all. Walk in on any ray and ff is the constant cos2θ\cos 2\theta the entire way. The graph is a surface ruled by those rays, so every value in [1,1][-1, 1] already appears on every circle around the origin, however small. That is exactly what a nonexistent limit looks like.

This also tells you the function is bounded, which is worth noticing: bounded is not the same as convergent. A function can stay inside a narrow band and still have no limit.

The mistake: reaching for L'Hopital's rule

Plugging in (0,0)(0,0) gives 00\tfrac{0}{0}, and the reflex from single-variable calculus is to apply L'Hopital's rule. There is no such rule in two variables. L'Hopital compares rates along one line, and here the whole problem is that different lines behave differently.

Also resist the urge to cancel. Students write x2y2x2+y2=(xy)(x+y)x2+y2\frac{x^2 - y^2}{x^2 + y^2} = \frac{(x-y)(x+y)}{x^2+y^2} and then hope the factors cancel with the denominator. They do not: x2+y2x^2 + y^2 does not factor over the reals.

  • L'Hopital's rule applies only to one-variable limits.
  • 00\tfrac{0}{0} signals that work is needed, not that the limit fails.
  • The verdict comes from comparing paths, not from the algebraic form.

Frequently asked questions

Can the discontinuity be removed by defining f(0,0) cleverly?

No. A removable discontinuity requires the limit to exist so you can plug the value in. Here the function approaches 11 from one direction and 1-1 from another, so no choice of f(0,0)f(0,0) makes ff continuous.

What if I only test lines and they all give different values?

Then you are done after the first two that disagree. You do not need the general line formula. It is shown here because it also tells you the full range of values the function approaches, which is [1,1][-1, 1].