# Separating Variables in Integration

1. Feb 22, 2012

### su2111

Wondering whether somebody could help me with a quick integral??
dp/dt = ap(1-(p^2/q^2))

initial condition p(0) = 0

I have tried separating the variables, and then taking the partial fractions where needed, however my answer does not simplify nicely and it gets into some really complicated logarithms, I was wondering if I was doing something wrong?? Or if somebody could show me a different way of solving this equation. Thank you :)

2. Feb 22, 2012

### phyzguy

If p(0) = 0 for the differential equation you have given, dp/dt also equals zero at t=0. if both p and p' are 0 at t=0, then the only solution is that p=0 for all times.

3. Feb 22, 2012

### su2111

Sorry I just re-checked the question and the initial condition is p(0) = q/3, I'm really sorry about that :)

4. Feb 22, 2012

### phyzguy

Well in that case it is pretty straightforward. Write:
$$\frac{dp}{p(1-p^2/q^2)} = a dt$$ Now integrate both sides:
$$\int\frac{dp}{p(1-p^2/q^2)} = at +C$$

The integral on the left side can be done by partial fractions and will give logs, as you said. Group the logs into a single log and then exponentiate both sides, and you will get a function of p on the left side = C exp(at). Use the initial condition to determine C, solve for p, and you're done.