Solving differential equation $af'(x)^2-f''(x)=0$ I want to solve the differential equation $$af'(x)^2-f''(x)=0$$ where $a $ is constant and we have the boundary conditions $f(0)=0, f (1)=c $ for some positive $c$.
If $a=0$ we get $f (x)=cx$ but what if $a\ne 0$. Could someone show how to solve this differential equation?

The differential equation can be written as
$$
\frac{f''(x)}{f'(x)^2} = a.
$$
Taking antiderivatives gives
$$
-\frac{1}{f'(x)} = ax + B,
$$
for some constant $B.$ Thus,
$$
f'(x) = -\frac{1}{ax+B}
$$
and taking another antiderivative gives
$$
f(x) = C - \frac{1}{a}\ln(ax+B)
$$
where $C$ is a constant.
Boundary condition $f(0)=0$ then gives
$$
0 = f(0) = C - \frac{1}{a}\ln(a\cdot 0+B) = C - \frac{1}{a}\ln B,
$$
i.e.
$$
C = \frac{1}{a}\ln B.
$$
Boundary condition $f(1)=c$ gives
$$
c = f(1) = C - \frac{1}{a}\ln(a\cdot 1+B) = \frac{1}{a}\ln B - \frac{1}{a}\ln (a+B) = \frac{1}{a}\ln\frac{B}{a+B},
$$
from which we can solve for $B$ and get
$$
B = \frac{a}{e^{-ac} - 1}.
$$
Thus we get the solution
$$
f(x) = \frac{1}{a}\ln \frac{a}{e^{-ac} - 1} - \frac{1}{a}\ln(ax+\frac{a}{e^{-ac} - 1}) \\
%= \frac{1}{a} \ln \frac{\frac{a}{e^{-ac} - 1}}{ax+\frac{a}{e^{-ac} - 1}}
= \frac{1}{a} \ln \frac{1}{x(e^{-ac} - 1)+1}.
$$
