Hi folks,

I am trying to solve a simple separable first order differential equation, but the issue is really algebra.

$\dfrac{dy}{dx} = \dfrac {y(x^2 + 1)}{(x^2 - 1)}$ with the boundary condition $y = 2$, when $x = 0$

so

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

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

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

$\ln y = x + \int \dfrac{2}{(x + 1)(x - 1)} dx $

using partial fractions

$\dfrac{2}{(x + 1)(x - 1)} = \dfrac{A}{(x + 1)} + \dfrac{B}{(x - 1)}$

A = -1, B = 1

so

$\int \dfrac{2}{(x - 1)(x + 1)} dx = \int \dfrac{1}{(x - 1)} - \dfrac{1}{(x + 1)} dx$

$\ln y = x + \ln (x - 1) - \ln (x + 1) + c $ where c is the constant of integration.

$\ln y = x + \ln \dfrac{(x - 1)}{(x + 1)} + c $

Now, this is the problem. If I put y = 2 and x = 0 to evaluate c, the log term is negative. I am sure there is a simple way of reorganising, but I just can't see it.

Can anyone help?