How to identify the coefficients in a series expansion on a non-orthogonal basis? The solution of a PDE lead to a series expansion of the form
$$
\sum_{n=0}^\infty \left( A_n \cos \left( \lambda_n z\right) + B_n \sin \left( \lambda_n z \right) \right) = f(z) \, , 
$$
where $z \in [0,L]$ and $f(z)$ is a known function.
If $\lambda_n = n\pi/L$ then the coefficients $A_n$ and $B_n$ can easily be determined (Fourier coefficients).
In my case, $\lambda_n$ are known eigenvalues that are determined numerically.

Note that for $n \ne m$, $\lambda_n \ne \lambda_m + 2k\pi$, $k \in \mathbb{Z}$ holds.

I was wondering whether there is a way to identify $A_n$ and $B_n$ when the basis functions are not orthogonal. Thank you.
Example:
Consider 3 terms in the series with $f(z) = \delta(z)$, $\lambda_0 = 1$, $\lambda_1 = 2$, and $\lambda_2 = 4$.
 A: If this came from a self-adjoint PDE, and if you have endpoint conditions of the form
$$
                Af(a)+Bf'(a)=0,\;\;\; Cf(b)+Df'(b)=0,
$$
then you can end up with trigonometric expansions where the periods are non-harmonic. But that does not mean they are not orthogonal, in which case the ODE solutions will still be orthogonal, and you will still Fourier expansions in orthogonal functions.
For example, this is a a self-adjoint ODE with orthogonal eigenfunctions that can be used to expand anything in $L^2[a,b]$:
$$
                       -f''+\lambda f = 0 \\
                   \cos(\alpha)f(a)+\sin(\alpha)f'(a)=0\\
                   \cos(\beta)f(b)+\sin(\beta)f'(b)=0.
$$
The general case for the eigenvalues $\lambda_n$ is that they are not evenly spaced. However, the eigenfunctions will be mutually orthogonal with respect to the inner product on $L^2[a,b]$, and they will form a complete orthogonal basis of $L[a,b]$. For infinite intervals, you may have a mixed discrete and continuous Fourier expansion.
