Inactive Tutor answered 06/22/13
This is a separable equation- meaning the 'y' terms and 'x' terms can be separated. First, we bring the 2xy term to the right side of the equation:
y' =x-2xy, which simplifies to
y' = x(1-2y). dividing by 1-2y, we get
y'/(1-2y) = x which we then rewrite as
dy/(1-2y) = xdx. Now, we integrate both sides.
The right side is simply 1/2x2 + c. Don't forget the + c
The left side we should, by now, recognize as a log function. By saying U= 1-2y, dU = -2dy, so dy= -dU/2
Thus, we are integrating -dU/2U, which is just -log(U)/2. Substituting back in U= 1-2y, we get
-log(1-2y)/2 +c1 = 1/2x2 +c2. Combining the two constants (since they are just arbitrary constants), and multiplying by -2 for simplicity, we get
log(1-2y) = -x2 +c. Raising e to the power of both sides, we find
1-2y= e-x^2 +c, which is the same as
1-2y= ece-x^2. Since c is just an arbitrary constant, we can just replace ec with c. Thus
1-2y= Ce-x^2. Rearranging the terms, we get
y= (1-Ce-x^2)/2. Since we know y(0)= -2, we get (1-C)/2= -2. This means C=5. Our final solution is then
y(x)= (1-5e-x^2)/2