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

beetle2
Messages
110
Reaction score
0

Homework Statement



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

Homework Equations



separation of variables

The Attempt at a Solution



I start with
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?
 
Physics news on Phys.org
Don't forget the arbitrary constant.
 
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

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

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

y = \frac{\mid x\mid}{\mid x+1\mid} + C
 
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

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

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
 
  • #10
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.
 
  • #11
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
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
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
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
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:
  • #16
Nope. Check your algebra.
 
  • #17
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:
  • #18
I mean,

\frac{-(y+1)e^{-C)}{y} = \frac{-(y-1)e^{-C}{y}
 
  • #19
\frac{-(y+1)e^{-C}}{y} = \frac{-(y-1)e^{-C}}{y}
 
  • #20
i s that better

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

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

So you have |a|=|b| where

a= 1+\frac{1}{y}

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

Try taking it from there.
 
  • #22
How this look?

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


or


1+\frac{1}{y} = e^{-c} 1+\frac{1}{x}
 
  • #23
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.

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

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

Take reciprocal of both sides

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


y = \frac{-xe^{c}}{x(e^c-1)-1}
 
Back
Top