I need help with an equation for a project I’m working on :

I need to isolate the function $f()$ in what follows so I can put it in a software like maple or wolfram.

I have a function $p$, that monotonically decreases (the division at the end serves to normalize). $p= 0,1*e^{(-0.003x)}/p(0)$

The function that interest me, $f()$, is informally given as follows: $f(0)=0$. At each time instant t, the function grows by $1%$ of the value of $p(t)$ minus the cumulative $f(t)$ so far. For formally: $\Delta f(t)/dt = 0.01*( p(t) - \int_0^t f(t) dt ).$

where $\Delta f(t)/dt$ is the variation of function $f()$ at time $t$.

Is there any way to isolate the function $f(t)$ in this equation? Ideally, can it be stated only in terms of $p(t)$ instead of in a recursive manner?

  • $\begingroup$ Take the derivative wrt t $\endgroup$ – InertialObserver Sep 3 '18 at 23:22
  • $\begingroup$ @Rafa Please recall that if the OP is solved you can evaluate to accept an answer among the given, more details HERE $\endgroup$ – gimusi Oct 23 '18 at 20:58

We should write

$$f'(t)=\frac{df(t)}{dt} = 0.01\cdot\left( p(t) - \int_0^t f(u) du \right)$$

from which we obtain

$$\implies f''(t)= 0.01\cdot\left( p'(t) - f(t) \right) \implies f''(t)-0.01\cdot f(t)=0.01\cdot p'(t)$$

that is a linear differential equation.


Define $F(t)$ as the antiderivative of $f(t)$. Thus, the equation simplifies to $$F''(t)=\frac{1}{100}(p(t)-\int_0^tf(t)dt)=\frac{1}{100}(p(t)-F(t)+F(0)).$$

Using $p(t)=e^{\frac{-3}{1000}t}$ (I assume this is what you meant), this simplifies down to $$F''(t)=\frac{1}{100}(e^{\frac{-3}{1000}t}-F(t)+F(0)).$$

There are many techniques to solve this, but in the end we get $$F(t)=F(0)+c_1\sin(\frac{t}{10})+c_2\cos(\frac{t}{10})+\frac{10000}{10009}e^{\frac{-3}{1000}t}$$

(I found this using wolfram alpha). Of course, we want $f(t)$ and not $F(t)$. Simply differentiating gives us $$f(t)=\frac{1}{10}c_1\cos(\frac{t}{10})-\frac{1}{10}c_2\sin(\frac{t}{10})-\frac{30}{10009}e^{\frac{-3}{1000}t}.$$

Inputting $f(0)=0$, we find $$0=f(0)=\frac{1}{10}c_1-\frac{30}{10009}\Rightarrow c_1=\frac{300}{10009}.$$

Unfortunately, we still need another constant and the most simplified equation for $f(t)$ we can get is $$f(t)=\frac{30}{10009}\cos(\frac{t}{10})-C\sin(\frac{t}{10})-\frac{30}{10009}e^{\frac{-3}{1000}t}$$

for some constant $C$.

  • $\begingroup$ hmmm Maybe I'm going at this the worng way. Is there a way to state what I'm looking for :" f() grows as at a rate of 1% of p() minus its own cumulative value" in a non-recursive manner that does not involve f()? $\endgroup$ – Rafa Sep 4 '18 at 0:59
  • $\begingroup$ or, is there a reasonable way to approximate it? $\endgroup$ – Rafa Sep 4 '18 at 1:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.