Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Find the best approximation of $f(t)=t^2$ with $h(t)=ae^t+be^{2t}+c$ everywhere on the interval $[0,4]$.

I know how to solve this problem given sample points, by using least squares, but I am having a hard time figuring out how to setup this problem. I know that I need to use the inner product, $\int_0^4f(t)h(t)dt$. The issue I'm having is with putting this problem in the form of $Ax=b$. Normally I would construct the Gram matrix using the inner product and basis vectors, but no basis vectors were given.

How do I proceed with setting this up?

share|cite|improve this question
up vote 2 down vote accepted

You are asked to approximate $f$ by functions in the form of $h$, so you are already given three basis "vectors" $e^t, e^{2t}$ and $1$ in the function space endowed with an inner product $\langle p,q\rangle = \int_0^4 p(t)q(t)dt$. Since $1, e^t, e^{2t}$ do not form an orthonormal basis, you should first apply the Gram-Schmidt process to find an orthonormal basis $\{g_1,g_2,g_3\}$ for the function space spanned by $1, e^t, e^{2t}$. Then the required approximation is just the projection of $f$ into $\operatorname{span}\{g_1,g_2,g_3\}$, i.e. $\langle f,g_1\rangle g_1+\langle f,g_2\rangle g_2+\langle f,g_3\rangle g_3$.

share|cite|improve this answer
Thank you! Your explanation was very clear and thorough. – TehTechGuy Jan 23 '13 at 1:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.