How to know this function is continuous and differentiable?

I have the following function:

$$y = \begin{cases} x^3, &\text{if } x \lt 1, \\ 3x-2, &\text{if } x \geq 1. \end{cases}$$

It is a function where I get a transition at $x=1$... I am supposed to check whether the function is continuous/differentiable at that transition point... the problem is I don't really see how to do it. I graphed the thing, but once I try finding whether a tangent line exists at $x=1$, I have problems... Could anyone, please, give me a hint on where I should go?

-

There is only one definition for continuity: $f$ is continuous at $1$ if and only if $f(x)\to f(1)$ when $x\to1$, that is, for every positive $\varepsilon$, there exists a positive $\delta$ such that $|x-1|\le\delta$ implies $|f(x)-f(1)|\le\varepsilon$.

In your case $f(1)=1$ and $|f(x)-1|=|x-1|\cdot|x^2+x+1|\le3|x-1|$ if $0<x<1$ and $|f(x)-1|=3|x-1|$ if $x>1$. Hence, for every positive $\varepsilon<1$, there exists $\delta>0$ such that $|x-1|\le\delta$ implies $|f(x)-f(1)|\le\varepsilon$. (I am sure you can find a suitable $\delta$.) This proves that $f$ is continuous at $1$.

Maybe you can attack differentiability now. First, that $f$ is differentiable at $1$ means that $f(x)=f(1)+(x-1)a+(x-1)\varepsilon(x)$ for a given $a$ and a given function $\varepsilon$ such that you-know-what holds. You probably already have an idea for $a$ so all you have to do now is to figure out what is the function $\varepsilon$ and to apply all your powers to show that $\varepsilon$ behaves well...

-

To see that the function is continuous and differentiable at the transition point, it helps to see how both branches behave near that point. To this end write $x^3 = (1 + x-1)^3 = 1 + 3 (x-1) + 3 (x-1)^2 + (x-1)^3$ and $3 x - 2 = 1 + 3 (x-1)$.

$$y = \left\{ \begin{array}{lr} 1 + 3 (x-1) + 3 (x-1)^2 + (x-1)^3 & x < 1 \\ 1 + 3(x-1) & x \ge 1 \end{array} \right.$$

-

the left hand limit is 1 and the right hand limit is also 1. So the function is continuous at $x=1$.

-
...similarly for the derivative. –  t.b. Sep 4 '11 at 20:59
ohh I missed it. Yes :) –  yati sagade Sep 4 '11 at 21:00
@seigna In fact, $y = 3x-2$ is the tangent to the function at $x=1$. –  Srivatsan Sep 4 '11 at 21:02