# Solving differential equation with y'

1. Sep 20, 2011

### ParoXsitiC

1. The problem statement, all variables and given/known data

$\left( 1+x \right) ^{2}y' -2\,{\it xy}=0$

2. Relevant equations

3. The attempt at a solution

I know I need to get all the y and dy on one side, all the x and dx on another. Then integrate.
I also know the answer should be y=C(1+x^2)

$\left( {x}^{2}+2\,x+1 \right) {\frac {dy}{dx}} =2\,{ \it xy}$

$\frac {1}{2x} \left( {x}^{2}+2\,x+1 \right) {\frac {dy}{dx}} =\,{ \it y}$

2. Sep 20, 2011

### Tomer

So, if you know what to do, where are you stuck?

3. Sep 20, 2011

### HallsofIvy

Staff Emeritus
Well, you haven't got "all the y and dy on one side, all the x and dx on another", have you? And, because you want "... dx= ...dy", not 1/dx or 1/dy, I would recommend you get "y and dy" on the left and "x and dx" on the right.

4. Sep 20, 2011

### ParoXsitiC

How would I handle a situation where it is 1/dx and 1/dy ? Just take the inverse of whats there?

so x (1/dx) would turn into (1/x) dx?

Such that:

${\frac {2x{\it}}{ \left( 1+x \right) ^{2}}}dx={\frac {{1}}{y}}dy$

5. Sep 20, 2011

### ParoXsitiC

$2 \int {\frac {x}{ \left( 1+x \right) ^{2}}}{dx} = \int {\frac{1}{y}}{dy}$

$2\int \!{\frac {u-1}{{u}^{2}}}{du} = ln |y|$

$2 \int {\frac {1}{u}}{du} - \int{{u}^{-2}}{du} = ln |y|$

$2ln|u| + \frac{1}{u} + c = ln |y|$

$y = {e}^{2ln|u|} * {e}^{\frac{1}{{u}}} * {e}^{c}$

$y = C{u}^{2}{e}^{\frac{1}{{u}}}$

$y = C{(1+x)}^{2}{e}^{\frac{1}{{(1+x)}}}$

Why do I have the extra ${e}^{\frac{1}{{(1+x)}}}$ and mine is 1+x and not 1+x^2??

6. Sep 21, 2011

### dynamicsolo

Don't forgot to distribute that '2' over both integrals!

Indeed? I'm afraid neither $y = C(1+x^{2})$ nor $y = C(1+x)^{2}$ solves the original DE. Your solution will, once you fix the mistake indicated...

(Sometimes it doesn't pay to know what The Answer is supposed to be, because it isn't...)

Last edited: Sep 21, 2011
7. Sep 21, 2011

### CalcStudent

The answer is from back of my calculus book...hmm...

8. Sep 21, 2011

### dynamicsolo

Just out of curiosity, which textbook does you use? Be aware that no set of answers in the back of a book is 100%: even in late editions of textbooks, I've found the error rate usually settles to about 1 out of 300 to 400. In first editions, it can be over 1%! (Problem solvers for books are human, too...)

You don't have to take my word for the error here -- try differentiating the book's solution function (or the alternative I suggested) and putting y and y' back into the given differential equation.

9. Sep 22, 2011

### ParoXsitiC

Calculus: Early Transcendental Functions 5e
Larson/Edwards

The question is from 6.2 exercises #9.

9. (1+x^2)y' - 2xy = 0

The solution is listed at the back of the book as:

9. y = C(1+x^2)

I double checked to make sure the problem and solution were right.

10. Sep 22, 2011

### dynamicsolo

For $y = C ( 1 + x^{2} )$ , the derivative is $y' = C \cdot 2x$ , yes? Putting this into the left-hand side of the differential equation you posted leads to

$$[ (1 + x )^{2} \cdot C \cdot 2x ] - [ 2x \cdot C ( 1 + x^{2} ) ] .$$

I don't think that's going to give you zero. (Wouldn't be the first time a solver goofed in a "back-of-the book" answer...)