Method of Least Squares question

Click For Summary

Homework Help Overview

The discussion revolves around finding the best least squares approximation for the function x^(1/3) on the interval [-1,1] using a quadratic function of the form q(x) = c0 + c1x + c2x^2, within the context of the vector space C[-1,1] and the L^2 inner product.

Discussion Character

  • Exploratory, Assumption checking, Mathematical reasoning

Approaches and Questions Raised

  • Participants discuss the orthogonality of the basis functions used in the least squares method and explore the implications of this property on the approximation process. There are attempts to normalize the basis functions and questions about the correctness of modifying functions to achieve orthogonality.

Discussion Status

Some participants have provided insights into the necessity of orthogonality for the basis functions and suggested methods such as the Gram-Schmidt process to achieve this. There is an ongoing exploration of the implications of these adjustments on the solutions being derived, with no explicit consensus reached on the correctness of the modifications made.

Contextual Notes

Participants note the challenges posed by the non-orthogonality of the original basis functions and the resulting complexity in the solutions when adjustments are made. There is also mention of the need for normalization in the context of the least squares method.

clope023
Messages
990
Reaction score
130

Homework Statement



for vector space C[-1,1] with L^2 inner product

<f,g> = \intf(x)g(x)dx

find the best least squares approximation for function x^(1/3) on [-1,1] by a quadratic function q(x) = c0 + c1x + c2x^2


Homework Equations



s+r = n

<t^s, t^r> = \intt^ndt = { 2/(n+1) if n is even
0 if n is odd }

The Attempt at a Solution



q(x) = c0*1 + c1*x + c2*x^2

take inner product of functions of q(x)

||1|| = sqrt(2)
||x|| = sqrt(2/3)
||x^2|| = sqrt(2/5)

normalize vectors in the basis

\hat{u1} = 1/sqrt(2)
\hat{u2} = x/sqrt(2/3)
\hat{u3} = x^2/sqrt(2/5)

find coefficients by taking integrals of unit vectors with function x^1/3

c1 = (1/sqrt(2))\intx^1/3dx = \stackrel{3}{4sqrt(2)}

c2 = (1/sqrt(2/3))\intx^4/3dx = \stackrel{3}{7sqrt(2/3)}

c3 = (1/sqrt(2/5))\intx^7/3dx = \stackrel{3}{10sqrt(2/5)}

therefore p(x) = c1\hat{u1} + c2\hat{u2} + c3\hat{u3}

just wanting to confirm my answer, thanks for any and all help anyone can give and I'll write back this time, lol
 
Physics news on Phys.org
are your basis functions orthogonal? i think that might help...
 
lanedance said:
are your basis functions orthogonal? i think that might help...

I did test for that, 1 and x were orthogonal, x and x^2 were orthogonal, however 1 and x^2 were not orthogonal and neither were any of the functions with each other, to try and remidy this I changed the functions such that I added a variable to make them orthogonal or make their integral equal to zero, so

\int1dx = \intadx = 0

\intx^2dx = \int(x-a)^2dx = 0

\intx^2x^2dx = \intx^4dx = \int(x-a)^4dx = 0

however many of my solutions except the first one turned into some horrible monster with complex numbers and wasn't so sure that was correct, was my reasoning correct to do this?
 
or the least squares method to miinimise the error, I'm pretty sure your functions need to be orthonormal (actualy orthogonal, but as the normlaisation helps), the way to do it is thorugh gram schimdt type process

so for the zeroth order function, pick the most general constant
f_0(x) = a
test nomalisation
\int_{-1}^{1} dx (f_0(x))^2 = 2a^2
f_0(x) = \frac{1}{\sqrt{2}}

and again for the next, f1
f_1(x) = b + cx
test orthognality
\int_{-1}^{1} dx (f_0(x).f_1(x)) <br /> = \int_{-1}^{1} dx \frac{1}{\sqrt{2}} (b+cx) <br /> = \frac{1}{\sqrt{2}}(bx+cx^2) _{-1}^{1}<br /> = \frac{1}{\sqrt{2}}(b(1-(-1)) +c(1^2-(-1)^2)) <br /> = \frac{1}{\sqrt{2}}(2b) = 0 <br />

hence b = 0 (as you found), then do the normalisation for c, and for the last, start from
d + ex +fx^2
 

Similar threads

  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 11 ·
Replies
11
Views
2K
Replies
12
Views
2K
Replies
3
Views
2K
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
4
Views
5K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K