Check differentiability of function in $x_0 = 0$ Check differentiability of function in $x_0 = 0$.
Let $f: \mathbb{R} \to \mathbb{R},\quad  f(x) =
 \begin{cases} 
 \begin{align}
      0  \qquad  &,  x < 0\\
      \sin x \qquad &, x \ge 0 \\
\end{align}   
\end{cases}
 $
I think that the function is differentiable in $0$. How can I show that (I have to use the difference quotient)?
What I have done so far: 
$\begin{align}\lim_{h\to 0}\frac{f(x_0+h) - f(x_0)}{h} &= \lim_{h \to 0}\frac{\sin(x_0 + h) - \sin(x_0)}{h} \\
 &= \lim_{h \to 0}\frac{\sin(0+h) - \sin(0)}{h} = \lim_{h \to 0}\frac{\sin(h)}{h} \\
&= \lim_{h \to 0} \frac{\sum_{n=0}^{\infty}\frac{h^{2n+1}}{(2n+1)!}}{h} =  \lim_{h \to 0} \frac{\sum_{n=0}^{\infty}\frac{h^{2n}h}{(2n+1)!}}{h}\\
&= \lim_{h \to 0}\sum_{n=0}^{\infty}\frac{h^{2n}}{(2n+1)!}
\end{align} \\
$
How could I go on ?
 A: 
What I have done so far:
$$\lim_{h\to 0}\frac{f(x_0+h) - f(x_0)}{h} = \lim_{h \to 0}\frac{\color{red}{\sin(x_0 + h)} - \sin(x_0)}{h} $$

Careful: since $x_0=0$, you can only replace $f(x_0+h)=f(h)$ by $\sin(x_0 + h)=\sin h$ if $h \ge 0$, by the definition of $f$. Therefore the equality above is only valid for the right-hand limit where you have $h \to 0^+$. You should look at $h>0$ and $h<0$ separately.

For $f$ to be differetiable in $x_0=0$, you want to show the existence of the limit:
$$\lim_{h \to 0}\frac{f(x_0+h)-f(x_0)}{h}=\lim_{h \to 0}\frac{f(h)-f(0)}{h}$$
For $h<0$, you have $f(h)=0$ so the left-hand limit becomes:
$$\lim_{h \to 0^-}\frac{f(h)-f(0)}{h} = \lim_{h \to 0^-}\frac{0}{h}=0$$
But for $h>0$, you have $f(h)=\sin h$ and for the right-hand limit you arrive at:
$$\lim_{h \to 0^+}\frac{f(h)-f(0)}{h} = \lim_{h \to 0^+}\frac{\sin h}{h}$$
I would guess that you know this (standard) limit (and avoid series...?):
$$\lim_{h \to 0}\frac{\sin h}{h}=1$$
A: After reaching the final step where you can simply substitute 0 for h in the expression so as to get 
$$\begin{align}\lim_{h\to 0}\frac{f(x_0+h) - f(x_0)}{h} &= \frac{1}{1!} \end{align}$$
A: *

*First method:
The function is $C^{\infty}$ in $(-\infty;0)$ and in $(0;\infty)$. Thus, if the derivative exist at $0$, it is $\lim_{x \to 0} f'(x)=k$. This means: $\lim_{x \to 0^+}f'(x)=\lim_{x \to 0^-}$. Substituting the derivative, we obtain: $\lim_{x \to 0^+} \cos(x)=1\neq 0=\lim_{x \to 0^-} 0$. 
Thus $f \notin C^1(0)$

*Second method:
Going on with your computation, we have:
$\lim_{h \to 0} \sum_{n=0}^{\infty}\frac{h^{2n}}{(2n+1)!}=\lim_{h \to 0} h^0+h\sum_{n=1}^{\infty} \frac{h^{n-1}}{(2n+1)!}=1+0=1$
On the other side, the function is constant for $x<0$, and thus has derivative 0. $f'^+(0)\neq f'^-(0)$, and so the function is not differentiable at $x=0$ (As StackTD noticed in his answer, your computation can be easily simplified by observing that $\sin(h)/h$ has an eliminable discontinuity at $0$, and the limit is quite known)


In conclusion, the function is not differentiable at $0$
A: The function $$f: \mathbb{R} \to \mathbb{R},\quad  f(x) =
 \begin{cases} 
 \begin{align}
      0  \qquad  &,  x < 0\\
      \sin x \qquad &, x \ge 0 \\
\end{align}   
\end{cases}$$ is not differentiable at $x=0$.
The limit from the right of difference quotient is $1$  $$lim_{h\to 0^{+}} \frac {f(x_0+h) - f(x_0)}{h} =  lim_{h\to 0^{+}} \frac {sin(h)}{h}=1$$ While the left limit is $0$ $$lim_{h\to 0^{-}} \frac {f(x_0+h) - f(x_0)}{h} = lim_{h\to 0^{-}} \frac {0 - 0}{h}=       0$$ Thus the limit $$lim_{h\to 0} \frac{f(x_0+h) - f(x_0)}{h}$$ does not exist. 
