<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] This ODE is linear. Consider the homogeneous
$$
y_h' -3\frac{y_h}{2x+1}=0
$$
This ODE is separable with solution
$$
y_h = C_0(2x+1)^{\frac 32}
$$
now assuming for the particular $y_p = C_0(x)(2x+1)^{\frac 32}$ after substitution in the complete ODE we obtain
$$
C_0'(x) = \frac{3x^2}{(2x+1)^{\frac 32}}
$$
thus
$$
C_0(x) = \frac{x^2-2x-2}{\sqrt{2x+1}}
$$
and finally
$$
y = y_h + y_p =  \left(C_0+\frac{x^2-2x-2}{\sqrt{2x+1}}\right)(2x+1)^{\frac 32}
$$
</s>