If $f(x)= \begin{cases}m x^{2}+n, & x<0 \\ n x+m, & 0 \leq x \leq 1 . \text { For what integers } m \text { and } n \text { does } \lim _{x \rightarrow 0} f(x) \text { and } \lim _{x \rightarrow 1} f(x) \text { exist? } \\ n x^{3}+m, & x>1\end{cases}$
The given function is
$f(x)= \begin{cases}m x^{2}+n, & x<0 \\ n x+m, & 0 \leq x \leq 1 \\ n x^{3}+m, & x>1\end{cases}$
$\lim _{x \rightarrow 0^{-}} f(x)=\lim _{x \rightarrow 0}\left(m x^{2}+n\right)$
$=m(0)^{2}+n$
$=n$
$\lim _{x \rightarrow 0^{+}} f(x)=\lim _{x \rightarrow 0}(n x+m)$
$=n(0)+m$
$=m .$
Thus, $\lim _{x \rightarrow 0} f(x)$ exists if $m=n$.
$\lim _{x \rightarrow 1^{-}} f(x)=\lim _{x \rightarrow 1}(n x+m)$
$=n(1)+m$
$=m+n$
$\lim _{x \rightarrow 1^{-}} f(x)=\lim _{x \rightarrow 1}\left(n x^{3}+m\right)$
$=n(1)^{3}+m$
$=m+n$
$\therefore \lim _{x \rightarrow 1} f(x)=\lim _{x \rightarrow 1^{+}} f(x)=\lim _{x \rightarrow 1} f(x) .$
Thus, $\lim _{x \rightarrow 1} f(x)$ exists for any integral value of $m$ and $n$.