How to determine whether a line on a plane can be represented by an algorithm or pattern?

50 Views Asked by At

Say I randomly draw a line(not a straight line) on a plane. How do I determine whether this line can be represented as a function with a definite pattern. As in, not just a function that just matches values in two sets, but one that can be written as f(x) = 2x + x^3 or something, such that you can determine y for any value of x.

Please try to keep the answer as simple as possible. Just a high schooler here.

2

There are 2 best solutions below

0
On BEST ANSWER

So, we have $f(x)=a_1x^{m_1}+a_2x^{m_2}+\cdots+a_rx^{m_r}$ for some unknown real numbers $a_1,\dots,a_r$ and $m_1,\dots,m_r$ which we wish to determine. We may assume $m_1>m_2>\cdots>m_r$. Let's do some manipulations:
$f(x)=a_1x^{m_1}(1+g(x))$ where $g(x)$ goes to zero as $x$ goes to infinity.
$\log f(x)=\log a_1+m_1\log x+h(x)$ where $h(x)$ goes to zero as $x$ goes to infinity.
$\log f(x)\div\log x=m_1+j(x)$ where $j(x)$ goes to zero as $x$ goes to infinity.
So here's what you do:
Calculate $\log f(x)/\log x$ for $x=1,2,3,\dots$ until you can tell what it converges to: that's your $m_1$.
Then calculate $\log(f(x))-m_1\log x$ for $x=1,2,3,\dots$ until you can tell what it converges to: that'll be $\log a_1$, so exponentiate it, and you get $a_1$.
Now, you can repeat the whole process for $f(x)-a_1x^{m_1}$ to work out $m_2$ and $a_2$, and keep going until you have all the $a_i$ and $m_i$.

1
On

Given the coordinates of two distinct points on the line, $(x_0,y_0) \neq (x_1,y_1)$, the whole line can in principle be represented by the graph of the function $$ y = f(x) := y_0 + \frac{y_1-y_0}{x_1-x_0} (x - x_0). $$ Notice, however, that this approach fails for $x_0 = x_1$, in which case the line is parallel to the chosen $y$-axis. There are infinitely many such lines.

If we are free to rotate and translate the coordinate system, then this problem can not only be circumvented, but in that case we may even represent any line in the plane by the graph of the function $y = f(x) := 0$, for example (i. e., it lies on the $x$-axis).

Edit: If an algebraic equation is good enough, then you can represent any line in the plane by the solution set of $$ (x_1-x_0)(y-y_0) - (y_1-y_0)(x-x_0) = 0, $$ if the coordinates of two distinct points on the line, $(x_0,y_0) \neq (x_1,y_1)$, are known.