I know what is newton-Raphson's method, i.e., to approximate the value of roots using numerical analysis. But, when there is no function and only data is given, then how to find actual function. Question is: how to find second degree polynomial if data is: $$ \begin{array}{c|cccc} x & 0.0 & 0.2 & 0.4 & 0.6 \\ \hline f(x) & 15.0 & 21.0 & 30.0 & 51.0 \end{array} $$ And also to estimate the value of $f(0.1)$ and $f(0.5)$. I searched rigorously, but couldn't understand more advanced topics of calculus etc. I think two posts are quite helpful, but too difficult for me to properly grasp the ideas. {https://math.stackexchange.com/questions/1616995/finding-all-roots-of-multivariate-polynomial-using-newtons-method}, {https://math.stackexchange.com/questions/742871/newtons-method-for-roots-of-polynomials}. If any one guide me properly I will be highly thankful.
-
Familiar with Lagrange polynomial? – Alexey Burdin Jun 20 '20 at 16:30
-
As you have $4$ points the data will fit into a polynomial of degree $3=4-1$, not $2$, namely $\frac{375}{2}x^3-75x^2+\frac{75}{2}x+15$ – Alexey Burdin Jun 20 '20 at 16:52
-
@AlexeyBurdin Lagrange polynomial is very tedious one if done by hand calculation, as we have to multiply the factors together. It becomes more complicated if factors include fractions. – ali ali Jun 21 '20 at 08:43
-
thanks for the help. But, the questioner asked to determine the second degree polynomial by newton, so there is no method of newton to determine the polynomial? Or I think it is a mistake made by the questioner? – ali ali Jun 21 '20 at 09:02
1 Answers
As suggested by @AlexBurdin it has 4 points so it is of third degree polynomial i.e., $4_{points}-1 = 3_{degree}$. It can be solved using the Lagrange polynomial method. $$ L(x) = \sum_{j=0}^{k=data\: points}y_jl_j(x) \\ l_j(x) = {\prod_{0\le m \le k}} \frac{x-x_m}{x_j-x_m} $$ For my case it is four points, so j = 0-3. Where, $m \ne k$ and $f(x) = y$. $$ f(x) = y_0 \cdot \frac{x-x_1}{x_0-x_1} \cdot \frac{x-x_2}{x_0-x_2} \cdot\frac{x-x_3}{x_0-x_3} + y_1 \cdot \frac{x-x_0}{x_1-x_0} \cdot \frac{x-x_2}{x_1-x_2} \cdot\frac{x-x_3}{x_1-x_3} \\+ y_2 \cdot \frac{x-x_0}{x_2-x_0} \cdot \frac{x-x_1}{x_2-x_1} \cdot\frac{x-x_3}{x_2-x_3}+ y_3 \cdot \frac{x-x_0}{x_3-x_0} \cdot \frac{x-x_1}{x_3-x_1} \cdot\frac{x-x_2}{x_3-x_2} $$ Plugging the values: $$ f(x) = 15 \cdot \frac{x-0.2}{0-0.2} \cdot \frac{x-0.4}{0.0-0.4} \cdot\frac{x-0.6}{0.0-0.6}+ 21 \cdot \frac{x-0}{0.2-0} \cdot \frac{x-0.4}{0.2-0.4} \cdot\frac{x-0.6}{0.2-0.6}\\ + 30 \cdot \frac{x-0}{0.4-0} \cdot \frac{x-0.2}{0.4-0.2} \cdot\frac{x-0.6}{0.4-0.6}+ 51 \cdot \frac{x-0}{0.6-0} \cdot \frac{x-0.2}{0.6-0.2} \cdot\frac{x-0.4}{0.6-0.4} \\ $$ $$ f(x)=\frac{-312}{2}(x-0.2)(x-0.4)(x-0.6) + \frac{2625}{2}(x-0.0)(x-0.4)(x-0.6)\\ + \frac{-1875}{1}(x-0.0)(x-0.2)(x-0.6)+ \frac{2125}{2}(x-0.0)(x-0.2)(x-0.4) $$ Solving and we get: $$ f(x) = \frac{375}{2}x^3-\frac{150}{2}x^2+\frac{75}{2}x + 15 $$ By putting 0.1 and 0.5 values into the function we get: $$ f(0.1) = \frac{375}{2}0.1^3-\frac{150}{2}0.1^2+\frac{75}{2}0.1 + 15 = 18.1875\\ f(0.5) = \frac{375}{2}0.5^3-\frac{150}{2}0.5^2+\frac{75}{2}0.5 + 15 = 38.1844 $$ Proof: If we put the given x data values into the function then we get the function values given in the table: $$ f(0.0) = \frac{375}{2}0.0-\frac{150}{2}0.0^2+\frac{75}{2}0.0 + 15 = 15\\ f(0.2) = \frac{375}{2}0.2^3-\frac{150}{2}0.2^2+\frac{75}{2}0.2 + 15 = 21 $$ and so on. Hope this helps.
- 41