# Math Help - Exponential averaging with 2 time constants

1. ## Exponential averaging with 2 time constants

Hello,

let $f(t) = \sin^2(a \cdot t)$ with $a > 0$ some constant.

How do I calculate $x(t) = \int_{-\infty}^{t} f(t') e^{-\frac{t-t'}{\tau(t')}} \text{d}t'$ where $\tau(t) = \begin{cases} \tau_0, & f(t) \ge x(t)\\ \tau_1, & \text{else} \end{cases}$ with $\tau_0 \ge 0$ and $\tau_1 \ge 0$ constant? I am particularly interested in $\lim_{t \to \infty} \{ \max x(t) \}$ and in the respective minimum.

In words, we are exponentially averaging a function $f(t)$ with different smoothing constants for increasing and decreasing function values relative to the smoothing result. E.g., whenever $f(t_0) \ge x(t_0)$ for some $t_0$, the function is considered rising and the smoothing constant $\tau(t_0) = \tau_0$ is used.

Thank you for any hint.