I have a function $f(x)$ which I want to represent as the sum over some complete orthogonal basis $\phi_i$ such that:
$$ f(x) = \sum_{i} c_i \phi_i(x) $$
Where the $\phi_i$ are orthogonal with respect to some inner product:
$$ \langle \phi_i, \phi_j \rangle = 0, \quad i \ne j $$
I've done this without issue for a few different choices of basis (Chebyshevs, cosines) but given that I know $f(x)$ will have certain properties I'm wondering if there is a better choice, for example allowing me to truncate the series earlier without sacrificing accuracy.
$f(x)$ has the following properties:
$f(x)$ is defined on $[0,\infty)$
$f(x) \ge 0$ everywhere
$\lim\limits_{x \to \infty} f(x) = 0$
$f(x)$ is real-valued everywhere
Can anyone suggest some appropriate basis?
Thanks for your time!