Solution (source code)

= Solution

Write $F(x)=\ln(e^{ax}-b)$. Direct <differentiation>, using the <chain rule>, gives
$$
F'(x)=\frac{ae^{ax}}{e^{ax}-b},\qquad F''(x)=-\frac{a^2be^{ax}}{(e^{ax}-b)^2}.
$$
The stated parameter restrictions ensure that the <logarithm> is defined near $x=1$, and that $F'(1)>0$ and $F''(1)<0$. With $h=x-1$, the <Taylor series> begins
$$
F(1+h)=\ln(e^a-b)+\frac{ae^a}{e^a-b}h-\frac{a^2be^a}{2(e^a-b)^2}h^2+O(h^3).
$$
If $e^a-b\ne1$, the constant term is nonzero, and the first two nonzero terms are
$$
\boxed{\ln(e^a-b)+\frac{ae^a}{e^a-b}(x-1)+O((x-1)^2).}
$$
This covers both $a>\ln(1+b)$ and $0<a<\ln(1+b)$; the constant term is respectively positive or negative.

If $a=\ln(1+b)$, which is possible precisely with $0<a<\ln2$ and $b=e^a-1$, the constant term vanishes. The first two nonzero terms are then
$$
\boxed{a(1+b)(x-1)-\frac{a^2b(1+b)}2(x-1)^2+O((x-1)^3).}
$$
No further case is needed, since the linear and quadratic coefficients cannot vanish under the given restrictions. All remainders use <Big O notation>.