# Really need help with a simple ODE

1. Jan 25, 2012

### n00by

The equation I'm trying to solve is

$\frac{dy}{dx} = \frac{y^2 - 1}{x^2-1}$, given y(2) = 2

The methods I'm somewhat familiar with are separation of variables, integrating factor, and exact. I tried this:

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

$(x^2 - 1)dy = (y^2-1)dx$

$(x^2 - 1)dy - (y^2-1)dx= 0$

So, now it's an exact equation, right?

I tried integrating each part:

$\int (x^2 - 1)dy = (x^2-1)y+c1(x)$

$\int (y^2 - 1)dx = (y^2-1)x+c1(y)$

But now I'm confused what I'm supposed to do! If I just let the constants of integration be zero, then I have:

$(x^2-1)y$

$(y^2-1)x$

But what do I do with those?

I'm really confused :(

2. Jan 25, 2012

### sandy.bridge

Hello,
Try this:
$$dy/(y^2-1)=dx/(x^2-1)$$
You can apply partial fractions

3. Jan 25, 2012

### n00by

Hi, I don't see how I can apply partial fractions to $\frac {dy}{y^2-1}$ ?

4. Jan 25, 2012

### sandy.bridge

$$1/(y^2-1)=1/[(y+1)(y-1)]=A/(y+1)+B/(y-1)$$
You would then be required to solve for A and B.

5. Jan 26, 2012

### n00by

Thanks for your help, I really appreciate it.

Here's what I tried:

$\frac{1}{y^2-1} = \frac{1}{(y+1)(y-1)} = \frac {A}{(y+1)} + \frac{B}{(y-1)}$

$1 = A(y-1) + B(y+1)$

$y = 1: 1 = 0 + B(2) \iff B = \frac{1}{2}$

$y = -1: 1 = A(-2) + 0 \iff A = -\frac{1}{2}$

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

$-\frac{1}{2}ln|y+1| + \frac{1}{2}ln|y-1| = -\frac{1}{2}ln|x+1| + \frac{1}{2}ln|x-1| + C_1$ , x > 1, y > 1

$ln(y+1)^{-\frac{1}{2}} + ln(y-1)^{\frac{1}{2}} = ln(x+1)^{-\frac{1}{2}} + ln(x-1)^{\frac{1}{2}} + C_1$, raise by e

$(y+1)^{-\frac{1}{2}} + (y-1)^{\frac{1}{2}} = (x+1)^{-\frac{1}{2}} + (x-1)^{\frac{1}{2}}+ C_2, C_2 = e^{C_1}$

But I don't see how I can solve for y. Any hints?

6. Jan 26, 2012

### HallsofIvy

Are you required to solve for y?

7. Jan 26, 2012

### Jasso

Most of the time, it is enough to give the final equation in implicit form. To find the constant, you plug in the initial conditions: ie, y(2) = 2 means that x=2 and y=2. If the initial conditions were y(5) = 3, then it would be y=3 and x=5.

A minor nitpick but there's an algebra mistake in the last part:

Hint: $ln(A) + ln(B) = ln(AB)$

8. Jan 26, 2012

### n00by

I'm supposed to "solve" the differential equation. Does that not require solving for y?

9. Jan 26, 2012

### bpatrick

doesn't y = x + c satisfy this ODE?

y(2) = 2

2 = 2 + c

c = 0

so checking y = x via differentiation:

dy/dx = 1

then substitution:

dy/dx = (y^2 -1) / (x^2 - 1) = (x^2 - 1) / (x^2 - 1) = 1

sorry if I'm a little off base or this doesn't help much, I'm just used to solving PDEs and when you get them to ODEs just using some ansatz math.