Approximating Coefficients for Line Approximation from Experimental Data

  • Thread starter Thread starter Zurtex
  • Start date Start date
AI Thread Summary
The discussion focuses on approximating coefficients for a line defined by the function y = a_0 + a_1 sin x + a_2 sin 2x + b_1 cos x + b_2 cos 2x using experimental data. The user seeks to determine these coefficients from limited data points, specifically five values each for x and y. They propose using least squares approximation to minimize the sum of the squares of the differences between the experimental data and the defined function. A matrix formulation is suggested, where the coefficients can be derived from the linear system (M^T M)A = M^T Y. This method, while initially confusing, is acknowledged as a viable approach to solving the problem.
Zurtex
Science Advisor
Homework Helper
Messages
1,118
Reaction score
1
I've got a situation where I can approximate a line by the function:

y = a_0 + a_1 \sin x + a_2 \sin 2x + b_1 \cos x + b_2 \cos 2x

From experimental data I will be able to find certain values for x and y, namely yn and xn for some value of n. Now I can easily write a computer program which could work out the co-efficients in this problem if I have 5 values for y and 5 values for x. However, being a particle situation and wanting as many results as possible or perhaps not being able to gain that many results due to constraints, how would I be able to approximate these co-efficient please?
 
Mathematics news on Phys.org
How about least squares approximation?

Let the ith row of an n by 5 matrix M be given by [ 1\ \sin(x_i)\ \sin(2x_i)\ \cos(x_i)\ \cos(2x_i)], and let Y=[y_1,\ldots,y_n]^T.

Then coefficients that will minimize the sum of the squares of the differences of your data points to y = a_0 + a_1 \sin x + a_2 \sin 2x + b_1 \cos x + b_2 \cos 2x will be any column A=[a_0,a_1,a_2,b_1,b_2]^T which satisfies the linear system (M^{T}M)A=M^{T}Y
 
Thanks I haven't seen that method yet (well I've researched it but not been able to make sense of it). Thanks a lot, just need to try and make sense of it, but I think I can :smile:
 
Insights auto threads is broken atm, so I'm manually creating these for new Insight articles. In Dirac’s Principles of Quantum Mechanics published in 1930 he introduced a “convenient notation” he referred to as a “delta function” which he treated as a continuum analog to the discrete Kronecker delta. The Kronecker delta is simply the indexed components of the identity operator in matrix algebra Source: https://www.physicsforums.com/insights/what-exactly-is-diracs-delta-function/ by...
Fermat's Last Theorem has long been one of the most famous mathematical problems, and is now one of the most famous theorems. It simply states that the equation $$ a^n+b^n=c^n $$ has no solutions with positive integers if ##n>2.## It was named after Pierre de Fermat (1607-1665). The problem itself stems from the book Arithmetica by Diophantus of Alexandria. It gained popularity because Fermat noted in his copy "Cubum autem in duos cubos, aut quadratoquadratum in duos quadratoquadratos, et...
Thread 'Imaginary Pythagorus'
I posted this in the Lame Math thread, but it's got me thinking. Is there any validity to this? Or is it really just a mathematical trick? Naively, I see that i2 + plus 12 does equal zero2. But does this have a meaning? I know one can treat the imaginary number line as just another axis like the reals, but does that mean this does represent a triangle in the complex plane with a hypotenuse of length zero? Ibix offered a rendering of the diagram using what I assume is matrix* notation...
Back
Top