2

I often end up with a function that contains the term $1/(1 + x^2/y^2)$, and I need to evaluate this in the limit $y\rightarrow 0$. By hand, I can rewrite this as $y^2/(y^2 + x^2)$, but how can I tell Mathematica to make such a simplification?

I have tried using 1/(1 + x^2/y^2) // Simplify and Expand, but neither work as intend (actually, they doesn't change anything).

m_goldberg
  • 107,779
  • 16
  • 103
  • 257
BillyJean
  • 1,273
  • 7
  • 25

2 Answers2

5

Like many limits involving two variables, this one is not as straightforward as it might seem. Consider

Limit[1/(1 + x^2/y^2), x -> 0]

1

while

Limit[1/(1 + x^2/y^2), y -> 0]

0

Coupling the two:

Limit[1/(1 + x^2/y^2) /. y -> x, x -> 0]

1/2

In other words, which direction you approach in x,y space is important to the limit. You can make this take almost any value between zero and one by choosing how the x,y are coupled. For example:

Limit[1/(1 + x^2/y^2) /. y -> 10 x, x -> 0]
Limit[1/(1 + x^2/y^2) /. y -> x/10, x -> 0]

give limits of 100/101 and 1/101. The same answers occur if the original form is replaced by the OPs simpler form, y^2/(x^2 + y^2).

There is a discussion of the use of generic solutions, which appears to be the reason that the first two give different answers: effectively the second is assuming that "generically" x is not zero. The tutorial doesn't explicitly mention Limit though presumably Solve is being used rather than Reduce (or at least, the methodology of Solve is being used rather than the methodology of Reduce) in terms of generic solutions.

bill s
  • 68,936
  • 4
  • 101
  • 191
  • @Penguin Dirk - I thought you should have elaborated! – bill s Jul 10 '13 at 13:39
  • @PinguinDirk Agree, almost because the thing is the first line shouldn't give us 1 without any assumptions. Also with, not bold at all, assumption that x and y are independent this limit[x,y] is the same as KronockerDelta[x], in values terms ofc. – Kuba Jul 10 '13 at 13:48
4
   expr = 1/(1 + x^2/y^2)

(*   1/(1 + x^2/y^2)  *)

Simplify[expr, ComplexityFunction -> (Count[#, _Power[_, -2]] &)]

(* y^2/(x^2 + y^2) *)
Alexei Boulbitch
  • 39,397
  • 2
  • 47
  • 96