Can someone help on this differential separable equation

Answer:
[tex]f(x)=-\sqrt{2x^3-2x+4}[/tex]
Step-by-step explanation:
Given:
[tex]\frac{dy}{dx}=\frac{3x^2-1}{y}[/tex]; [tex]y=-2[/tex] when [tex]x=1[/tex]
Separate the differentials:
[tex]y\frac{dy}{dx}=3x^2-1[/tex]
[tex]ydy=(3x^2-1)dx[/tex]
Integrate both sides:
[tex]\int\limits {y} \, dy=\int\limits {3x^2-1} \, dx[/tex]
[tex]\frac{1}{2}y^2=x^3-x+C[/tex]
Solve for the constant C:
[tex]\frac{1}{2}(-2)^2=(1)^3-(1)+C[/tex]
[tex]2=C[/tex]
Plug in C and solve for y:
[tex]\frac{1}{2}y^2=x^3-x+2[/tex]
[tex]y^2=2x^3-2x+4[/tex]
[tex]y=-\sqrt{2x^3-2x+4}[/tex] (since [tex]y=-2[/tex], the radical has to be negative)
Substitute y=f(x):
[tex]f(x)=-\sqrt{2x^3-2x+4}[/tex]