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

In summary: Good job! That's one solution. Remember to include the absolute value around the exponential, though. So it'sy = \frac{-x|e^c|}{x|e^c|-1}In summary, the conversation discusses the process of solving a separable differential equation using the separation of variables method. It involves taking the derivative of both sides and then using integration to find the solution. The conversation also touches on the use of absolute values and the presence of arbitrary constants in the solution. The final solution is given as y = \frac{-x|e^c|}{x|e^c|-1}.
  • #1
beetle2
111
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
  • #2
Don't forget the arbitrary constant.
 
  • #3
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]
 
  • #4
Divide by |y+1| Equals

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

[itex]y = \frac{\mid x\mid}{\mid x+1\mid} + C [/itex]
 
  • #6
How did you knew straight away that the integral of 1/(x+x^2) is ln(|x/(x+1)|) ?
:)
 
  • #7
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.
 
  • #8
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
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

[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?
 
  • #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 [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
 
  • #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

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

Can you see where to go from there?
 
  • #15
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:
  • #16
Nope. Check your algebra.
 
  • #17
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:
  • #18
I mean,

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

[itex]\frac{-(y+1)e^{-C}}{y} = \frac{-(y-1)e^{-C}}{y}[/itex]
 
  • #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

[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.
 
  • #22
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]
 
  • #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.

[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]
 

1. What is the purpose of separating variables in this type of differential equation?

The purpose of separating variables is to manipulate the equation into a form where all the variables are on one side and all the constants are on the other. This allows us to integrate both sides separately, making it easier to solve for the dependent variable.

2. How do you separate the variables in this type of differential equation?

To separate the variables, we first write the equation in the form y' = f(x,y), where f(x,y) is a function of both x and y. Then, we rearrange the equation to have all the y terms on one side and all the x terms on the other. This can usually be achieved by multiplying both sides by dx and dividing by f(x,y).

3. Can you provide an example of solving a differential equation using separation of variables?

Example: Solve y' = (y+2)/(x+3) using separation of variables.
Step 1: Write the equation in the form y' = f(x,y)
y' = (y+2)/(x+3)
Step 2: Rearrange the equation to have all the y terms on one side and all the x terms on the other
(y+3)dy = (x+3)dx
Step 3: Integrate both sides
∫(y+3)dy = ∫(x+3)dx
(y^2/2)+3y = (x^2/2)+3x + C
Step 4: Solve for y
y^2+6y = x^2+6x + C
y^2+6y-6x-C = 0
Step 5: Use the initial condition to solve for C
If the initial condition is y(1) = 2, then C = -8
Step 6: Final solution
y^2+6y-6x+8 = 0

4. Are there any limitations to using separation of variables to solve differential equations?

Yes, there are some limitations. This method can only be used for first-order, separable differential equations. It also requires the equation to be in a specific form, which may not always be possible. Additionally, this method may not work for more complex equations or when the functions involved are not easily integrable.

5. Can separation of variables be used to solve differential equations with initial conditions?

Yes, separation of variables can be used to solve differential equations with initial conditions. After solving for the general solution, the initial conditions can be used to find the particular solution by substituting the values of x and y into the equation.

Similar threads

  • Calculus and Beyond Homework Help
Replies
6
Views
695
  • Calculus and Beyond Homework Help
Replies
5
Views
194
  • Calculus and Beyond Homework Help
Replies
2
Views
480
  • Calculus and Beyond Homework Help
Replies
6
Views
505
  • Calculus and Beyond Homework Help
Replies
20
Views
385
  • Calculus and Beyond Homework Help
Replies
21
Views
758
  • Calculus and Beyond Homework Help
Replies
18
Views
1K
  • Calculus and Beyond Homework Help
Replies
7
Views
643
  • Calculus and Beyond Homework Help
Replies
12
Views
1K
  • Calculus and Beyond Homework Help
Replies
2
Views
403
Back
Top