5

Is it possible to write a formula for any line imaginable, for example a drawing?

I once saw this long, and complicated, formula made by a mathematician with loads of ceilings etc.

The explanation was something to do with something he was programming for computers using pixels - I'm really not sure - but basically, the entire graph had every single pixel drawing there was, and then limits were set to section off the image you wanted.

Is this possible with actual lines, not pixels.

-- I did a search and it's this: Tupper's self-referential formula

user26857
  • 52,094
Tobi
  • 842

5 Answers5

7

@Ethan Bolker is right, and if you want to make his statement more precise, you could say something about the number of possible "curves" vs the number of possible "formulas", where a formula is something that's mathematically sensible, is written with some finite set of symbols (xs, ys, addition, powers, multiplication...whatever you can express using LaTeX's equation editing, for instance) in a finite string. The number of such formulas is countable, while the number of curves is uncountable (just think of the horizontal line at height $u$ for each possible real number $u$; as $u$ ranges over the reals, you have an uncountable number of 'curves').

But this question is also addressed, in a somewhat roundabout way, in Tom Stoppard's superb play Arcadia; in it there is the following interchange between Thomasina, a prodigy, and her tutor, Septimus:

Thomasina: ... Each week I plot your equations dot for dot, xs against ys in all manner of algebraical relation, and every week they draw themselves as commonplace geometry, as if the world of forms were nothing but arcs and angles. God's truth, Septimus, if there is an equation for a curve like a bell, there must be an equation for one like a bluebell, and if a bluebell, why not a rose? Do we believe nature is written in numbers?

Septimus: We do.

Thomasina: Then why do your equations only describe the shapes of manufacture?

Septimus: I do not know.

Thomasina: Armed thus, God could only make a cabinet.

Septimus: He has mastery of equations which lead into infinities where we cannot follow.

Thomasina: What a faint-heart! We must work outward from the middle of the maze. We will start with something simple. (She picks up the apple leaf.) I will plot this leaf and deduce its equation. You will be famous for being my tutor when Lord Byron is dead and forgotten.

While your question is mathematical, I strongly recommend reading the play, despite there being very little precise mathematics in it.

John Hughes
  • 93,729
  • +1, more than once if I could. I did think about the cardinality argument but completely forgot that passage from Arcadia! – Ethan Bolker Dec 24 '16 at 19:26
  • The argument reminds of the argument for uncomputable functions, due to the fact that there are only countable infinite many programs, but uncountable infinite many desireable machine functions. – mvw Dec 24 '16 at 19:40
  • So can you communicate an arbitrary line at height $h\in\mathbb{R}$ to me? – mvw Dec 24 '16 at 19:49
  • No, I absolutely can't (although I can't prove that). But if you believe thatm then that alone is enough to explain why there are more curves than formulas. – John Hughes Dec 24 '16 at 21:50
  • I figured I was just really explaining your answer in a bit more detail, Ethan, but I'm pleased to have reminded you of Arcadia. – John Hughes Dec 24 '16 at 21:51
  • 2
    How can the number of possible formulas be countable if there is indeed a formula for every horizontal line at height $u$ for every real number $u$? – wgrenard Dec 25 '16 at 06:35
3

The short answer is "no". A long answer would require careful definitions of "formula" and of "any line imaginable". Those definitions are hard to write.

If you have to draw a curve of pixels on a computer screen you will often be able to find a formula that gives you a good approximation of what you want.

Ethan Bolker
  • 95,224
  • 7
  • 108
  • 199
2

There are fantastic formulas, like the Batman equation, but in general I believe it is not possible.

If we restrict us to the graphs of continuous functions of one variable, for our formulas we usually stick to a set of elementary functions which is exhausted rapidly for more exotic cases and must be extended by special functions or integral functions, solutions of differential equations etc.

mvw
  • 34,562
1

Well, you can approximate with Taylor's theorem. You could also consider a fourier series (I am less familiar with that).

Indeed, many basic functions are calculated via their Taylor series. Mainly analytic functions:

$$\sin(x)=x-\frac16x^3+\frac1{120}x^5+\mathcal O(x^7)$$

as you keep taking the expansion out, you will get a polynomial that is really close to $\sin(x)$.

Some "lines" are representable using implicit formulas, like $x^y=y^x,y\ne x$. But it can also be represented by a parametric equation: $$(x,y)=(a^{1/(a-1)},a^{a/(a-1)})$$ or a polar form:

$$r=\left(\frac{(\sin\theta)^{\cos\theta}}{(\cos\theta)^{\sin\theta}}\right)^{1/(\sin\theta-\cos\theta)}$$

So there are many interesting ways to produce any numbers of lines.

I'm not really sure, however, if it could be possible to deduce any line's formula, but the above give some good ways to thinking about this.

1

There's a big difference between drawing (either on a computer screen or with a pencil) and mathematics.

From the mathematical point of view, the answer from John Hughes explains that there are more curves than formulae, so there must be some curves that don't have a formula.

But drawing is an approximate process -- the pixels on a computer screen and the marks made by your pencil are not precise representations of mathematical formulae. The graphs of mathematical equations are infinitely thin curves, which are impossible to produce on a computer screen or on paper.

So, suppose you give me a drawing of a curve. I could scan it to get a black-and-white bitmap image (a two-dimensional array of pixels). Let $v_{ij}$ be the value of the $ij$-th pixel, where $v_{ij}=1$ means black and $v_{ij}=0$ means white for $1 \le i \le m$ and $1 \le j \le n$. For each $i,j$, define a function $\phi_{ij}: [1,m] \times [1,n] \to [0,1]$ by \begin{align} \phi_{ij}(x,y) &= v_{ij} \quad \text{ if } x = i \text{ and } y = j \\ \phi_{ij}(x,y) &= 0 \quad \text{ otherwise } \end{align} and define $$ \phi(x,y) = \sum_{i=1}^m \sum_{j=1}^n \phi_{ij}(x,y) $$ Then the curve is the set $$ S = \{ (x,y) \in \mathbb{R}^2: \phi(x,y) = 1 \} $$ or, less formally, the curve has equation $\phi(x,y) = 1$. If you were to plot this equation (in system like Mathematica, for example), then the result would be visually very close to the original drawing, perhaps even indistinguishable.

But this representation is essentially pixel-based, which you said you wanted to avoid. It could be turned into a vector/line based approach, though. The functions $\phi_{ij}$ are not continuous, but you can replace them with sharp spike-shaped continuous ones. Then the function $\phi$ is continuous. You can visualize it as a landscape that has sharp ridges (with height $z=1$) that follow the original curve. We want the contour plot at height $z=1$ on this landscape. There are well-known techniques for computing these sorts of contours, either as polylines or as spline curves. One of them is marching squares. Polylines and splines are somewhat cheating, arguably, since they are functions that are defined piecewise. But, I felt free to bend the rules, since you didn't state them precisely.

bubba
  • 43,483
  • 3
  • 61
  • 122