# Calculating a limit with constraints

Given the function $f(x)$,

$$f(x,y,z,w) = \frac{x+iy}{\sqrt{|w+z|}} \text{.}$$

How do I calculate the limit

$$\lim\limits_{w\rightarrow -z} f$$

under the constraint that the points $(x,y,z) \in \mathbb{R}^3$ lie on a sphere with radius $w$:

$$x^2+y^2+z^2=w^2 \text{.}$$

Note that the constraint in the limit $w \rightarrow - z$ implies $x \rightarrow 0$ and $y \rightarrow 0$. Numerically, I obtained the following conjecture:

$$\sqrt{z} (1+i)$$

How do I prove this analytically?

-
Whenever $x=y=0$ and $(z,w)\neq (0,0)$, $f(x,y,z,w)=0$. So your function is either $0$ or undefined in your set of constraints. – 1015 Jan 29 '13 at 16:11
Ok, the question changed a bit. What is $F$? What does $\lim_{x\rightarrow -z}$ mean? – 1015 Jan 29 '13 at 16:14
The denominator is $w+z$, not $x+z$. – 1015 Jan 29 '13 at 16:20
I am really sorry, you're right. I hope my question makes sense now. – cschwan Jan 29 '13 at 16:23
Is $z$ supposed to be fixed and non negative? (or even positive?) (I just ask because you write that you expect the limit $\sqrt z$, which would make no sense otherwise.) – Sebastien B Jan 29 '13 at 16:59

If we choose $y=0$ and $x=\sqrt{w^2-z^2}$ then the conditions you set are satisfied and (if it makes sense) $$\frac{x+iy}{\sqrt{|w+z|}}=\frac{\sqrt{w^2-z^2}\sqrt{|w-z|}}{\sqrt{|w+z|}\sqrt{|w-z|}}=\sqrt{|w-z|}\to\sqrt{2|z|}\,.$$
If we choose $x=0$ and $y=\sqrt{w^2-z^2}$ then the conditions you set are satisfied and (if it makes sense) $$\frac{x+iy}{\sqrt{|w+z|}}=\frac{i\sqrt{w^2-z^2}\sqrt{|w-z|}}{\sqrt{|w+z|}\sqrt{|w-z|}}=i\sqrt{|w-z|}\to i\sqrt{2|z|}\,.$$
Thanks for your reply! Maybe it helps if I explain a bit of the context. The formula is used in a numerical program and obviously it is not defined for $(x,y,z,w) = (0,0,-z,z)$. Now my questions basically is: What do I do in this case (there is data that has exactly this form). And now that we have two limits, which one do I choose? – cschwan Jan 29 '13 at 17:41
It is weird why my numerical answer differs from your analytical answers (is there maybe a third limit?). With $x=y=10^{-10}, z=1, w=-\sqrt{2 \cdot 10^{-20} + 1^2}$ and 4096 bits precision I still obtain about $1 + i$. – cschwan Jan 29 '13 at 18:10
I just showed two limits, but I guess you can have a lot more. As an exemple you could also get $-\sqrt{2|z|}$ and $-i\sqrt{2|z|}$ by taking $(x,y)=(-\sqrt{w^2-z^2},0)$ and $(x,y)=(0,-\sqrt{w^2-z^2})$. And you approach $(x,y,w)=(0,0,-z)$ by another direction, so it possible that you get another limit. I don't really know if there is a limit which is the good one for your problem. It depends on the problem... – Sebastien B Jan 29 '13 at 18:21