[SOLVED] Desesperate, need help for Best Approximation

• Jun 18th 2008, 11:36 AM
arbolis
[SOLVED] Desesperate, need help for Best Approximation
I need help for today on this exercise :
Approximate the data in the following table $\begin{array}{c|cccc} x & -1 & 0 & 1 & 2\\ \hline y & -1.1 & -0.4 & -0.9 & -2.7\end{array}$ with a function of the form $f(x)~-e^{ax^2+bx+c}$ in the sens of least squares for the function $ln(-f(x))$.
I understand the problem and I will simplify it for you, so you can help me. They want me to approximate the data given in the table, via a function of the type $f(x)~-e^{ax^2+bx+c}$, which is a too complicated problem. Therefore, in order to do it, we take the natural log of $f(x)$, to approximate a new set of data, which will be $ln(-f(x))$. This is much less complicated to determine a, b and c. After this we just replace a, b and c in f(x) and we're done. But the problem is that I don't know how to get these values.
The problem is simplificated to approximate $\begin{array}{c|cccc} x & -1 & 0 & 1 & 2\\ \hline y & 0.0953 & -0.9163 & -0.105 & 0.993\end{array}$ with a function of the form $ax^2+bx+c$. To get a linear system, I must use the inner product theory to solve the problem.
Let V be the set of $f(-1)$, $f(0)$, $f(1)$, $f(2)$ such that f is a function. Let W be a subset of V, so W={...}. Then I define the inner product between x and y as $\sum_{i=1}^{n}x_iy_i$. From it I must use the normal equations to solve the problem and get a, b and c. But as I don't know how to define W, nor how to construct the normal equations, I'm totally stuck on this.
• Jun 18th 2008, 11:59 AM
CaptainBlack
Quote:

Originally Posted by arbolis
I need help for today on this exercise :
Approximate the data in the following table $\begin{array}{c|cccc} x & -1 & 0 & 1 & 2\\ \hline y & -1.1 & -0.4 & -0.9 & -2.7\end{array}$ with a function of the form $f(x)~-e^{ax^2+bx+c}$ in the sens of least squares for the function $ln(-f(x))$.
I understand the problem and I will simplify it for you, so you can help me. They want me to approximate the data given in the table, via a function of the type $f(x)~-e^{ax^2+bx+c}$, which is a too complicated problem. Therefore, in order to do it, we take the natural log of $f(x)$, to approximate a new set of data, which will be $ln(-f(x))$. This is much less complicated to determine a, b and c. After this we just replace a, b and c in f(x) and we're done. But the problem is that I don't know how to get these values.
The problem is simplificated to approximate $\begin{array}{c|cccc} x & -1 & 0 & 1 & 2\\ \hline y & 0.0953 & -0.9163 & -0.105 & 0.993\end{array}$ with a function of the form $ax^2+bx+c$. To get a linear system, I must use the inner product theory to solve the problem.
Let V be the set of $f(-1)$, $f(0)$, $f(1)$, $f(2)$ such that f is a function. Let W be a subset of V, so W={...}. Then I define the inner product between x and y as $\sum_{i=1}^{n}x_iy_i$. From it I must use the normal equations to solve the problem and get a, b and c. But as I don't know how to define W, nor how to construct the normal equations, I'm totally stuck on this.

Since the assumptions usually made to justify regression will not be satisfied for this problem the main advantage of regression is lost (that is the knowlege of the covariance matrix of the estimators of the coefictents). In which case there is no reason to fiddle around doing this problem that way. I would just throw this into a non-linear least squares tool and let it sort the coefficients out form me.

A suitable tool is the solver that comes with Excell.

RonL
• Jun 18th 2008, 12:43 PM
arbolis
I agree that it's not a nice problem. Usually the problem can be done by partial derivatives to find the minimum of a multivariable function. My teacher said that mostly of the time it won't be a linear system, and that's why the problem can be solved implanting an inner product. But in the exercise I just posted, there's something not correct. They want me to solve a problem using a Lemma or I don't know what property without even prove that it works. I mean, if you have a set of points and approximate them by a quadratic function. When you know the coefficient of the parabola (a, b and c), if you have the same set of points given, but the exponential of them. We are using the property that the best approximation of the form $e^{ax^2+bx+c}$ will have the same coefficients than before. Which should be at least explained!
I really hope that tomorrow I won't have to be confronted to such a problem, in my exam.
Quote:

A suitable tool is the solver that comes with Excell.
Yes, certainly. Almost any program that can do this is better than to do it manually. (too much calculations). But I should understand how to do it handly. Thank you anyway!