Finding the limit at $a$ of $\left(\frac{f\left(x\right)} {f\left(a\right)}\right)^{\frac{1}{g\left(x\right)}}$ 
Let $f,g$ be a pair of functions differentiable at $a$ such that $f\left(a\right),g'\left(a\right)\neq0$. Calculate
  $$\lim_{x\to a}\left(\frac{f\left(x\right)} {f\left(a\right)}\right)^{\frac{1}{g\left(x\right)}}$$
   (Separate to cases where $g\left(a\right)=0$ and $g\left(a\right)\neq0$)

I'm actually not even sure how to approach this. My intuition says that since the functions are differentiable at $a$ then they must be continuous at some $\delta$ around $a$, therefore I can take the limit "inside" and for the case of $g(a)=l\neq0$ get 
$$\lim_{x\to a}\left(\frac{f\left(x\right)} {f\left(a\right)}\right)^{\frac{1}{g\left(x\right)}}=
\left(\lim_{x\to a}\frac{f\left(x\right)} {f\left(a\right)}\right)^{\lim_{x\to a}\frac{1}{g\left(x\right)}}=1^{1/l}=1$$
But I'm not sure it's true and even if it is I really don't know how it helps me for $g(a)=0$ and how the fact the functions are differentiable is used...
 A: *

*Suppose $g(a)\neq 0$ and $f(a)\neq 0$; since $f$ and $g$ are continuous at $a$, there is a neighborhood $V_a$ of $a$ such that $f(x)\neq 0$ and $g(x)\neq 0$ for all $x\in V_a$ (I use this to be able to rewrite this in exponential form without having to worry about taking $\ln 0$). It's sufficient to look at this neighborhood and write
$$
\left(\frac{f\left(x\right)} {f\left(a\right)}\right)^{\frac{1}{g\left(x\right)}} = e^{ \frac{1}{g\left(x\right)}\ln \frac{f\left(x\right)} {f\left(a\right)}  }
$$
The expression in the exponent is continuous on $V_a$ (here, we use that $g\neq 0$ on $V_a$), so by continuity the limit at $a$ is 


$$
e^{ \frac{1}{g\left(a\right)}\ln \frac{f\left(a\right)} {f\left(a\right)}  } = e^{ \frac{1}{g\left(a\right)}\cdot 0  } = 1
$$


*

*Now, suppose $g(a) = 0$ and $f(a)\neq 0$; as before, we can have a neighborhood $V'_a$ where $f\neq 0$. The key now is to write
$$
e^{ \frac{1}{g\left(x\right)}\ln \frac{f\left(x\right)} {f\left(a\right)}  } = e^{ \frac{x-a}{g\left(x\right) - g(a)}\cdot \frac{1}{x-a}\ln \frac{f\left(x\right)} {f\left(a\right)}  } =
e^{ \frac{x-a}{g\left(x\right) - g(a)}\cdot \frac{\ln f(x) - \ln f(a)}{x-a}}
$$
and use the fact that $x\mapsto \ln f(x)$ is also differentiable at $a$ (can you see why?), with derivative $\frac{f^\prime(a)}{f(a)}$. Thus, you can take the limit "in the exponent" as before, since the first factor goes to $\frac{1}{g^\prime(a)}$ and the second to $\frac{f^\prime(a)}{f(a)}$, which are both well-defined.

