Answer: For every positive integer \(n\),
\(\displaystyle \frac{\mathrm d^n y}{\mathrm d x^n}=(-1)^{n-1}\frac{(n-1)!a^n}{(ax+1)^n}\).
We prove the formula by induction on \(n\).
Let \(P(n)\) be the statement
\(\displaystyle \frac{\mathrm d^n y}{\mathrm d x^n}=(-1)^{n-1}\frac{(n-1)!a^n}{(ax+1)^n}\), where \(y=\ln(ax+1)\).
Base case: \(n=1\).
Differentiate \(y=\ln(ax+1)\):
\(\displaystyle \frac{\mathrm dy}{\mathrm dx}=\frac{a}{ax+1}.\)
Now the formula for \(n=1\) gives
\(\displaystyle (-1)^{0}\frac{0!\,a^1}{(ax+1)^1}=\frac{a}{ax+1},\)
which matches. So \(P(1)\) is true.
Inductive step.
Assume \(P(k)\) is true for some positive integer \(k\), so
\(\displaystyle \frac{\mathrm d^k y}{\mathrm d x^k}=(-1)^{k-1}\frac{(k-1)!a^k}{(ax+1)^k}.\)
Differentiate both sides with respect to \(x\):
\(\displaystyle \frac{\mathrm d^{k+1}y}{\mathrm d x^{k+1}} = (-1)^{k-1}(k-1)!a^k \frac{\mathrm d}{\mathrm dx}\big((ax+1)^{-k}\big).\)
Using the chain rule,
\(\displaystyle \frac{\mathrm d}{\mathrm dx}\big((ax+1)^{-k}\big) = -k(ax+1)^{-k-1}\cdot a.\)
Hence
\(\displaystyle \frac{\mathrm d^{k+1}y}{\mathrm d x^{k+1}} = (-1)^{k-1}(k-1)!a^k\big(-ka(ax+1)^{-k-1}\big).\)
Simplifying,
\(\displaystyle \frac{\mathrm d^{k+1}y}{\mathrm d x^{k+1}} = (-1)^k k! a^{k+1}(ax+1)^{-(k+1)}.\)
So
\(\displaystyle \frac{\mathrm d^{k+1}y}{\mathrm d x^{k+1}} = (-1)^k\frac{k!a^{k+1}}{(ax+1)^{k+1}},\)
which is exactly the required formula with \(n=k+1\).
Therefore, by mathematical induction, for every positive integer \(n\),
\(\displaystyle \frac{\mathrm d^{n} y}{\mathrm d x^{n}}=(-1)^{n-1} \frac{(n-1)!a^{n}}{(ax+1)^{n}}.\)