I'm positive someone else has asked a nearly identical problem in the past but I can't find an example of this specific variation.
Let's say initially you invest some principal amount ($I_P$) into a savings account with interest rate ($r$) continuously compounding interest. Additionally you invest a varying percentage ($p(t)$) of your wages ($w(t)$) such that your total investment into this account is given by:
$$ I_{T}( t) =I_{P} +I_{w} ,\ \ \ \ \ \ \ \ I_{w} \ =\int p( t) w( t) \ dt $$
How would one set up a d.e. to determine the time value $V(t)$ of the investment? How would a variable interest rate $r(t)$ affect this?
At time $T,$ each amount that was invested in the interval $[t,t+dt]$ has compounded by $e^{\int_t^Tr(s)ds}.$ Therefore, taking the initial investment to have been at time $t=0,$ for each later time $T,$ $$V(T)=I_Pe^{\int_0^Tr(s)ds}+\int_{t=0}^Tp(t)w(t)e^{\int_t^Tr(s)ds}dt.$$