# Limit of a piecewise defined function

If $$f(x) = \begin{cases} mx^2 + n & x<0\\ nx +m & 0\leq x\leq 1\\ nx^3 +m & x>1 \end{cases}$$

For what integers $m$ and $n$, does both $\displaystyle \lim_{x \to 0} f(x)$ and $\displaystyle \lim_{x \to 1} f(x)$ exists?

-
what you tried? –  Ram Jan 13 '13 at 5:49
thanks you Marvis –  Pramod Sir Jan 13 '13 at 5:49
my ans for lim(x->0) = (m=n) and for lim(x->1) = (m+n=n+m) –  Pramod Sir Jan 13 '13 at 5:50
how you concluded that? write your steps and I think that might suffice –  Ram Jan 13 '13 at 5:52
Note that $$\lim_{x \to 0^-} f(x) = \lim_{x \to 0^-} mx^2+n = n$$ $$\lim_{x \to 0^+} f(x) = \lim_{x \to 0^+} nx+m = m$$ Hence, for $\lim_{x \to 0} f(x)$ to exist, we need $m=n$.
Similarly, note that $$\lim_{x \to 1^-} f(x) = \lim_{x \to 1^-} nx+m = n+m$$ $$\lim_{x \to 1^+} f(x) = \lim_{x \to 1^+} nx^3+m = n+m$$ Hence, for $\lim_{x \to 1} f(x)$ exists since both the above limits are equal. Hence, the only constraint we get is $m=n$. Hence, $$m =n \in \mathbb{Z}$$