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}$$
 A: hint
For the last integral, put
$$2x+1=u^2$$
$$x=\frac{u^2-1}{2}$$
$$dx=udu$$
$$3x^2=\frac 34(u^4+1-2u^2)$$
it becomes
$$\frac 34\int \frac{u^4-2u^2+1}{u^3}udu$$
A: $$\frac{dy}{dx}  -\frac{3}{2x + 1}y = 3x^2$$
For an integrating factor we have
$$\frac{dy}{dx} + Py = Q, \quad I = \exp(\int P \; dx)$$
then $$Iy = \int IQ\;dx$$
For our method
$$I = \exp(\int -\frac{3}{2x + 1} \; dx) = \exp(-\frac{3}{2}ln(2x + 1)) = (2x + 1)^{-\frac{3}{2}}$$
so
$$y = (2x + 1)^\frac{3}{2} \int \frac{3x^2}{(2x + 1)^{\frac{3}{2}}} \; dx= C_1(2x + 1)^\frac{3}{2} + (2x + 1)(x^2 - 2x -2)$$
since the integral gives
$$\frac{x^2 - 2x - 2}{(2x + 1)^\frac{1}{2}}$$
A: Yes, that looks correct. Now

*

*apply polynomial division to reduce the degree of the numerator, and try to find the integrals of the appearing terms,

*or use partial integration to reduce the degree of the $3x^2$ factor in the integrand.

A: 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)$$
A: 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}
$$
