In the expansion of \[\frac{1+3x}{(1+ax)^2}\] in ascending powers of \(x\), the coefficient of \(x\) is zero. Find the value of the constant \(a\),

We first need to find an expansion for the denominator using the standard binomial expansion.

The binomial theorem says that, if \(|x| < 1\), then \[ (1+x)^r = 1 + rx + \frac{r(r-1)}{2!} x^2 + \frac{r(r-1)(r-2)}{3!} x^3 + \dotsb \]

In our case, \(r=-2\) and we have \(ax\) in place of \(x\), so \[\begin{align*} (1+ax)^{-2} &= 1 -2ax + \frac{-2(-3)}{2!}(ax)^2 + \frac{-2(-3)(-4)}{3!} (ax)^3 + \dotsb \\ &=1-2ax+3a^2x^2-4a^3x^3 +\dotsb \end{align*}\]

The term in \(x\) of the expansion of \(\dfrac{1+3x}{(1+ax)^2}\) comes from \(1 \times (-2ax) + 3x \times 1\). If the coefficient is zero then we know that \(3-2a=0\) so \(a=\dfrac{3}{2}\).

…and, when \(a\) has this value, obtain the expansion up to and including the term in \(x^3\).

Multiplying by the numerator we get \[\frac{1+3x}{(1+ax)^2} = 1 + (3-2a)x+(3a^2-6a)x^2+(9a^2-4a^3)x^3+ \dotsb \] and substituting for \(a\) we get \[\frac{1+3x}{(1+\frac{3}{2}x)^2}=1-\frac{9}{4}x^2+\frac{27}{4}x^3 \quad\text{ up to and including the term in } x^3.\]

Note that the condition for the expansion to be valid is \(\big|ax\big|<1\) which means that \(\big|x\big|<\frac{2}{3}\).