Solve DE y' = \frac{y+y^2}{x+x^2} - Separation of Variables

Join the discussion
Registration is free. Start your own thread to ask a follow-up.
22 replies · 3K views
beetle2
Messages
110
Reaction score
0

Homework Statement



[itex]y' = \frac{y+y^2}{x+x^2}[/itex]

Homework Equations



separation of variables

The Attempt at a Solution



I start with
[itex]y' = \frac{y+y^2}{x+x^2}[/itex]
which is
[itex]\frac{dy}{dx} = \frac{y+y^2}{x+x^2}[/itex]
next step is

[itex]dy = \frac{y+y^2}{x+x^2}dx[/itex]

than I divide both sides by [itex]y+y^2[/itex]

so gives

[itex]\frac{dy}{y+y^2} = \frac{1}{x+x^2}dx[/itex]

so then I integrate both sides.

[itex]\int\frac{dy}{y+y^2} = \int\frac{1}{x+x^2}dx[/itex]

which gives

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

Is this right so far?
 
Physics news on Phys.org
Don't forget the arbitrary constant.
 
Sorry,

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


I now multiply both sides by [itex]\mid y+1\mid[/itex]

[itex] ln\left[\frac{\mid y+1\mid \mid y\mid}{\mid y+1\mid} \right][/itex] = [itex] ln\left[\frac{\mid y+1\mid \mid x\mid}{\mid x+1\mid}+ C \mid y+1\mid \right][/itex]
 
Divide by |y+1| Equals

[itex] ln\left y \right][/itex] = [itex] ln\left[\frac{\mid x\mid}{\mid x+1\mid}\right][/itex]
 
Do I then take the inverse log to make

[itex]y = \frac{\mid x\mid}{\mid x+1\mid} + C[/itex]
 
How did you knew straight away that the integral of 1/(x+x^2) is ln(|x/(x+1)|) ?
:)
 
Not quite. You can combine the two arbitrary constants into one to get

[tex]\log \left|\frac{y}{y+1}\right| = \log \left|\frac{x}{x+1}\right| + c[/tex]

Now take the inverse log.
 
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.
 
Char. Limit said:
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.
Sure it can.

log A = log B + c
→ elog A = elog B + c = elog Bec
→ A = Bec
 
vela said:
Sure it can.

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

Good point. I just feel it's easier for me if I do it my way.
 
log A = log B + c
→ elog A = elog B + c = elog Bec
→ A = Bec




So I've got

[tex]\log \left|\frac{y}{y+1}\right| = \log \left|\frac{x}{x+1}\right| + c[/tex]

So i take the inverse log of both sides

[tex]e^{\log \left|\frac{y}{y+1}\right|} = e^\log \left|\frac{x}{x+1}\right| + c}[/tex]
[tex]e^{\log \left|\frac{y}{y+1}\right|} = e^\log \left|\frac{x}{x+1}\right|} e^c[/tex]

in turn gives


[tex]\left|\frac{y}{y+1}\right|} = \left|\frac{x}{x+1}\right|}e^c[/tex]



How do I get rid of the [tex]y+1[/tex] in the dinominator of LHS?
 
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.
 
muitiply both sides by [tex]y+1[/tex] for [tex]x \neq 0[/tex]

gives

[tex]y= \frac{x(y+1)e^c}{x+1}[/tex]

I keep rearranging but I can't seem to get the (y+1) out of the RHS it just seems to be changing sides
 
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

[tex]\left|1+\frac{1}{y}\right| = e^{-c}\left|1+\frac{1}{x}\right|[/tex]

Can you see where to go from there?
 
Using that |a|=|b| means a=±b.

[tex]\left|1+\frac{1}{y}\right| = e^{-c}\left|1+\frac{1}{x}\right|[/tex]


becomes



[tex]\frac{-(y+1)e^{-c}}{y}) = \frac{-(y-1)e^{-c}}{y})[/tex]

so


[tex](-e^{-c}+\frac{-1}{y}) = (-e^{-c}-\frac{-1}{y})[/tex]

is that right so far
 
Last edited:
Nope. Check your algebra.
 
Using that |a|=|b| means a=±b.

[tex]\left|1+\frac{1}{y}\right| = e^{-c}\left|1+\frac{1}{x}\right|[/tex]


becomes



[tex]\frac{-(y+1)e^{-c}}{y} = \frac{-(y-1)e^{-c}}{y}[/tex]

so


[tex]\frac{-(y+1)e^{-C)}{y}) = \frac{-(y-1)e^{-C)}{y})[/tex]

is that right so far
 
Last edited:
I mean,

[tex]\frac{-(y+1)e^{-C)}{y} = \frac{-(y-1)e^{-C}{y}[/tex]
 
[tex]\frac{-(y+1)e^{-C}}{y} = \frac{-(y-1)e^{-C}}{y}[/tex]
 
i s that better

[itex]\frac{-(y+1)e^{-C}}{y} = \frac{-(y-1)e^{-C}}{y}[/itex]
 
I'm not sure what you're doing. The exponential is always positive so you can pull it inside the absolute value to get

[tex]\left|1+\frac{1}{y}\right| = \left| e^{-c}\left(1+\frac{1}{x}\right)\right|[/tex]

So you have |a|=|b| where

[tex]a= 1+\frac{1}{y}[/tex]

[tex]b = e^{-c}\left(1+\frac{1}{x}\right)[/tex]

Try taking it from there.
 
How this look?

[tex]\left|1+\frac{1}{y}\right| = e^{-c}-(1+\frac{1}{x}) = e^{-c}-1-\frac{1}{x}[/tex]


or


[tex]1+\frac{1}{y} = e^{-c} 1+\frac{1}{x}[/tex]
 
What I was trying to do was something I remembered when working with absolute values on both sides of the equation. which was that there could be two solutions depending on + or -.

So I thought there might be more then 1 solution.

So using what I've got.

[tex]\left|1+\frac{1}{y}\right| = \left| e^{-c}\left(1+\frac{1}{x}\right)\right|[/tex]
take 1 from both sides.

[tex]\frac{1}{y}\ = e^{-c}\left(1+\frac{1}{x}\right)-1[/tex]

Take reciprocal of both sides

[tex]\frac{y}{1}\ = \frac{1}{e^{-c}\left(1+\frac{1}{x}\right)-1}[/tex]


[tex]y = \frac{-xe^{c}}{x(e^c-1)-1}[/tex]