<s>[INST] Solve for $y$ in $\frac{dy}{dx}-\frac{3y}{2x+1}=3x^2$ I saw a challenge problem on social media by a friend, solve for $y$ in $$\frac{dy}{dx}-\frac{3y}{2x+1}=3x^2$$
I think this is an integration factor ODE
$$\frac{1}{{(2x+1)}^{\frac{3}{2}}} \cdot \frac{dy}{dx}-\frac{3y}{{(2x+1)}^{\frac{5}{2}}}=\frac{3x^2}{{(2x+1)}^{\frac{3}{2}}}$$
Is this correct?
$$\left(\frac{y}{{(2x+1)}^{\frac{3}{2}}} \right)'=\frac{3x^2}{{(2x+1)}^{\frac{3}{2}}}$$
$$\left(\frac{y}{{(2x+1)}^{\frac{3}{2}}} \right)=\int \frac{3x^2}{{(2x+1)}^{\frac{3}{2}}} \mathop{dx}$$
 [/INST] Since the ODE is linear $$(2x+1)y'-3y=3x^2(2x+1)$$
We can proceed without integration factor solving homogeneous equation first:
$\dfrac{y'}{y}=\dfrac{3}{2x+1}\ $ gives $\ y=C\,(2x+1)^{3/2}$
And then find a polynomial of degree $3$ satisfying RHS:
$(2x+1)(3ax^2+2bx+c)-3(ax^3+bx^2+cx+d)=3x^2(2x+1)\iff\begin{cases}3a-6=0\\3a+b-3=0\\2b-c=0\\c-3d=0\end{cases}$
Which gives $$p(x)=2x^3-3x^2-6x-2=(2x+1)(x^2-2x-2)$$
Finally $$y=(2x+1)(C\sqrt{\vphantom{|}2x+1}+x^2-2x-2)$$
</s>