The equation is similar to the generalised bass model
$y'(t) = g(t)\left(p + \frac{q}{n} y(t)\right) \left(n - y(t)\right) $
where the initial conditions g(0) = 0, y(0) = 1, the constant c = 1.
This is part of a market penetration model I am working one. Please show workings as I am not really good with ODE.
Thank you
First a substitutions $q/n=a$
$\frac{y'(t)}{(p+ay)(n-y)}=g(t)$
$\int\frac{dy(t)}{(p+ay)(n-y)}=\int g(t) dt$
$\int (\frac{1}{an+p}(\frac{a}{(p+ay)}+\frac {1}{(n-y)})dy=\int g(t)dt $
$ ln(p+ay)-ln(n-y)=(an+p)\int g(t)dt$
$ ln\frac{p+ay}{n-y}+y(0)=(an+p)\int g(t)dt +C $
Maybe this helps... If g(t) is a linear function then there would be no problems in integrating...
$ln\frac{p+ay}{n-y}=(an+p)\int g(t)dt +C-y(0)$
$\frac{p+ay}{n-y}=e^{(an+p)\int g(t)dt}$
and now you can easily get y(t)...
$K=e^{(an+p)\int g(t)dt}$
$\frac{p+ay}{n-y}=K$
$p+ay=Kn-Ky$
$y(a+K)=Kn-p$
$y=\frac{n e^{(an+p)\int g(t) dt}-p}{a+ e^{(an+p)\int g(t)dt} }$