Prove: $\frac{f(x+g(x))-f(g(x))}{x} \to f'(0)$ as x approaches $0$ I was given this question: Prove $$\frac{f(x+g(x))-f(g(x))}{x} \xrightarrow{x\to0} f'(0)$$  if $|g(x)|\le|x|$ and $f(x)$ is differentiable at zero.
There's a very similar question here: Prove $\lim_{x \rightarrow 0} \frac{f(x+g(x))-f(g(x))}{x}=f'(0)$
But in there f is differentiable everywhere, nevertheless here $g(x)\to 0$ and smaller than $x$, but I couldn't find a way to solve it as I can't use the mean value theorem, or say anything about $f'(x)$ without the definition.
 You can't use integrals in your answer because we haven't learned them yet in class.
Any help is greatly appreciated
 A: Given $\epsilon > 0$ there is a $\delta > 0$ such that
$$
 |f(x) - f(0) - xf'(0) | < \epsilon |x|
$$
for $|x| < \delta$.
Now choose $|x| < \delta/2$. Then $|g(x)|<\delta$ and $|x+g(x)| < \delta$, and therefore
$$
\left| \frac{f(x+g(x))-f(g(x))}{x}-f'(0)\right| \\
= \left| \frac{f(x+g(x))-f(0)-(x+g(x))f'(0)}{x}
- \frac{f(g(x))-f(0)-g(x)f'(0)}{x}\right| \\
\le  \frac{|f(x+g(x))-f(0)-(x+g(x))f'(0)|}{|x|}
+ \frac{|f(g(x))-f(0)-g(x)f'(0)|}{|x|} \\
\le \frac{\epsilon|x+g(x)|}{|x|}+ \frac{\epsilon|g(x)|}{|x|} \le 3 \epsilon \, .
$$
A: By differentiablity $f(a) = f(0) + f'(0)a + o(a)$ around $0$, we have $$f(x+g(x))=f(0) + f'(0)(x+g(x)) + o(x+g(x))$$ $$f(g(x))=f(0)+f'(0)g(x) + o(g(x))$$
Note that $o(g(x))=o(x)$ because $|g(x)|\le |x|$, therefore as $x\rightarrow 0$, $$\frac{f(x+g(x))-f(g(x))}{x} = \frac{f'(0)x+o(x)}{x}\rightarrow f'(0)$$
A: Recall: a sequence $(x_n)$ converges to $x$ if and only if each sub-sequence $(x_{n_k})$ has a sub-sub-sequence $(x_{n_{k_l}})$ converging to $x$.
Choose any sequence $(x_n)$ with $x_n \neq 0$ for all $n \in \mathbb{N}$ and $x_n \to 0$. Then choose any subsequence $(x_{n_k})$. By Bolzano-Weierstraß there is a convergent subsequence of $\frac{g(x_{n_k})}{x_{n_k}}$ with limit $y$, since $\left|\frac{g(x_{n_{k_l}})}{x_{n_{k_l}}} \right| \leq 1$. W.l.o.g. let $x_{n_{k_l}}+ g(x_{n_{k_l}}) \neq 0$ and $g(x_{n_{k_l}}) \neq 0$ for all $l \in \mathbb{N}$.
Write $\frac{f(x_{n_{k_l}} + g(x_{n_{k_l}})) -f(g(x_{n_{k_l}}))}{x_{n_{k_l}}} = \frac{f(x_{n_{k_l}}+g(x_{n_{k_l}}))-f(0)}{x_{n_{k_l}}+g(x_{n_{k_l}})}\frac{x_{n_{k_l}} + g(x_{n_{k_l}})}{x_{n_{k_l}}} - \frac{f(g(x_{n_{k_l}})) - f(0)}{g(x_{n_{k_l}})}\frac{g(x_{n_{k_l}})}{x_{n_{k_l}}} \to f'(0)(1+y)-f'(0)y = f'(0)$.
Since the sub-sequence $(x_{n_k})$ was arbitrarily chosen, $\frac{f(x_n + g(x_n)) -f(g(x_n))}{x_n} \to f'(0)$, so, as $(x_n)$ was arbitrary, $\frac{f(x+g(x)) - f(g(x))}{x} \to f'(0)$.
