I want to find the total derivative of the function $f: \mathbb R^n \to \mathbb R^n$, $f(x)=\frac{x}{|x|}$
If I was to copy what the teacher taught, I should find the limit of $\lim_{t \to 0} \frac{f(a+th)-f(a)}{t}$ but I don't know how to find that limit.
$$\lim_{t \to 0} \frac{f(a+th)-f(a)}{t}=\lim_{t \to 0} \frac{\frac{a+th}{|a+th|}-\frac{a}{|a|}}{t}$$
what now?
For all $x\neq 0\in\mathbb R^n$ the function $f$ is differentiable at $x$, i.e. $$f(x+th)-f(x)=\langle \nabla f(x),th\rangle+O(t^2), $$ for all $t\in \mathbb R$ and $h\in \mathbb R^n$ s.t. $x+th\neq 0$, as the partial derivatives $\partial_i f(x)$ exist and are continuous in suitable open neighborhoods $U$ of $x$; this is show by their explicit formulae, i.e. $$\partial_i f(x):=\frac{\partial f}{\partial x_i}(x)=\frac{e_i}{\|x\|}-\frac{x_i}{\|x\|^3}x. $$ We denote by $e_i=(0,\dots,0,i,0,\dots,0)$ the $i$-th versor in $\mathbb R^n$.
Then $$f(x+th)-f(x)=\frac{t}{\|x\|}\langle e_i,h\rangle- \frac{t x_i}{\|x\|^3}\langle x,h\rangle +O(t^2), $$ which, in the limit $t\rightarrow 0$ gives
$$D_hf(x):=\lim_{t\rightarrow 0}\frac{f(x+th)-f(x)}{t}=\frac{h_i}{\|x\|}- \frac{x_i\langle x,h\rangle}{\|x\|^3}. $$