# Unseparable Differential Equations

1. Feb 14, 2009

### tascja

I have a question about differential equations... The equation for a general differential equation that is not separable is:
dy/dx + P(x)y = Q(x)

So my question is can you have a Q(x) that has both x and y variables?

Example:
1. The problem statement, all variables and given/known data
xy' +y = y^2

3. The attempt at a solution
dy/dx + (1/x)y = (1/x)y^2

The integrating factor V(x) = e ^[int. P(x)]
= e ^[int. 1/x dx]
= x

Therefore y = [1/V(x)][int. Q(x)V(x)dx + C]
= [1/x] [int. ???? + C]

2. Feb 14, 2009

### Unco

This is separable! (and non-linear, by the way) Proceed as you normally would in that case.

Last edited: Feb 15, 2009
3. Feb 15, 2009

### tascja

Re:Differential Equations

Yes, sorry as i was looking over i finally remembered its called a first order linear differential equation.. sorry :\$... but i tried to solve by separating but dont seem to get the right answer.. here's what i got for a solution (with the initial condition being y(1)=-1)

-1/y - ln|y| = ln|x| + 1

but how would i isolate y??

4. Feb 15, 2009

### Unco

Re: Differential Equations

How did you get that?

We have $$\frac{1}{y(y-1)} y' = \frac{1}{x}$$

and the antiderivative of

$$\frac{1}{y(y-1)} = \frac{1}{y-1} - \frac{1}{y}$$

is ?

5. Feb 15, 2009

### tascja

even still.. i dont see how you can isolate for y without y in the answer??

6. Feb 15, 2009

### rock.freak667

Why would you need to isolate y? If you were given y(1)=-1, that means that when x=1,y=-1. No need to isolate y.

7. Feb 15, 2009

### Unco

You didn't answer my question. Without seeing your response I can't know why you can't isolate y.

8. Feb 15, 2009

### tascja

Re: Differential Equations

oh sorry...
so since you said
therefore having taking the antiderivative of both sides,
the next line would be:
1/y-1 - 1/y = ln|x| + C
then subbing in y=-1 and x=1 to solve for C:
1/1 +1/1 = ln|1| + C
C = 2
so
1/y-1 - 1/y = ln|x| + 2 (sorry i think i might have put 1 before as C)
so now i need to enter an answer that is y=
and i dont know how to isolate for y??

9. Feb 15, 2009

### Unco

Re: Differential Equations

You still didn't answer my question, tascja!

The antiderivative of 1/(y-1) - 1/y is ln(y-1) - ln(y) = ln((y-1)/y) ...

10. Feb 15, 2009

### tascja

omg i thought you were implying that 1/(y-1) - 1/y was the antiderivative of 1/y(y-1) that's why i was confused, sorry.. again... okay so
ln((y-1)/y)) = ln|x| +c
(y-1)/y = e^[ln|x| +c]
1- 1/y = e^[ln|x|]e^C *e^C is just arbitrary number
y = 1/(1-Cx) * where with the initial conditions C=2
y = 1/(1-2x)

THANK YOU FOR ALL YOUR HELP!!! :D

11. Feb 15, 2009

### Unco

If what I wrote was unclear it is I who should be apologising! Well done!