Infinite L'Hopital loop Consider a univariate continuous and differentiable function $f(x)$, such that $f(0)=0$. Additionally, it holds that
$$\frac{d f(x)}{d x}= a \left(\frac{f(x)}{x}\right)^b $$
where $a$ and $b$ are two real, positive constants.

An example of such function, and the one that motivated this question, is
$$ f(L) = A\left( B L^{\rho} + (1-B)K^{\rho} \right)^{\frac{1}{\rho}} $$
for a positive constant $K$, $L \geq 0$, and $\rho<0$ (the latter ensures that $f(0)=0$, which is computed using the limit). The notation correspondence between my function and the general one is $a=A^\rho B$ and $b=1-\rho$.

Say you want to find 
$$\lim_{x \rightarrow 0} \dfrac{d f(x)}{d x}  = \lim_{x \rightarrow 0} a \left(\frac{f(x)}{x}\right)^b$$
Because of the assumption $f(0)=0$, this derivative has an undefined expression inside the parenthesis, $\frac{0}{0}$. Thus, you want to use L'Hopital for this. But if you apply L'Hopital to the parenthesis, you get:
$$ \frac{\dfrac{d f(x)}{d x}}{1} $$
Thus, we end up where we started. In other words, we are in an infinite L'Hopital loop. How can we get around it?
Apparently the answer to this limit is $0$, but I fail to see who this is achieved.
PS: a fairly similar question asks for the solution for a particular $f(x)$. I want to know the solution for the general case.
 A: Suppose that $f\in C^1$, i.e., $f$ is differentiable and the derivative is continuous (this is a small additional assumption).  Moreover, we assume that $\frac{f(x)}{x}\geq0$ for all $x$ so we don't need complex numbers.  Then,
$$
f'(0)=\lim_{x\rightarrow 0}\frac{df(x)}{dx}=\lim_{x\rightarrow 0}a\left(\frac{f(x)}{x}\right)^b=a\left(\lim_{x\rightarrow 0}\frac{f(x)}{x}\right)^b.
$$
Since $f(0)=0$, this equals
$$
a\left(\lim_{x\rightarrow 0}\frac{f(x)-f(0)}{x}\right)^b.
$$
But, we observe that the limit is actually a derivative, so we get
$$
f'(0)=a(f'(0))^b.
$$
Therefore, $f'(0)$ is a root of the polynomial $at^b-t=t(at^{b-1}-1)$ if $b\not=1$ and $x(a-1)$ if $b=1$.  Therefore, if $b\not=1$, then either $f'(0)=0$ or $f'(0)=a^{\frac{1}{1-b}}$.  In the other case $(b=1)$, either $a=1$ as well or $f'(0)=0$.


*

*For example, in the case $a=1$ and $b=1$, then $f(x)=Kx$ satisfies the conditions and the derivative at $0$ is $K\not=0$.

*The constant zero function, $f(x)=0$ gives a case where $f'(0)=0$.

*And @MarkViola gives the function $f(x)=a^{\frac{1}{1-b}}x$ whose derivative at $0$ is $a^{\frac{1}{1-b}}$.
A: Let $f(x)$ satisfy the first order ordinary differential equation 
$$f'(x)-a\left(\frac{f(x)}{x}\right)^b=0\tag 1$$
with initial condition $f(0)=0$, where $a>0$ and $b>0$.


Note that in general $\left(\frac{f(x)}{x}\right)^b\notin \mathbb{R}$ unless $x f(x)\ge 0$. We proceed, therefore, under the assumption that $x\ge 0$ and $f(x)\ge 0$. 



CASE $(1)$: $\displaystyle b=1$

If $b=1$, then the general solution to $(1)$ with initial condition $f(0^+)=0$ is $f(x)=Cx^a$ for any value of $x\ge 0$.  

Note that the solution is not unique since $C$ is arbitrary.  Furthermore, we maintain the resriciton $x\ge 0$ since in general $f(x)$ is complex for $x<0$ (e.g. for $a=1/2$ and $x<0$, $f(x) =Cx^{1/2}=\pm iC\sqrt{|x|}$

Finally, we find that for $b=1$ 
$$f'(0^+)=\begin{cases}C&,a=1\\\\0&,a>1\\\\\text{sgn}(C)\,\infty&,0<a<1\end{cases}$$

If $b\ne 1$, then upon dividing both sides of $(1)$ by $(f(x))^b$ and integrating, we find the general solution of $(1)$ is given by
$$f(x)=(ax^{1-b}+C)^{1/{1-b}} \tag 2$$


CASE $(2)$: $\displaystyle 0<b<1$

If $0<b<1$, then the condition $f(0^+)=0$ requires that $C=0$ and we find
$$f(x)=a^{1/(1-b)}x \tag 3$$
Note that the solution given by $(3)$ is also valid for $x<0$.   
Finally, taking the derivative yields $f'(x)=a^{1/(1-b)}$ for all $x$ and hence for $0<b<1$
$$f'(0)=a^{1/(1-b)}$$


CASE $(3)$: $\displaystyle 1<b$

If $1<b$, then unless $C=0$, $f(x)$ is not defined, in general, on the reals since $x^{1/(1-b)}$ is not real in general.  Clearly for $x\ge 0$, $\lim_{x\to 0^+}f(x)=0$ when $b>1$.  So, $(2)$ is the general solution to $(1)$ for $b>1$ and $x\ge 0$.
Finally, we have for $b>1$
$$\begin{align}
f'(0^+)&=\lim_{h\to 0^+}\frac{f(h)}{h}\\\\
&=\lim_{h\to 0^+}\frac{(ah^{1-b}+C)^{1/{1-b}}}{h}\\\\
&=\lim_{h\to 0^+} a^{1/(1-b)}\left(1+\frac{Ch^{b-1}}{a}\right)^{1/(1-b)}\\\\
&=a^{1/(1-b)}
\end{align}$$


SUMMARY:

The general solution to $(1)$ with initial condition $f(0^+)=0$ is given by
$$f(x)=\begin{cases}
a^{1/(1-b)}x&,0<b<1, x\in \mathbb{R}\\\\
Cx^a&,b=1,x\ge 0\\\\
(ax^{1-b}+C)^{1/(1-b)}&,1<b, x\ge 0
\end{cases}$$
and the derivative at $0^+$ of $f(x)$ is given by
$$f'(0^+)=\begin{cases}
a^{1/(1-b)}&,b>0, b\ne 1\\\\
C&,b=1, a=1\\\\
0&,b=1,a>1\\\\
\text{sgn}(C)\,\infty&,b=1,0<a<1
\end{cases}$$
A: If(!) $f'(0)$ exists, then 
$$f'(0)=\lim_{x\to 0}\frac{f(x)-f(0)}{x-0}=\lim_{x\to 0}\frac{f(x)}{x} =\lim_{x\to 0}\left(\frac1af'(x)\right)^{1/b}=\left(\frac 1a\lim_{x\to 0}f'(x)\right)^{1/b}.$$
In particular, $\lim_{x\to 0}f'(x)$ must exist. But then this limit equals $f'(0)$ and we see that 
$$ f'(0)=\left(\frac1af'(0)\right)^{1/b}$$
and hence (if $b\ne 1$)
$$ f'(0)= \frac 1{a^{1/(b-1)}}.$$
