How do I determine how a function "approaches" a certain point that's undefined in R^2 (or maybe in higher dimensions). Suppose I have the function f: $\mathbb{R^2}$ \ {$(x,y):x=0$} -> $\mathbb{R}$:
$$f(x,y) = \frac{sin(xy)}{x}$$.
I am looking to define a new function g so that g will be continuous at $x = 0$ with the above function defined everywhere else.
So there is an obvious strategy to this: That is, I find the discontinuity and I "plug it in" meanwhile ensuring I remove the discontinuity and I maintain continuity (ie: I don't accidentally end up with something that is not a function).
So the only way I can see to do this is to see where this limit approaches as $x -> 0$, but in $\mathbb{R^2}$ I can approach from infinitely many directions. This is trivial in $\mathbb{R}$ as I can approach from two directions and then fill in the space. 
As an FYI, I made a guess that I can define (0,y) when x = 0 so that g is continuous and hence I get:
$$g(x,y) = \frac{sin(xy)}{x}$$
when x != 0 and 
$$(g,x) = (0,y)$$ when x = 0.
If this work, I am not sure why. 
In summary:
How can I determine how a function approaches in a higher dimension so I can determine how the function is behaving or approaching at a discontinuity. That way, I can determine what I need to do to "patch" in the discontinuity to create a new, continuous function.
 A: If a function has a limit at a point and it doesn't coincide with the value of the function at the point, then continuity can be "patched" by changing the value of the function at that point. However, if the limit doesn't exist, this can't be done.
When you are in higher dimensions, the difference with $\mathbb R$ is that the limits must hold for any way of approaching the point being considered (and so if one way fails the limit doesn't exist).
A: The Taylor series of $\sin (u)$ centered at $0$ gives:
$$\sin (xy)=xy-\frac{1}{3!}(xy)^3+....$$
Hence, for $x \neq 0$ your function is equivalently:
$$g(x,y)=\frac{\sin (xy)}{x}=y-\frac{1}{3!}x^2y^3+\frac{1}{5!}x^4y^5+...$$
This clearly approaches $y_0$ as $(x,y) \to (0,y_0)$ as all terms but the first tend to $0$.
Hence, In order for your function $g$ to be continuous we must have $g(0,y_0)=y_0$ or equivalently $g(0,y)=y$.
So, the function you are looking for is:
$$g(x,y)=\left\{
\begin{array}{ll}
       \frac{\sin (xy) }{x} &\text{if} & x \neq 0 \\ y & \text{if} & x=0
\end{array} 
\right.$$
