First of all, I am a biologist and I am not really knowledgeable in mathematics. Thus, I apologize if what I am asking is naive or not fully explained.
I am trying to solve analytically a differential equation for the growth of a pile ($S$). The differential equation should be as follows:
$\frac{dS}{dt} = (k×J) - S(t)×L ×(k×J)$
where:
$S =$ size of the structure
$J =$ constant
$L =$ changing with S
Flow = constant = $k$
The equation can thus be simplified to:
$\frac{dS}{dt} = N - S(t) × L × N$
where $N = (k × J)$
Is there an analytical solution to this equation? If so, how can I achieve it? I would like to learn a bit about the process but not being in the field makes finding resources a little harder.
Thanks a lot.
$$\frac{dS(t)}{dt} = N - S(t) \, L \, N$$
If $L$ does not depend on time, then $$S(t)=\frac{S(0) L-1 }{L}e^{-L N t}+\frac1 L$$
Detailed steps
First, about notations : $a b$ stands for $a\times b$.
We shall write the equation as $$\frac{dS(t)}{dt} + S(t) \, L \, N=N\tag 1$$ Consider first the corresponding homogeneous equation $$\frac{dS(t)}{dt} + S(t) \, L \, N=0$$ what rewrite as $$\frac {dS(t) }{S(t)}=-L\, N \,dt$$ Integrate both sides $$\log(S(t))=-L\, N \,t+c_1\implies S(t)=\exp\left(-L\, N \,t+c_1 \right)=\exp\left(-L\, N \,t\right)\exp(c_1)$$ $$S(t)=c_2 \exp\left(-L\, N \,t\right)$$ If the rhs in $(1)$ had been $0$, the problem would have been over and $c_2=S(0)$. But this is not the case; so, to take it into account, we consider that $c_2$ is a function of $t$. For clarity, let me write $c_2=C(t)$ (this is called variation of parameters). So $$S(t)=C(t)\exp\left(-L\, N \,t\right)\implies \tag 2$$ $$\frac{dS(t)}{dt}=\frac{dC(t)}{dt}\exp\left(-L\, N \,t\right)-C(t)\,L\,N\,\exp\left(-L\, N \,t\right)$$ Plug in $(1)$ and simplify to obtain $$\frac{dC(t)}{dt}=N e^{L N t}\implies C(t)=\frac{e^{L N t}}{L}+c_3$$ Back to $(2)$, we then have $$S(t)=\Big[\frac{e^{L N t}}{L}+c_3 \Big]\exp\left(-L\, N \,t\right)$$ Expand and simplify $$S(t)=c_3 e^{-L N t}+\frac{1}{L}$$ Apply the condition at $t=0$ $$S(0)=c_3+\frac{1}{L} \implies c_3=S(0)-\frac{1}{L}\implies S(t)=(S(0)-\frac{1}{L})e^{-L N t}+\frac{1}{L}$$ which was the answer.