# Integral Help

1. Sep 29, 2009

### KillerZ

1. The problem statement, all variables and given/known data

Solve the given differential equation by separation of variables.

2. Relevant equations

$$\frac{dy}{dx} = \frac{xy + 2y - x - 2}{xy - 3y + x - 3}$$

3. The attempt at a solution

$$\frac{dy}{dx} = \frac{xy + 2y - x - 2}{xy - 3y + x - 3}$$

$$= \frac{(x + 2)(y - 1)}{(x - 3)(y + 1)}$$

$$(x - 3)(y + 1)\frac{dy}{dx} = (x + 2)(y - 1)$$

$$\frac{(x - 3)(y + 1)}{(y - 1}\frac{dy}{dx} = (x + 2)$$

$$\frac{(y + 1)}{(y - 1)}\frac{dy}{dx} = \frac{(x + 2)}{(x - 3)}$$

$$\frac{(y + 1)}{(y - 1)}dy = \frac{(x + 2)}{(x - 3)}dx$$

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

$$\int\frac{(y + 1)}{(y - 1)}dy = \int\frac{(x + 2)}{(x - 3)}dx$$

I though maybe by partial fractions but the degree of the numerator is not less than the degree of the denominator.

2. Sep 29, 2009

### Staff: Mentor

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.
$$\frac{dy}{dx}~=~ \frac{(x + 2)(y - 1)}{(x - 3)(y + 1)}$$
$$\frac{y + 1}{y - 1}~dy~=~ \frac{(x + 2)}{(x - 3)}~dx$$
You can get to the second equation above by multiplying both sides by (y + 1)/(y - 1)dx

3. Sep 29, 2009

### KillerZ

Ok I got that but now I am stuck again this time with simplifying.

Long division =

$$\int1 + \frac{2}{y - 1}dy = \int1 + \frac{5}{x - 3}dx$$

$$\int1dy + \int\frac{2}{y - 1}dy = \int1dx + \int\frac{5}{x - 3}dx$$

$$\int1dy + 2\int\frac{1}{y - 1}dy = \int1dx + 5\int\frac{1}{x - 3}dx$$

I am stuck here:

$$y + 2ln|y-1| = x + 5ln|x-3| + c$$

4. Sep 29, 2009

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:

$$\int \frac{x+5}{x-2} dx$$

now what if we wrote 5 as 7-2

$$\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$$

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

5. Sep 29, 2009

### Staff: Mentor

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

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.

6. Sep 29, 2009

### KillerZ

Ok thanks

7. Sep 29, 2009

### KillerZ

I thought I would post this here as its just another integral:

$$\int\frac{1}{y^{2}}dy = \int\frac{1}{e^{x}+e^{-x}}dx$$

$$-\frac{1}{y} = \int\frac{e^{x}}{e^{2x}+1}dx$$

$$u = e^{x}$$

$$du = e^{x}dx$$

I am not sure what to do here:

$$-\frac{1}{y} = \int\frac{du}{u^{2}+1}$$

8. Sep 29, 2009

### Bohrok

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