Proving the differentiablity of a function. Consider the differentiablity of the following function:
$$f(x)=x\left(x+3\right)e^{-\frac{x}{2}}$$
My text proves the differentiability by taking 'Left Hand Derivative' and 'Right Hand Derivative' and proving them equal.
But can't we do it by taking the differentiation (i.e)
$$\frac{e^{-\frac{x}{2}}\left(-x^2+x+6\right)}{2}=\frac{e^{-\frac{x}{2}}}{2}\left(3-x\right)\left(x+2\right)$$
And proving the above to be continuous throughout the given domain?
 A: The direct answer to your question is no. The proof of continuity of $\frac{d}{dx}f(x)$ at point $c$, does not imply that $f(x)$ is differentiable at point $c$. Further more, you must first prove that $f(x)$ is differentiable before worrying about the continuity of $\frac{d}{dx}f(x)$. Continuity does not imply differentiability.
You may be confused with the fact that if $f(x)$ is differentiable at point $c$, then $f(x)$ is in fact continuous at point $c$. This does not always work in reverse.
Here is how you can show that $f(x)$ is differentiable 
The function $a:\mathbb{R}\to\mathbb{R}$ defined by $a(x)=x(x+3)=x^2+3x$ is differentiable at every $c\in\mathbb{R}$ with the derivative $\frac{d}{dx}a(x)=2x+3$, since
$$
\frac{d}{dx}a(c)=\lim_{h\to 0} \left[\frac{(c+h)^2+3(c+h)-c^2-3c}{h}\right]=\lim_{h\to 0} \left[\frac{c^2+2ch+h^2+3c+3h-c^2-3c}{h}\right]
$$
$$
=\lim_{h\to 0} \left[\frac{2ch+h^2+3h}{h}\right]=\lim_{h\to 0} \left[2c+h+3\right]= 2c+3
$$
The function $b:\mathbb{R}\to\mathbb{R}$ defined by $b(x)=e^{-\frac{x}{2}}=\frac{1}{\sqrt{e^x}}$ is differentiable at every $c\in\mathbb{R}$ with the derivative $\frac{d}{dx}b(x)=-\frac{1}{2}e^{-\frac{x}{2}}=-\frac{1}{2\sqrt{e^x}}$, since
$$
\frac{d}{dx}b(c)=\lim_{h\to 0} \frac{\frac{1}{\sqrt{e^{c+h}}}-\frac{1}{\sqrt{e^c}}}{h}=\lim_{h\to 0} \left[\frac{1}{h\sqrt{e^c}\sqrt{e^h}}-\frac{1}{h\sqrt{e^c}}\right]
$$
$$
=\frac{1}{\sqrt{e^c}}\lim_{h\to 0} \left[\frac{1}{h\sqrt{e^h}}-\frac{1}{h}\right]=\frac{1}{\sqrt{e^c}}\lim_{h\to 0} \left[\frac{1-\sqrt{e^h}}{h\sqrt{e^h}}\right]=\frac{1}{\sqrt{e^c}}\lim_{h\to 0} \left[\frac{\frac{d}{dh}\left[1-\sqrt{e^h}\right]}{\frac{d}{dh}\left[h\sqrt{e^h}\right]}\right]
$$
$$
=\frac{1}{\sqrt{e^c}}\lim_{h\to 0} \left[\frac{-\frac{\sqrt{e^h}}{2}}{(h+2)\frac{\sqrt{e^h}}{2}}\right]=-\frac{1}{\sqrt{e^c}}\lim_{h\to 0} \left[\frac{1}{h+2}\right]=-\frac{1}{2\sqrt{e^c}}
$$
Since $f(x)=a(x)\cdot b(x)=(x^2+3x)e^{-\frac{x}{2}}$ and both $a(x)$ and $b(x)$ are differentiable at every $c\in\mathbb{R}$, then $f(x)$ is also differentiable at every $c\in\mathbb{R}$.
A: it is the product of three differentiable functions, namely $x,x+3,e^{-x/2}$.
