# Math Help - Reconstructing functions from coefficients

1. ## Reconstructing functions from coefficients

I'm wanting to research into how functions can be broken down into coefficients of simple basis functions. In one dimension I know this can be done with the Fourier Transform and an extension into 3d can be used with Spherical Harmonics. However I'm wanting to start right at the beginning.

I think the simplest method is just integrate the product of your basis functions and your target functions to produce the coefficients.

$c[n] = \int f()basis[n]()$

$f(x) = \sum c[n]basis[n]()$

I've tried this with many different basis functions, such as :

• sin waves, where each basis iteration is a higher frequency
• sin waves of the same frequency but shifted
• triangle waves
• step functions

But to be honest, I'm doing it blindly, and don't know which functions are better and why.

- Should I use the whole domain of sin?
- Should the basis function have negative values in its range?
- Should the basis functions just be shifted versions of a single type?
- Should the basis functions just be increasing frequencies of a single type?

All I know is that each basis function needs to be normalized, ie the integral over its domain needs to be 1.0, where the function is squared. I've also read that the basis functions should be orthogonal, however I'm not sure why, as non orthogonal basis functions seem to work ok.

Does anyone have any suggestions for suitable material I can read? preferably a book?

2. ## Re: Reconstructing functions from coefficients

Originally Posted by floater
I'm wanting to research into how functions can be broken down into coefficients of simple basis functions. In one dimension I know this can be done with the Fourier Transform and an extension into 3d can be used with Spherical Harmonics. However I'm wanting to start right at the beginning.

I think the simplest method is just integrate the product of your basis functions and your target functions to produce the coefficients.

$c[n] = \int f()basis[n]()$

$f(x) = \sum c[n]basis[n]()$

I've tried this with many different basis functions, such as :

• sin waves, where each basis iteration is a higher frequency
• sin waves of the same frequency but shifted
• triangle waves
• step functions

But to be honest, I'm doing it blindly, and don't know which functions are better and why.

- Should I use the whole domain of sin?
- Should the basis function have negative values in its range?
- Should the basis functions just be shifted versions of a single type?
- Should the basis functions just be increasing frequencies of a single type?

All I know is that each basis function needs to be normalized, ie the integral over its domain needs to be 1.0, where the function is squared. I've also read that the basis functions should be orthogonal, however I'm not sure why, as non orthogonal basis functions seem to work ok.

Does anyone have any suggestions for suitable material I can read? preferably a book?

CB

3. ## Re: Reconstructing functions from coefficients

polynomial functions can also be used as a basis, so that we have a power series representation (such as a Taylor or Maclaurin series). depending on the inner product used, different bases are often chosen so as to be orthogonal with respect to the given inner product (e.g. legendre polynomials w.r.t. the inner product:

$\int_{-1}^1 f(t)g(t)\ dt$

for the vector space of $C^{\infty}$ functions from $[-1,1] \to \mathbb{R}$).

i believe you can also apply Bessel functions in a similar manner.

orthogonality is not, strictly speaking, a requirement for a basis, but since one can always orthogonalize, and it simplifies calculations immensely, one should. normalization isn't as important, because it just amounts to a choice of scale (ok, several choices of scale, one for each basis element). often, a weighting function
w(x) can accomplish this. again, this can simplifiy calculations somewhat (the basis elements themselves get messy, but the representations (of the functions) get nicer).

i could be a little off-track here, but i think what you want to do is look at hilbert spaces with an L2-norm. this is the "general" abstract setting which each of your functional decompositions are an example of, and might give you a better idea of which basis functions you might want to choose, and why.

in physical applications, orthogonality allows us to change one component of a system without propagation of "side effects". moreover, orthogonality of a basis, means we can project on to a subspace by taking the projections of the individual basis elements (no need to worry about "cross-terms").

4. ## Re: Reconstructing functions from coefficients

Thanks for the help guys