Vector-valued function, proving whether it's continuous, based on its action on any line in R^2: Suppose $f: R^2 -> R^2$ is a function whose restriction to any line L in $R^2$ is continuous.  Prove or find a counterexample: f must be continuous.
For starters, I drew an arbitrary point on the plane, and some dotted lines approaching the point, say, (1,1).  These dotted lines represent arbitrary sequences, so all of these sequences limit to (1,1).
If f(1,1) = say, (4,5), and if f is continuous at (1,1), then by the sequential characterization of continuity, we know that, for any sequence (the dotted lines) ($x_n$,$y_n$) $->$ (1,1), we must have that f($x_n$,$y_n$) $->$ f(1,1) = the vector (4,5).
Any advice on how I can get started with constructing a counter-example? 
(I already know that f is not continuous, but I have not seen the counter-example yet, as I'd like to develop my own, if possible.)
Thanks,
 A: Here's how I would approach solving the problem.
The simplest possible kind of function that will satisfy these conditions is a rational function 
$$f(x,y) = \frac{g(x,y)}{h(x,y)},$$ 
where the denominator vanishes at at least one point (otherwise $f$ is continuous everywhere.) So let's say that that point is the origin, and that there are no troublesome points anywhere else:


*

*$h(x,y) = 0 \Leftrightarrow x=y=0.$


Now $f$ is obviously continuous  when restricted to any line that does not pass through the origin. We need to pick a value for $f(0,0)$; 0 is natural enough. We now need


*$\lim_{t\to 0} f(at, bt) = 0$


for every $a,b$. To ensure this we just need to make $g$ have higher total order in $x,y$ than $h$, and check the corner-cases $a=0$ and $b=0$.
Finally, for $f$ to be discontinuous at the origin, we use Gerry's hint and seek $g$ and $h$ with


*$\lim_{t\to 0} f(t, t^2) \neq 0.$


Now we solve the puzzle of putting the pieces together. The simplest $h$ to try is $x^2+y^2$, and we then need $g$ order three or higher to satisfy (2). But we can see that (3) won't be satisfied for any $g$ we pick, since the denominator will always be order two in $t$... easy enough, we instead pick $h = x^4+y^2$. We now need $g(t,t^2)$ to be order four, with $g(at, bt)$ order three or higher: we might try
$$f(x,y) = \frac{x^4}{x^4+y^2}.$$
So close! But it doesn't work, because setting $b=0$ gives a limit of 1, not zero. We can salvage by forcing the numerator to be mixed:
$$f(x,y) = \frac{x^2y}{x^4+y^2}$$
which does the trick.
