# Is this proof that $g$ is continuous correct?

I have proved that $g$ is continuous on $(0,2)$ and I just wish to check if my solution for $g$ being right continuous at $0$ and hence continuous at $0$ is correct.

$$\lim\limits_{x \to 0^+}g(x) = \lim\limits_{x \to 0^+} \frac{f(0)-f(2x)}{0-2x}= \lim\limits_{x \to 0^+} \frac{f(x)-f(0)}{x-0}=f'(0)$$

Using the fact that $f$ is differentiable, hence $f'_+(0)=f'(0)$

I switched the $2x$ for an $x$ because for small $x$ they're basically the same.

While your working is more or less correct, I think you could probably be a little more thorough than saying $x$ and $2x$ are "basically the same". Depending on how rigorous you want to be, you might like to use a $\epsilon$-$\delta$ method, but you can also easily use the chain rule. Define $F(x):=f(2x)$. Then $F$ is differentiable and $F'(x)=2f'(2x)$. Then we have $$\lim_{x\to0^+}\frac{f(0)-f(2x)}{0-2x}=\frac12\lim_{x\to0^+}\frac{F(x)-F(0)}x=\frac12F'(0)=f'(0).$$ You can do something similar for the right limit. Define $G(x):=f(2x-2)$. Again, $G$ is differentiable with $G'(x)=2f'(2x-2)$. So $$\lim_{x\to2^-}\frac{f(2x-2)-f(2)}{(2x-2)-2}=\frac12\lim_{x\to2^-}\frac{F(x)-F(2)}{x-2}=\frac12F'(2)=f'(4-2)=f'(2).$$

Your solution is correct in principle. It could, however, do with some additional justification and/or explanation.

For example, you could say:

Since $a(x) = 0$ and $b(x) = 2x$ for $0 \le x < 1$, it follows that $$\lim_{x \to 0^+} g(x) = \lim_{x \to 0^+} \frac{f(0)-f(2x)}{0-2x}$$

It depends on how you define $\lim$ whether you can improve on the intuitive leap of swapping $2x$ for $x$. In general, you can prove the following theorem:

Let $h: I \to \Bbb R$ be a continuous function, where $I$ is an open interval, and let $a \in I$. Let $k$ be a function such that $\lim\limits_{x \to h(a)} k(x)$ exists. Then: $$\lim_{x\to a} k(h(x)) = \lim_{x \to h(a)} k(x)$$

where in our present case, $h(x) = 2x$ and $k(x) = \dfrac{f(0)-f(x)}{0-x}$ has a limit at $h(0) = 0$ by virtue of $f$ being differentiable.

However, if you haven't been given a mathematically precise definition of limits (like the $\epsilon$-$\delta$ definition), then proving this type of "obvious" theorem will always feel a little shaky, and you're probably fine justifying this step in your proof in an informal way.

It looks alright to me but perhaps at this level one should explain why you take $a(x)=0$ and $b(x)=2$ and why is $2x$ and $x$ basically the same when working with limits around 0.