math
posted by mathstudent
Find the least squares approximation of x over the interval [0,1] by a polynomial of the form a + b*e^x

The polynomial produces an output space with two linearly independent basis vectors: u1 = 1, u2 = e^x
I believe these are the steps to solve the problem
1) Select a valid inner product that makes steps 23 simple.
2) Compute two orthonormal basis vectors (g1, g2) from the linearly independent basis vectors (u1, u2)
3) Calculate the projection of f(x) = x onto the output space of the polynomial represented by (g1, g2) by
<x, g1>*g1 + <x, g2>*g2
I'm not sure I'm picking a good inner product, because the numbers aren't very clean.
I pick for an inner product
<f,g> = Definite integral over [0,1] of f(x)*g(x) dx
Via GramSchmidt:
Linearly Independent Vector u1 = 1
Orthogonal Vector v1 = 1
Orthonormal vector g1 = 1
Linearly Independent Vector u2 = e^x
Orthogonal Vector v2 = e^x  e + 1
Orthonormal vector g2 = (e^x  e + 1)/sqrt(1/2*(e5)*(e+1)
Projection of f(x)=x onto {g1,g2}=
<f,g1>*g1 + <f,g2>*g2
= 1/2 + 1/4(e^xe1)/(e5)
Which can be rewritten in the a + b*e^x form as:
(1/2  (e+1)/(e5)) + 1/(4(e5)) * e^x
This answer isn't close to the book answer:
1/2 + 1/(e1) * e^x
Where did I go wrong?

Count Iblis
Linearly Independent Vector u2 = e^x
Orthogonal Vector v2 = e^x  e + 1
v2^2 = Integral from zero to 1 of
[e^x  e + 1]^2 dx =
Integral from zero to 1 of
[e^(2x) + 2 (1e)e^(x) + (1e)^2] dx =
1/2 (e^2 1)  (e1)^2 =
(e1)[1/2 (e+1)  (e1)] =
1/2(e1)(3  e)
So, g2 should be:
g2 = (e^x  e + 1)/sqrt(1/2*(e1)*(3e)
<f,g2>*g2 =
2(e^x  e + 1)/[(e1)(3e)] Integral from zero to 1 of x (e^x  e + 1) dx
Integral from zero to 1 of e^(p x) dx =
1/p [e^p  1]
Differentiate both sides w.r.t. p:
Integral from zero to 1 of x e^(p x) dx =
1/p^2 [e^p  1] + 1/p e^p
For p = 1 this is:
Integral from zero to 1 of x e^x dx = 1
We thus have:
<f,g2>*g2 =
2(e^x  e + 1)/[(e1)(3e)] Integral from zero to 1 of x (e^x  e + 1) dx =
2(e^x  e + 1)/[(e1)(3e)] *
[1 + 1/2(1e)] =
2(e^x  e + 1)/[(e1)(3e)] *
[3/2  1/2 e] =
(e^x  e + 1)/(e1) =
e^x/(e1) 1
The projection is 1/2 plus this which is:
e^x/(e1)  1/2 
mathstudent
Thanks so much for working that out.
In hindsight, I did the problem right except that I made a mistake in calculating <v2,v2>
Respond to this Question
Similar Questions

algebra
If v1,...,v4 are in R^4 and v3 is not a linear combination of v1, v2, v4 then {v1, v2, v3, v4] is linearly independent. Is this true or false? 
math
Find an orthonormal basis for the subspace of R^3 consisting of all vectors(a, b, c) such that a+b+c = 0. The subspace is twodimensional, so you can solve the problem by finding one vector that satisfies the equation and then by constructing … 
math
A trigonmetric polynomial of order n is t(x) = c0 + c1 * cos x + c2 * cos 2x + ... + cn * cos nx + d1 * sin x + d2 * sin 2x + ... + dn * sin nx The output vector space of such a function has the vector basis: { 1, cos x, cos 2x, ..., … 
Algebra
How can you determine if a polynomial is the difference of two squares? 
Numerical Analysis
x 0 2 3 4 y 7 11 28 63 a)_Using these values, use the Lagrange interpolation process to obtain a polynomial of least degree. b)_rearrange the points in the table of a) and find the newton form of the interpolating polynomial. Show … 
math
1.binomial 2.degree of monomial 3.monomial 4.perfectsquare trinomial 5.standard form of polynomial A.a polynomial with two terms B.a polynomial in which the terms decrease in degree from left to right and there are no like terms C.a … 
Linear algebra
Find two vectors v and w such that the three vectors u = (1,1,1), v and w are linearly independent independent. 
Linear Algebra
Prove that If a vector space is of dimension n and a set of vectors spans V, then that set of vectors must be linearly independent. 
Math
The function f(x) = x^2 2x + x^1/2 is: A. A polynomial because it is continuous. B. A polynomial because it is of the form axn. C. Not a polynomial because you are subtracting 2x. D. Not a polynomial because you canâ€™t have any fractional … 
math
As^5.V(s)+Bs^4.V(s)+Cs^3.V(s)+Ds^2.V(s)+Es^1V(s)+F.V(s)=1, where V(s) is the transformed transient output voltage. Rearranging the 5th order transient polynomial equation above we have: V(s) = 1 / H(s) where H(s) is a polynomial is …