0

If I plot some points randomly on the graph and then join them, can that curve be represented as a polynomial? I know that a straight line can be expressed algebraically as a linear equation, and quadratic equation as a parabola, but can you express a smooth curve which is made by joining some random points on the graph algebraically ?

Rayhan
  • 131
  • 1
    Yes, you can, by using min and max functions (or alternatively, absolute values). (Assuming zigzag means a union of line segments) – Anthony Jun 03 '22 at 15:50
  • 2
    Maybe you should remove the tag algebraic geometry – Shimura Variety Jun 03 '22 at 15:56
  • 3
    why is everyone downvoting this post of a new user instead of telling the user what to do. That is not welcoming, please remove the downvotes and only place them if the user turns unwilling to incorporate the suggested and necessary changes. – Shimura Variety Jun 03 '22 at 17:07
  • It is not clear whether you are asking about plotting a curve yourself, or just choosing the points. As the other answer shows, if you select any number of points, then an algebraic (polynomial) curve can pass through them, but if a curve is randomly drawn, then it is possible that it cannot be represented by an algebraic equation. – Shimura Variety Jun 03 '22 at 17:17
  • 1
    @DevanshBhardwaj, thank you for the answer. :) – Rayhan Jun 04 '22 at 04:23
  • It is not needed to thank for the answer, moreover it should not be said. That is just a part of stackexchange :) – Shimura Variety Jun 04 '22 at 06:44
  • 1
    The term "interpolation" is usually applied to fitting a curve to a set of isolated function values. See the Wikipedia article on interpolation. The fitting can be done in more than one way unless you further described how the curve is to be defined. – hardmath Jun 05 '22 at 15:45

2 Answers2

2

There are functions like trigonometric and logarithmic functions which cannot be represented as polynomials, yet they can be graphed:

enter image description here

enter image description here So it is not possible for every graph to represent a polynomial. However, these functions can be Approximated by Taylor series to any desired degree of accuracy.

To illustrate it by an example, we may take the parabolic graph of $x^2$.

enter image description here Now if one reflects the part of the graph to the left of y axis along the x axis, one roughly gets such a graph: enter image description here This graph is given by $x^2$ for $x>0$ and $-x^2$ for $x<0$, but it cannot be represented as a polynomial as the polynomial should be $x^2$ for x greater than zero and $-x^2$ otherwise.

2

One may find a polynomial that passes through a given set of data points using the Newton interpolation polynomial.

The polynomial is given by

$$f(x) = \sum_{i = 0}^n a_in_i(x) \; \text{where} \; n_i(x)=\prod_{j = 0}^{i−1}(x−x_j) \; \text{and} \; a_i = [y_0, ..., y_i]$$

$[y_0, ..., y_i]$ is notation for divided differences.

You may see an application of this approach for a specific case here (pasted below).

We can use the Newton interpolation polynomial to get

$$f(x) = \sum_{i = 0}^n a_in_i(x) \; \text{where} \; n_i(x)=\prod_{j = 0}^{i−1}(x−x_j)$$

We can now calculate the divided differences as follows

$$a_0 = y_0 = -6.13$$

$$a_1 = \frac{y_1 - y_0}{x_1 - x_0} = \frac{-3.61 + 6.13}{-0.32 + 9.17} = \frac{84}{295}$$

$$a_2 = \frac{\frac{y_2 - y_1}{x_2 - x_1} - a_1}{x_2 - x_0} = \frac{\frac{-5.6 + 3.61}{4 + 0.32} - \frac{84}{295}}{4 + 9.17} = \frac{-474965}{8391924}$$

$$...$$

The resulting polynomial is

$$f(x) \approx 4.90547\times10^{-6}x^{6}-0.000246778x^{5}+0.00296915x^{4}+0.0154116x^{3}-0.323696x^{2}+0.380018x-3.45477$$

enter image description here