When is a continuous function differentiable? I have been doing a lot of problems regarding calculus. An utmost basic question I stumble upon is "when is a continuous function differentiable?" (irrespective of whether its in an open or closed set).
 A: This is an old problem in the study of Calculus. Before the 1800s little thought was given to when a continuous function is differentiable. It was commonly believed that a continuous function is differentiable practically everywhere on its domain, except for a couple of obvious places, like the kink of the absolute value of $x$.
One obstacle of the times was the lack of a concrete definition of what a continuous function was. A formal definition, in the $\epsilon-\delta$ sense, did not appear until the works of Cauchy and Weierstrass in the late 1800s.
Weierstrass in particular enjoyed finding counter examples to commonly held beliefs in mathematics. His most famous example was of a function that is continuous, but nowhere differentiable: $$f(x) = \sum_{n=0}^\infty a^n \cos(b^n \pi x)$$ where $a \in (0,1)$, $b$ is an odd positive integer and $$ab > 1 + \frac32 \pi.$$
As an answer to your question, a general continuous function does not need to be differentiable anywhere, and differentiability is a special property in that sense.
On the other hand, if you have a function that is "absolutely" continuous (there is a particular definition of that elsewhere) then you have a function that is differentiable practically everywhere (or more precisely "almost everywhere").
A: Radamachers differentation theorem says that a Lipschitz continuous function $f:\mathbb{R}^n \mapsto \mathbb{R}$ is totally differentiable almost everywhere.
Beginning at page. 226 of  An introduction to measure theory by Terence tao, this theorem is explained.
A: Other example of functions that are everywhere continuous and nowhere differentiable are those governed by stochastic differential equations.  For example, let $X_t$ be governed by the process (i.e., the Stochastic Differential Equation)
$$dX_t=a(X_t,t)dt + b(X_t,t) dW_t \tag 1$$
where $W_t$ is a Wiener process and the functions $a$ and $b$ can be $C^{\infty}$.  Then it can be shown that $X_t$ is everywhere continuous and nowhere differentiable.  
To give an simple example for which we have a closed-form solution to $(1)$, let $a(X_t,t)=\alpha X_t$ and $b(X_t,t)=\beta X_t$.  Then, using Ito's Lemma and integrating both sides from $t_0$ to $t$ reveals that 
$$X_t=X_{t_0}e^{(\alpha-\beta^2/2)(t-t_0)+\beta(W_t-W_{t_0})}$$
The reason that $X_t$ is not differentiable is that heuristically, $dW_t \sim dt^{1/2}$.  Thus, the term $dW_t/dt \sim 1/dt^{1/2}$ has no meaning and, again speaking heuristically only, would be infinite.
Inasmuch as we have examples of functions that are everywhere continuous and nowhere differentiable, we conclude that the property of continuity cannot generally be extended to the property of differentiability.
