Check if a Function is Differentiable at a Point 
Let 
  $$f(x)=
\begin{cases}
x+1 & x\leq0 \\
3^{-x} & x>0
\end{cases}$$
Is the function differentiable at $x=0$?

I should look at the limits $$\lim_{h\to 0-} \frac{x+h+1-(x+1)}{h}$$
and $$\lim_{h\to 0+} \frac{3^{-(x+h)}-3^{-x}}{h}$$
What would I do if the point was for example $x=3$?
 A: HINT:  in general a function say $y=f(x)$ is said to be differentiable at any point $x=a$ iff $$\text{left hand derivative}=\text{right hand derivative}$$  $$\lim_{h\to 0^- }\frac{f(a+h)-f(a)}{h}=\lim_{h\to 0^+ }\frac{f(a+h)-f(a)}{h}$$
or $$\lim_{h\to 0 }\frac{f(a-h)-f(a)}{h}=\lim_{h\to 0 }\frac{f(a+h)-f(a)}{h}$$
A: You get then 
$$\lim_{h\to 3^-} \frac{3^{-(x+h)}-3^{-x}}{h}$$
$$\lim_{h\to 3^+} \frac{3^{-(x+h)}-3^{-x}}{h}$$
However, it is a known fact that $g(x)=3^{-x}$ is differentiable for all $x$ and since $f(x)=g(x)$ for all $x$ in the neighbourhood of 3, you can also say that $f$ is differentiable for $x=3$.

There is however a reason why $x=0$ is interesting specifically. At $x=0$, two completely different functions meet and form one function. This sometimes causes that the function is not differentiable, or not even continuous.
A: Plug in the value (0 or 3) into whatever you got in evaluating those limits.
A: You can directly apply the definition of derivative by replacing $x$ with $3$.
The meaning of using $x$ is to convey that you can find the derivative at any general point!
To find the right derivative you can use L'Hopitals rule and see whether the the left and right hand derivatives are equal and then say whether the derivative exist or not.
A: Notice:


*

*$$\lim_{h\to0^-}\frac{x+h+1-(x+1)}{h}=\lim_{h\to0^-}\frac{x+h+1-x-1}{h}=\lim_{h\to0^-}1=1$$

*$$\lim_{h\to0^+}\frac{3^{-(x+h)}-3^{-x}}{h}=\lim_{h\to0^+}\frac{3^{-h-x}-3^{-x}}{h}=\lim_{h\to0^+}\frac{3^{-h-x}\left(1-3^h\right)}{3^{-h-x}\left(3^{h+x}h\right)}=$$
$$\lim_{h\to0^+}\frac{3^{-h-x}\left(1-3^h\right)}{h}=\lim_{h\to0^+}\frac{\frac{\text{d}}{\text{d}h}\left(3^{-h-x}\left(1-3^h\right)\right)}{\frac{\text{d}}{\text{d}h}\left(h\right)}=\lim_{h\to0^+}-\frac{\ln(3)3^{-x}}{\ln(3)h+1}=$$
$$-\frac{\ln(3)3^{-x}}{\ln(3)\cdot0+1}=-\ln(3)3^{-x}=-\frac{\ln(3)}{3^x}$$

