Solution:
$(2 x+1)^{2} \frac{d^{2} y}{d x^{2}}-2(2 x+1) \frac{d y}{d x}-12 y=6 x----------(1)$
Put $(2 x+1)=e^{z} \quad \Rightarrow \quad x=\frac{e^{x}-1}{2}$
$\begin{array}{ll}{\frac{d z}{d x}=\frac{2}{(2 x+1)}} & {\text { but } \frac{d y}{d x}=\frac{d y}{d z} \frac{d z}{d x}=2 \frac{d y}{d z}=\frac{2}{(2 x+1)} D y} \\ {\therefore(2 x+1) \frac{d y}{d x}=2 D y}\end{array}$
$\therefore(2 x+1)^{2} \frac{d^{2} y}{d x^{2}}=2^{2} D(D-1) y$
From $(1),$
$4 D(D-1) y-4 D y-12 y=6\left(\frac{e^{z}-1}{2}\right)$
$\left(4 D^{2}-8 D-12\right) y=3\left(e^{z}-1\right)$
$\begin{aligned} \text { For complementary solution, } \\ \left(4 D^{2}-8 D-12\right)=0 \\ \therefore D =-1,3 \end{aligned}$
For particular integral,
$y_{p}=\frac{1}{f(D)} X$
$y_{p}=\frac{1}{4 D^{2}-8 D-12}\left(3\left(e^{z}-1\right)\right)$
$\therefore y_{p}=\frac{3}{4} \frac{1}{D^{2}-2 D-3}\left(e^{z}-1\right) \quad$ put $D=a=1$ and $D=a=0$
$\therefore y_{p}=\frac{3}{4}\left(\frac{1}{3}-\frac{e^{z}}{4}\right)$
The general solution of given differential eqn is
$\quad \therefore y_{g}=y_{c}+y_{p}=c_{1} e^{-z}+c_{2} e^{3 z}+\frac{3}{4}\left(\frac{1}{3}-\frac{e^{z}}{4}\right)$
Resubstituting $z$
$\therefore y_{g}=c_{1}(2 x+1)^{-1}+c_{2}(2 x+1)^{3}+\frac{3}{4}\left(\frac{1}{3}-\frac{(2 x+1)}{4}\right)$