# Composition of Lipschitz and differentiable functions is also differentiable

The proposition that I'm trying to prove is:

Let $f:U\rightarrow \mathbb R^n$ be Lipschitz defined on $U\subset \mathbb R^m$ an open set and $a\in U$. Let $g:V\rightarrow \mathbb R^p$ differentiable in the open set $V\subset \mathbb R^m$ with $f(U)\subset V$, and $b=f(a)$. If $g'(b)=0$, then $g\circ f:U\rightarrow \mathbb R^p$ is differentiable in $a$, and $(g\circ f(a))'=0$.

I've tried to prove by the definition, i.e., that $g\circ f(a+v)=g\circ f(a)+(g\circ f(a))'v+r(v)$, with $\lim_{v\rightarrow0}\frac{r(v)}{|v|}=0$.

So what I got is $\frac{r(v)}{|v|}=\frac{g( f(a+v))-g( f(a))}{|v|}$, I don't know how to solve this limit, I've tried to use the Lipschitz condition to change $|v|$ to $|f(a+v)-f(a)|$, and get $k\frac{g( f(a+v))-g( f(a))}{|f(a+v)-f(a)|}$, $k$ the Lipschitz constant, but I can't go further. Any tips?

If $f(a+v)=f(a)$ then $r(v)=0$. If $f(a+v)\ne f(a)$, then $$\left\vert\frac{r(v)}{|v|}\right\vert=\left\vert\frac{g(f(a+v)-g(f(a))}{|f(a+v)-f(a)|}\right\vert\frac{|f(a+v)-f(a)|}{|v|}\le k \frac{\vert g(f(a+v)-g(f(a))\vert}{|f(a+v)-f(a)|}.$$ Using the fact that $g'(b)=0$ you have that $\frac{\vert g(y)-g(b)\vert}{|y-b|}\le\varepsilon$ whenever $|y-b|\le \delta$. Now, since $f$ is continuous, $f(a+v)\to f(a)=b$ when $v\to 0$ and so you can find $\eta>0$ such that if $|v|\le\eta$, then $|f(a+v)-b|\le \delta$. In turn, $$\frac{\vert g(f(a+v)-g(f(a))\vert}{|f(a+v)-f(a)|}\le \varepsilon.$$