Help with Differential Equations (First order)

1. Nov 26, 2014

genap

1. The problem statement, all variables and given/known data
Solve the given the two equations:

$$xdy + ydx = ydy$$

and

$$(y^2 + 1)dx +(2xy + 1)dy = 0$$

2. Relevant equations

N/A.

3. The attempt at a solution

For the first, I can see that solving this with respect to $$dy/dx$$might be a bit tricky.

However, if I solve it for $$dx/dy$$, things seem to be a bit easier.

$$xdy + ydx = ydy$$

$$ydx = ydy - xdy$$

$$y\frac{dx}{dy} + x = y$$

Now, that looks a bit familiar. Did someone say "product rule"?

$$\int{yx\frac{dx}{dy}} = \int{ydy}$$

$$yx = \frac{y^2}{2}$$

$$x = \frac{y}{2}$$

$$y = 2x + C$$

Now, this seems a bit too easy to me. Is that really it?

As to the second...

$$(y^2 + 1)dx + (2xy+1) dy = 0$$

$$y^2 dx + 2xy dy = -dy - dx$$

$$y^2 + 2xy\frac{dy}{dx} = -\frac{dy}{dx} - 1$$

Once again, it seems like that product rule comes up quite a bit...

$$\int{y^2 x\frac{dy}{dx}} = -\int{\frac{dy}{dx} - 1}$$

At this point, I got a sinking feeling that something was horribly wrong with my work. I checked my answers on wolfram alpha, got a bunch of gibberish that made no sense, as well as answers that in no way resembled my own work. Could anyone verify if I'm taking the correct steps?

Thanks!

Last edited: Nov 26, 2014
2. Nov 26, 2014

stevendaryl

Staff Emeritus
Getting to the last equation was an error. That should be:
$y \frac{dx}{dy} + x = y$

3. Nov 26, 2014

genap

Doh! Fixed that, sorry.

4. Nov 27, 2014

ehild

You miss an integration constant here.

5. Nov 27, 2014

ehild

The last line is wrong. As $y^2 + 2xy\frac{dy}{dx}=\frac{d(y^2x)}{dx}$, it should be
$$\int{\frac{d(y^2 x)}{dx}dx} = -\int{(\frac{dy}{dx} + 1)dx}$$

6. Nov 28, 2014

HallsofIvy

Staff Emeritus
Personally, I dislike that particular method. It works- you can simply integrate- because these are exact equations.

The first, xdy+ ydx= ydy, is the same as ydx+ (x- y)dy= 0. Saying it is exact means there exist a function, F(x, y), such that
$$dF= F_x dx+ F_y dy= ydx+ (x- y)dy$$.
From $$F_x= y$$ we have, immediately, that F= xy+ g(y). From that, $$F_y= x+ g'(y)= x- y$$ so that $$g'(y)= -y$$. Integrate that to find g.