Spivak Calculus Chapter 10 problem 19 I have a question about Spivak's Calculus, chapter 10 problem 19. I feel I must be missing something very simple, but I don't know what it is.
Here is the question:


*Prove that if $f^{n}(g(a))$ and $g^{n}(a)$ both exist, then $(f \circ g)^{n}(a)$ exists. A little experimentation should convince you that it is unwise to seek a formula for $(f \circ g)^{n}(a)$. In order to prove that $(f \circ g)^{n}(a)$ exists you will therefore have to devise a reasonable assertion about $(f\circ g)^{n}(a)$ which can be proved by induction.

Here is my conjecture.
$\textbf{Conjecture}$. If $g^{n}(a)$ and $f^{n}(g(a))$ both exist, then $(f\circ g)^{n}(a)$ exists and is a sum of products of the form:
$$c[g{'}(a)]^{m_{1}}[g^{2}(a)]^{m_{2}} \dots [g^{n}(a)]^{m_{n}}f^{k}(g(a)) $$
where $c$ is a constant, $m_{1}, \dots , m_{n}$ are natural numbers, and $k$ is a natural number such that $k\leq n$.
The base case for $n=1$ is straightforward. If $g{'}(a)$ exists and $f{'}(g(a))$ exists, then the Chain Rule tells us that $(f\circ g)^{'}(a)$ exists and is equal to $g{'}(a)f{'}(g(a))$.  Thus, the conjecture holds for $n=1$ if we let $c=m_{1}=k=1$.
Next we assume:
$\textbf{Inductive Hypothesis}$ If $g^{n}(a)$ and $f^{n}(g(a))$ exist, then $(f\circ g)^{n}(a)$ exists and is a sum of products of the form:
$$c[g{'}(a)]^{m_{1}}[g^{2}(a)]^{m_{2}} \dots [g^{n}(a)]^{m_{n}}f^{k}(g(a)) $$
We now want to show: If $g^{n+1}(a)$ exists and $f^{n+1}(g(a))$ exists, then $(f\circ g)^{n+1}(a)$ exists and is a sum of products of the form (where $k\leq n+1$):
$$c[g{'}(a)]^{m_{1}}[g^{2}(a)]^{m_{2}} \dots [g^{n}(a)]^{m_{n}}[g^{n+1}(a)]^{m_{n+1}}f^{k}(g(a)) $$
I am confused about the answers that I have found in the solution book and on stack exchange here: Spivak Chapter 10, Exercise 19 solution verification. Prove that if $f^{(n)}(g(a))$ and $g^{(n)}(a)$ both exist, then $(f\circ g)^{(n)}(a)$ exists..
For the inductive step, the author shows that if $f^{n+1}(g(a))$ exists and $g^{n+1}(a)$ exist, then it follows that for all x in some interval around a, $f^{n}(g(x))$  and $g^{n}(x)$ both exist.  They then conclude from the Inductive Hypothesis that, in this interval, $(f\circ g)^{n}$ exists and is equal to a sum of products of the form:
$$c[g{'}(x)]^{m_{1}}[g^{2}(x)]^{m_{2}} \dots [g^{n}(x)]^{m_{n}}f^{k}(g(x)) $$
Here the author is not talking about $(f\circ g)^{n}$ at a single point a. Instead they are talking about $(f \circ g)^{n}(x)$ at all points in an interval around $a$. This the part that I don't understand. $\textbf{Why do we need to establish that $(f\circ g)^{n}(x)$ exists for all x in some interval around $a$?}$ Why can't we just say: If $g^{n+1}(a)$ exists, then $g^{n}(a)$ exists.  By the definition of $g^{n+1}$, we have:
$$g^{n+1}(a) = \lim_{h\to 0}\frac{g^{n}(a+h) - g^{n}(a)}{h}$$
So $g^{n}(a)$ must exist. Similarly, we know that $f^{n}(g(a))$ exists since:
$$f^{n+1}(g(a)) = \lim_{h\to 0}\frac{f^{n}(g(a) + h) - f^{n}(g(a))}{h}$$
So by the Inductive Hypothesis, it follows that $(f\circ g)^{n}(a)$ exists and is a sum of terms of products of the form:
$$c[g{'}(a)]^{m_{1}}[g^{2}(a)]^{m_{2}} \dots [g^{n}(a)]^{m_{n}}f^{k}(g(a)) $$
It is then easy to use the product, chain, and sum rules for the derivative to show that $(f\circ g)^{n+1}(a) is a sum of products that all have the required form.
 A: Suppose we have three functions $f$, $g$, and $h$ such that at a particular point $a$ we have
$$f(a) = cg(a) + kh(a),$$
where $c$ and $k$ are constants.
Suppose also that the functions $g$ and $h$ are each differentiable at $a$.
Is this enough to conclude
$$f'(a) = cg'(a) + kh'(a)?$$
What if we also know that
$$f(x) = cg(x) + kh(x),$$
for all $x$ in some interval containing $a$?
Keeping these ideas in mind, let's return to your concluding statement:

So by the Inductive Hypothesis, it follows that $(f\circ g)^{n}(a)$ exists and is a sum of terms of products of the form:
$$c[g{'}(a)]^{m_{1}}[g^{2}(a)]^{m_{2}} \dots [g^{n}(a)]^{m_{n}}f^{k}(g(a))$$
It is then easy to use the product, chain, and sum rules for the derivative to show that $(f\circ g)^{n+1}(a)$ is a sum of products that all have the required form.

Can you see the error here, and the utility of knowing that
$$(f\circ g)^{n}(x) = c[g{'}(x)]^{m_{1}}[g^{2}(x)]^{m_{2}} \dots [g^{n}(x)]^{m_{n}}f^{k}(g(x)),$$
for all $x$ in some interval around (and including) $a$?
A: Let's recall some definitions first:
Definition $1$: Interior point of a set $S\subset \mathbb R$:
An element $s\in S$ is said to be an interior point of $S$ if there exists an $r>0$ such that the open interval $(s-r,s+r)\subset S$. (i.e., there is an open interval (containing $s$) which is contained in $S$).
Definition $2$: Interior of a set $S\subset \mathbb R$:
The set of all interior points of $S$ is said to be interior of $S$. Let's denote this by $S^o$.
Let $D$ be a subset of $\mathbb R$ with non -empty interior.
Now, let's define derivative of a function $h:D  \to \mathbb R$ at $a\in D^o$:-
Definition $3$: We say that $h$ is differentiable at $a$ iff the the limit $\lim_{x\to a}\frac{h(x)-h(a)}{x-a}$ exists.
Remark: Note that the definition requires $a$ to be an interior point of domain of $h$.
 $(\circ )^{()}()$ $$?
This is to ensure that $(f\circ g)^{(n+1)}(a)$ makes sense by the definition above. By the remark after the definition, $a$ should be an interior point of domain of $(f\circ g)^{(n)}$, which by definition of an interior point means that there should be an $r>0$ such that $(a-r,a+r)\subset $ domain of $(f\circ g)^{(n)}$.
