Find function with inequality for derivative 
Let $C\geq 2$ and $L>0$. Does there exist $g \in C^1([0,L])$ such that
  \begin{equation*}
g(x)>0, \qquad g'(x)>0, \qquad g'(x) > (g(L) - g(x))C
\end{equation*}
  holds for any $x \in [0,L]$? How large can the length $L$ of the interval be chosen?

First example: if 
\begin{equation*}
g(x) = ax + b
\end{equation*}
with $a, b>0$, then $$g'(x) > (g(L) - g(x)) C$$ is equivalent to $L < \frac{1}{C}$.
Second example: let $f \colon [0,L] \rightarrow [\varepsilon, \frac\pi2]$ be defined by 
\begin{equation*}
f(x) = \frac{\pi x}{2L} + \varepsilon \Big(1 - \frac{x}{L}\Big). 
\end{equation*}
Then, if we choose 
\begin{equation*}
g(x) = -\cot(f(x)) + \cot(\varepsilon) + \delta
\end{equation*}
with $\delta>0$ and $\varepsilon \in (0, \frac\pi2)$, we have $$g'(x) = \Big(\frac{\pi}{2} - \varepsilon\Big) \frac{1}{L \sin^2(f(x))},$$ while $$g(L) - g(x) = \cot(f(x)).$$ Hence $g'(x) > (g(L) - g(x)) C$ is equivalent to $L < \frac{\pi - 2\varepsilon}{C}$.
But is there a function $g$ allowing $L$ to be larger?
 A: You can directly solve the last inequality by applying an integrating factor $e^{Cx}$ to get
$$
\frac{d}{dx}\Bigl(e^{Cx}\bigl(g(x)-g(L)\bigr)\Bigr)=e^{Cx}[g'(x)-(g(L)-g(x))C]\ge\epsilon>0,
$$
The $ϵ>0$ occurs because any positive function over a compact interval $[0,L]$ has a positive minimum.
This can now be integrated to get another condition for the function values
$$
e^{Cx}(g(x)-g(L))- e^{C\cdot0}(g(0)-g(L))\ge ϵx\implies g(x)\ge g(L)-e^{-Cx}(g(L)-g(0)-ϵx)
$$
Selecting the equality gives a solution for any choice of the parameters $C,L,g(0),g(L)$ with only the restriction $g(L)>g(0)>0$, equality at $x=L$ then requires $ϵ=\frac{g(L)-g(0)}{L}$. The resulting function is
$$
g(x)=g(L)-e^{-Cx}\left(1-\frac xL\right)(g(L)-g(0))
$$
It is easy to check that this construction also satisfies the first two inequalities, as $e^{-Cx}$ and $1-\frac xL$ are inside $[0,1]$ so that values of $g$ raise from $g(0)$ to $g(L)$ monotonically. As a strictly growing differentiable function, the derivative $g'$ is also positive.
A: Let be $f_{\alpha} :x \mapsto \exp(\alpha x)$.
We already have $f_{\alpha} > 0$ for all $\alpha$, for all non negative $\alpha$, we have: $f_{\alpha}' > 0$.
Now, let us look for a $\alpha$ which satisfies the last condition, for any $L$ chosen.
Let us fix some $L, C$ as in your statement and fix some $\alpha > 0$, we denote $f = f_{\alpha}$ now.
\begin{align*}
\forall x \in [0, L], f'(x) > \dfrac{f(L) - f(x)}{C} & \iff \forall x \in [0, L], Cf'(x) - f(L) - f(x) > 0 \\
& \iff \forall x \in [0, L], (C\alpha - 1) f(x) - f(L) > 0 \\
& \iff \forall x \in [0, L], (C\alpha - 1) f(x)/f(L) > 1 \\
& \iff \forall x \in [0, L], (C\alpha - 1) f(x - L) > 1 \\
& \iff \forall x \in [0, L], f(x - L) > (C\alpha - 1)^{-1} \\
& \iff \forall x \in [0, L], \alpha (x - L) > -\ln(C\alpha - 1) \\
& \iff \forall x \in [0, L], \alpha (L - x) < \ln(C\alpha - 1)
\end{align*}
This series of conditions requires that $C\alpha - 1$ is positive, we can impose: $\alpha > 1/C \quad (**)$.
Let us look now at $g : x \mapsto \alpha(L - x) - \ln(C\alpha - 1)$, its derivative is $g' : x \mapsto -\alpha$.
Thus, it is always non increasing, thus: $\forall x \in [0, L], g(x) \leq g(0) = \alpha L - \ln(C\alpha - 1)$.
It suffices: $g(0) < 0$.
Thus, let's solve for $\alpha > 0$: $\alpha L < \ln(C\alpha - 1)$, for example, let's take the $\exp$: $\exp(\alpha L) < C \alpha - 1 \quad (*)$.
We only need one $\alpha$.
Let us denote $h : \alpha \mapsto e^{\alpha L} - C\alpha + 1$, its derivative $h' : \alpha \mapsto Le^{\alpha L} - C$.
Thus: $\forall \alpha > 0, h'(\alpha) \leq 0 \iff \alpha \leq \dfrac{1}{L} \ln \dfrac{C}{L} = \beta_{C,L}$.
Now, we know that: $h$ is non decreasing over $]0, \beta_{C,L}]$ then increasing over $[\beta_{C,L], +\infty[$.
Thus, it has a minimum reached at $\beta_{C,L}$, if this minimum verifies $(*)$ and $(**)$ and do not contradict our assumptions over $\alpha$, we have won.
\begin{align*}
A_{C,L} & = h\left(\dfrac{1}{L} \ln \dfrac{C}{L}\right) \\
& = \dfrac{C}{L} - \dfrac{C}{L} \ln \dfrac{C}{L} + 1 \\
& = \dfrac{C}{L}\left(1 + \ln \dfrac{L}{C}\right) + 1
\end{align*}
Now: 
\begin{align*}
A_{C,L} < 0 \iff \ln \dfrac{L}{C} < \dfrac{L}{C} - 1
\end{align*}
We could again introduce $j : x \mapsto \ln x - x + 1$ and look at its derivative and find whether we have to impose conditions over $L/C$.
But, in fact, it's well-known that $\ln(1 + x) \leq x$ for all $x$ such that $1 + x > 0$, now, plug it: $x - 1$ and you get: $\ln(x) \leq x - 1$.
The sole issue is, can we have $\ln(x) = x - 1$? Well, by studying $j$, you will see that $1$ is the only solution, that is: $\dfrac{L}{C} = 1$.
Assuming $\dfrac{L}{C} \neq 1$, we can confirm that $\beta_{C,L}$ verifies $(*)$.
For $(**)$ :
\begin{align*}
\beta_{C,L} > \dfrac{1}{C} & \iff \dfrac{C}{L} \ln \dfrac{C}{L} > 0 \\
& \iff \ln \dfrac{C}{L} > 0 \text{ and } C \neq 0 \\
& \iff \dfrac{C}{L} > 1 \\
& \iff C > L
\end{align*}
Finally, $f_{\beta_{C,L}}$ lets you choose $L$ as you want.
Let be $u > 0$, let us look at $f_{\beta_{u,u}} : x \mapsto \exp(\beta_{u,u} x)$, but: $\beta_{u,u} = 0$, thus: $f_{\beta_{u,u}} : x \mapsto 1$, in other cases: $f_{\beta_{L,C}} : x \mapsto \left(\dfrac{C}{L}\right)^{x/L}$ is the solution we were looking at.
Now, $L$ could be as large as you wish, as long as you respect the condition on $C$.
You can go further and consider another family of solutions, depending on what you're looking at.
