# Homework Help: DE general solution

1. Aug 4, 2010

### beetle2

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

$y' = \frac{y+y^2}{x+x^2}$

2. Relevant equations

separation of variables

3. The attempt at a solution

$y' = \frac{y+y^2}{x+x^2}$
which is
$\frac{dy}{dx} = \frac{y+y^2}{x+x^2}$
next step is

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

than I divide both sides by $y+y^2$

so gives

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

so then I integrate both sides.

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

which gives

$ln\right[\frac{\mid y\mid}{\mid y+1\mid}\left]$=$ln\right[\frac{\mid x\mid}{\mid x+1\mid}\left]$

Is this right so far?

2. Aug 4, 2010

### vela

Staff Emeritus
Don't forget the arbitrary constant.

3. Aug 5, 2010

### beetle2

Sorry,

$ln\left[\frac{\mid y\mid}{\mid y+1\mid}+ C \right]$ = $ln\left[\frac{\mid x\mid}{\mid x+1\mid}+C \right]$

I now multiply both sides by $\mid y+1\mid$

$ln\left[\frac{\mid y+1\mid \mid y\mid}{\mid y+1\mid} \right]$ = $ln\left[\frac{\mid y+1\mid \mid x\mid}{\mid x+1\mid}+ C \mid y+1\mid \right]$

4. Aug 5, 2010

### beetle2

Divide by |y+1| Equals

$ln\left y \right]$ = $ln\left[\frac{\mid x\mid}{\mid x+1\mid}\right]$

5. Aug 5, 2010

### beetle2

Do I then take the inverse log to make

$y = \frac{\mid x\mid}{\mid x+1\mid} + C$

6. Aug 5, 2010

### gomunkul51

How did you knew straight away that the integral of 1/(x+x^2) is ln(|x/(x+1)|) ?
:)

7. Aug 5, 2010

### vela

Staff Emeritus
Not quite. You can combine the two arbitrary constants into one to get

$$\log \left|\frac{y}{y+1}\right| = \log \left|\frac{x}{x+1}\right| + c$$

Now take the inverse log.

8. Aug 5, 2010

### Char. Limit

No, not yet...

You need a log(A) = log(B), but you have a log(A)=log(B)+C. So, say C=log(D), then say that log(B)+log(D)=log(BD), then your equation can be inverse logged. But not before.

9. Aug 5, 2010

### vela

Staff Emeritus
Sure it can.

log A = log B + c
→ elog A = elog B + c = elog Bec
→ A = Bec

10. Aug 5, 2010

### Char. Limit

Good point. I just feel it's easier for me if I do it my way.

11. Aug 5, 2010

### beetle2

log A = log B + c
→ elog A = elog B + c = elog Bec
→ A = Bec

So i've got

$$\log \left|\frac{y}{y+1}\right| = \log \left|\frac{x}{x+1}\right| + c$$

So i take the inverse log of both sides

$$e^{\log \left|\frac{y}{y+1}\right|} = e^\log \left|\frac{x}{x+1}\right| + c}$$
$$e^{\log \left|\frac{y}{y+1}\right|} = e^\log \left|\frac{x}{x+1}\right|} e^c$$

in turn gives

$$\left|\frac{y}{y+1}\right|} = \left|\frac{x}{x+1}\right|}e^c$$

How do I get rid of the $$y+1$$ in the dinominator of LHS?

12. Aug 5, 2010

### Char. Limit

First, make some restrictions on x so you can lose the absolute values, then multiply both sides by y+1. You can solve for y from there.

13. Aug 5, 2010

### beetle2

muitiply both sides by $$y+1$$ for $$x \neq 0$$

gives

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

I keep rearranging but I can't seem to get the (y+1) out of the RHS it just seems to be changing sides

14. Aug 5, 2010

### vela

Staff Emeritus
First, to get rid of the absolute values, recall that |a|=|b| means a=±b.

Second, assume x≠0 and y≠0 for the moment. If you take the reciprocal of both sides, you get

$$\left|1+\frac{1}{y}\right| = e^{-c}\left|1+\frac{1}{x}\right|$$

Can you see where to go from there?

15. Aug 5, 2010

### beetle2

Using that |a|=|b| means a=±b.

$$\left|1+\frac{1}{y}\right| = e^{-c}\left|1+\frac{1}{x}\right|$$

becomes

$$\frac{-(y+1)e^{-c}}{y}) = \frac{-(y-1)e^{-c}}{y})$$

so

$$(-e^{-c}+\frac{-1}{y}) = (-e^{-c}-\frac{-1}{y})$$

is that right so far

Last edited: Aug 5, 2010
16. Aug 5, 2010

### vela

Staff Emeritus
Nope. Check your algebra.

17. Aug 5, 2010

### beetle2

Using that |a|=|b| means a=±b.

$$\left|1+\frac{1}{y}\right| = e^{-c}\left|1+\frac{1}{x}\right|$$

becomes

$$\frac{-(y+1)e^{-c}}{y} = \frac{-(y-1)e^{-c}}{y}$$

so

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

is that right so far

Last edited: Aug 5, 2010
18. Aug 5, 2010

### beetle2

I mean,

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

19. Aug 5, 2010

### beetle2

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

20. Aug 5, 2010

### beetle2

i s that better

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