# calculus – How would I integrate this function numerically

I would like to integrate the following function numerically, but I’m getting a bit confused how to set it up correctly, could someone give me a hint in the right direction

$$y(t) = f(t)e^{-nu t} + int_0^t{f(tau)e^{-nu t}y(t-tau)dtau}$$

So I wasn’t really sure where to begin, I started doing the following to set up the equations for finding $$y(t+Delta t)$$ :

$$y(t+Delta t) = f(t+Delta t)e^{-nu (t+Delta t)} + int_0^{t+Delta t}{f(tau)e^{-nu t}y(t+Delta t-tau)dtau}$$

$$= f(t+Delta t)e^{-nu (t+Delta T)} + int_{t}^{t+Delta t}{f(tau)e^{-nu t}y(t+Delta t-tau)dtau} + int_0^{t}{f(tau)e^{-nu t}y(t-tau)dtau}$$

where I can use the relation $$int_0^{t}{f(tau)e^{-nu t}y(t-tau)dtau} = y(t) – f(t)e^{-vt}$$ to rewrite this as

$$y(t+Delta t) = y(t) – f(t)e^{-vt} + f(t+Delta t)e^{-nu (t+Delta t)} + int_{t}^{t+Delta t}{f(tau)e^{-nu t}y(t+Delta t-tau)dtau}$$

If we know $$y(t)$$ am I right in saying this can be solved by assuming that the integrands are constant over the interval $$Delta t$$, so

$$y(t+Delta t) = y(t) – f(t)e^{-vt} + f(t+Delta t)e^{-nu (t+Delta t)} + int_{t}^{t+Delta t}{f(tau)e^{-nu t}y(t+Delta t-tau)dtau}$$

= $$y(t) – f(t)e^{-vt} + f(t+Delta t)e^{-nu (t+Delta t)} – frac{1}{nu}bigg({f(tau)e^{-nu t}y(t+Delta t-tau)dtau}bigg)_t^{t+Delta t}$$

Is this right so far? I’m trying to compare with an implementation and it doesn’t quite look the same…

Any help would be much appreciated!