1st order differential equation

1. Feb 21, 2014

subzero0137

Find the general solution of the first order differential equation $(y+x^{2}y)\frac{dy}{dx}=3x+xy^{2}$, with $y(1)=1$.

My attempt:
$$\frac{y}{3+y^{2}}dy=\frac{x}{1+x^{2}}dx ∴ \frac{1}{2}\int \frac{2y}{3+y^{2}}dy=\frac{1}{2}\int \frac{2x}{1+x^2}dx$$
$$=\frac{1}{2}ln|3+y^{2}|=\frac{1}{2}ln|1+x^{2}|+C$$ ∴ $$y^{2}+3=x^{2}+1+e^{C}$$ ∴ $$y=\pm\sqrt{x^{2}-2+e^{C}}$$ Applying boundary conditions gives $$1=\pm\sqrt{1^{2}-2+e^{C}} \Rightarrow e^{C}=2$$ Therefore $$y=\pm x$$.

Is this right?

2. Feb 21, 2014

Mentallic

Not quite right here. Pay particular attention to your exponential rules. Remember that

$$a^{b+c}=a^ba^c$$

3. Feb 21, 2014

subzero0137

Ohhh! Of course...silly me.

4. Feb 21, 2014

Mentallic

Don't worry, I answered a whole homework problem set on this topic with the exact same mistake in each and every question haha