Solve Diff. Eq. by Separation of Variables

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
7 replies · 2K views
KillerZ
Messages
116
Reaction score
0

Homework Statement



Solve the given differential equation by separation of variables.

Homework Equations



[tex]\frac{dy}{dx} = \frac{xy + 2y - x - 2}{xy - 3y + x - 3}[/tex]

The Attempt at a Solution



[tex]\frac{dy}{dx} = \frac{xy + 2y - x - 2}{xy - 3y + x - 3}[/tex]

[tex]= \frac{(x + 2)(y - 1)}{(x - 3)(y + 1)}[/tex]

[tex](x - 3)(y + 1)\frac{dy}{dx} = (x + 2)(y - 1)[/tex]

[tex]\frac{(x - 3)(y + 1)}{(y - 1}\frac{dy}{dx} = (x + 2)[/tex]

[tex]\frac{(y + 1)}{(y - 1)}\frac{dy}{dx} = \frac{(x + 2)}{(x - 3)}[/tex]

[tex]\frac{(y + 1)}{(y - 1)}dy = \frac{(x + 2)}{(x - 3)}dx[/tex]

This is where I am having problems I am not sure what way to Integrate this:

[tex]\int\frac{(y + 1)}{(y - 1)}dy = \int\frac{(x + 2)}{(x - 3)}dx[/tex]

I though maybe by partial fractions but the degree of the numerator is not less than the degree of the denominator.
 
Physics news on Phys.org
No, not partial fractions. Just divide (using long division) the denominator into the numerator on each side. On the left side you'll get 1 + 2/(y - 1).

By the way, you could have skipped several steps in your work.
[tex]\frac{dy}{dx}~=~ \frac{(x + 2)(y - 1)}{(x - 3)(y + 1)}[/tex]
[tex]\frac{y + 1}{y - 1}~dy~=~ \frac{(x + 2)}{(x - 3)}~dx[/tex]
You can get to the second equation above by multiplying both sides by (y + 1)/(y - 1)dx
 
Ok I got that but now I am stuck again this time with simplifying.

Long division =

[tex]\int1 + \frac{2}{y - 1}dy = \int1 + \frac{5}{x - 3}dx[/tex]

[tex]\int1dy + \int\frac{2}{y - 1}dy = \int1dx + \int\frac{5}{x - 3}dx[/tex]

[tex]\int1dy + 2\int\frac{1}{y - 1}dy = \int1dx + 5\int\frac{1}{x - 3}dx[/tex]

I am stuck here:

[tex]y + 2ln|y-1| = x + 5ln|x-3| + c[/tex]
 
Hi KillerZ,

Polynomial long division is certainly the way I should be done, and if you ever encounter quotients like that were its a quadratic divided by a quadratic then again think Polynomial long division. However there is a way do deal with this sort of problem when it is a linear expression divided by a linear expresion, consider this example:

[tex] \int \frac{x+5}{x-2} dx[/tex]

now what if we wrote 5 as 7-2

[tex] \int \frac{x+5}{x-2} dx = \int \frac{x+7-2}{x-2} dx = \int \frac{(x-2) + 7}{x-2} dx = \int 1 + \frac{7}{x-2} dx[/tex]

and then you have a form you can integrate, this also work if there is a coefficient other than 1 for either of the x terms, but then its probably better to do the long division so as not to make a mistake, this just often is quicker to do than long division for simple cases, the irony is that this was probably discovered (if you can call it a discovery) when someone did a PLD of a quotient of this form. This I think is a lovely little "trick" that can actually be used in other places also, not just quotients :D
 
KillerZ said:
Ok I got that but now I am stuck again this time with simplifying.

Long division =

[tex]\int1 + \frac{2}{y - 1}dy = \int1 + \frac{5}{x - 3}dx[/tex]

[tex]\int1dy + \int\frac{2}{y - 1}dy = \int1dx + \int\frac{5}{x - 3}dx[/tex]

[tex]\int1dy + 2\int\frac{1}{y - 1}dy = \int1dx + 5\int\frac{1}{x - 3}dx[/tex]

I am stuck here:

[tex]y + 2ln|y-1| = x + 5ln|x-3| + c[/tex]
There's not a whole lot you can do in simplification other than this:
[tex]y + ln|y-1|^2 = x + ln|x-3|^5 + c[/tex]

You're not going to be able to solve this equation for y as an explicit function of x. If you want to check your work (and you should), just differentiate implicitly and you should get back to your original differential equation.
 
I thought I would post this here as its just another integral:

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

[tex]-\frac{1}{y} = \int\frac{e^{x}}{e^{2x}+1}dx[/tex]

[tex]u = e^{x}[/tex]

[tex]du = e^{x}dx[/tex]

I am not sure what to do here:

[tex]-\frac{1}{y} = \int\frac{du}{u^{2}+1}[/tex]
 
KillerZ said:
I am not sure what to do here:

[tex]-\frac{1}{y} = \int\frac{du}{u^{2}+1}[/tex]

That integral is tan-1u + C. Make sure you learn some integrals with inverse trig functions.