Consider a function defined on $\mathbb{R^2}$ by
$$f(x,y) = \begin{cases} 0 &\mbox{if } y \leq 0 \ or \ \mbox{if} \ y\geq x^2 \\ sin(\frac{\pi y}{x^2}) & \mbox{if } 0 \ < y < x^2. \end{cases} $$
Show that the restriction of f to any straight line through the origin is continuous.
Attempt:
To me what that means is $y = \lambda x$ where $\lambda \in \mathbb{R}$ Now if I attempt this I still arrive with an $x$ in the denominator and taking the limit of such will make my function go to $\infty$ which is not what we want. IS there another part of the condition I am not using? I was thinking that perhaps $0< \lambda < 1$. If that is the case how could I use it?
First consider the case of restricting the function to the line $x=0$, call it $f_{\perp}(y)$. Since every point of this line satisfies the first condition we know that
$$ f_{\perp}(y)=0\text{ for all } y$$
so $f_{\perp}(y)$ is continuous.
Next, let $\lambda>0$ and define
$$ f_{\lambda}(x)=f(x,\lambda x)$$
Then
$$ f_{\lambda}(x)=\begin{cases} 0 & \text{if }x\le\lambda\\ \sin\left(\frac{\pi\lambda}{x}\right)&\text{if }x>\lambda \end{cases} $$
So it is clearly continuous for all $x\ne\lambda$. So consider $x=\lambda$.
We have $f_{\lambda}(\lambda)=0$ and $$\lim_{x\to\lambda^-}f(x)=0\text{ and} \lim_{x\to\lambda^+}f(x)=\sin(\pi)=0=f_{\lambda}(\lambda)$$ so the function is continuous at $x=\lambda$.