hybrid function into one-line form

35 Views Asked by At

I came across a non-homogeneous ODE with the non-homogeneous term $g(t)$ defined by a few functions like this one below: $$g(t)=\left\{\begin{matrix} f_1(t), & 0\leq t<a\\ f_2(t), & a\leq t<b\\ \vdots\\ f_n(t), & t \geq n \end{matrix}\right.$$ This is actually the general case which I want to translate into a one-line piece-wise form. How could this be done?

1

There are 1 best solutions below

0
On

What about $$g(t)=\sum_{i=1}^nf_n(t)\left(H(t-a_{n-1})-H(t-a_n)\right),$$ where $H(t)$ is the Heaviside step function ?