The curve as an equation

Moving the pivot only adds terms

A compiled machine's cost is the number of cosines its curve's equation expands into, and moving the arm's pivot gives the same curve a different equation. So an expensive curve might only be expensive because of where the arm was put. Searched over 1,681 pivots, it never is. Moving the pivot adds the equation's own derivatives at the pivot as new terms, and they cancel only on one locus per curve — a centre, or a line — on which the catalogue's pivot already sits. Anywhere else the ellipse costs 6 instead of 4, the folium 12 instead of 11, the lemniscate 9 instead of 5, the parabola its 6 everywhere, and the quintic that four terms nearly draw costs 30 instead of 18.

Assumes Four terms of eighteen draw the quintic and Every curve is a sum of cosines.

A compiled machine draws a curve with the tip of a two-link arm, and the machine compiled prices it by its equation, the rule the price is on the equation stated outright. Every curve is a sum of cosines rewrote the equation as a sum of cosines of whole-number combinations of the arm’s two angles, and each cosine is a gadget the machine must build. The cheapest curves at each degree found the curves that need fewest, circles about the pivot and lines through it, and four terms of eighteen draw the quintic priced the catalogue’s curves by the nearest curve that a smaller budget of terms can build. The quintic, eighteen terms exact, came within 1.4% of the reach with four. The ellipse, parabola, lemniscate and folium cost their whole equations to come within four per cent.

That essay ended by noticing that the split between cheap and expensive curves is about where each curve sits relative to the pivot, and the pivot can be placed. Mount the arm elsewhere and the same target has a different equation, a different expansion and a different price. The question it left was whether an expensive curve is expensive in itself, or only because of where the arm was put.

In itself. Moving the pivot only adds terms, except on one locus per curve, and the catalogue already put every pivot on its curve’s locus.

Moving the pivot adds terms everywhere but one locusThe folium x³ + y³ − 1.5xy = 0, drawn in its own coordinates, and the square of pivot positions from −1 to 1 searched at steps of 0.05 (shaded). With the arm's pivot at the origin, where the catalogue puts it, the equation expands into 11 cosines of the arm's two angles. Moved anywhere in the square off the line x + y = 0 (heavy), it expands into 12; at (0.5, 0.3), for instance, 12. 41 of the 1681 pivots tried cost less than 12, all on that locus, and none costs less than the catalogue's 11.12 terms11 termsshaded: pivots tried · heavy: the cheapest locus, line x + y = 012 terms anywhere else
Fig. 1 The folium drawn in its own coordinates, with the square of pivot positions searched and the one locus on which its equation is cheapest; the counts at the catalogue’s pivot and at one pivot off the locus. The slider changes the curve.

What a move does to an equation

Put the pivot at (x0,y0)(x_0, y_0) of the curve’s own coordinates and the curve’s equation in the arm’s coordinates becomes P(X+x0,Y+y0)=0P(X + x_0, Y + y_0) = 0. Expanded, the top-degree part of PP is unchanged, and every lower degree gains new terms: the linear terms are PP’s gradient at the pivot, the quadratic ones its second derivatives, and so on down. The constant changes too, but a constant costs nothing.

Each monomial expands into a fixed set of cosines of the arm’s angles. Writing the tip’s position as x=cos⁡α+cos⁡βx = \cos\alpha + \cos\beta and y=sin⁡α+sin⁡βy = \sin\alpha + \sin\beta, a linear term brings in cos⁡α\cos\alpha and cos⁡β\cos\beta, written here as the combinations (1, 0) and (0, 1); a quadratic term brings in (2, 0), (0, 2), (1, 1) and (1, −1), in proportions that depend on which quadratic. The machine’s cost is the number of distinct combinations whose amplitudes survive. So a move can only raise the count by bringing in combinations the old equation lacked, and the count stays where it was only where the new lower-degree terms vanish, or bring in nothing new, or cancel something exactly.

Every curve, every pivot

That is a prediction with a measurement attached, and the measurement is cheap: one expansion per pivot, with no search. Each of eight catalogue curves was given 1,681 pivots, a square from −1 to 1 about its catalogue position in steps of 0.05, and its equation was expanded at every one.

Every catalogue pivot is already the cheapest place. For eight catalogue curves: the degree; the number of cosines the top-degree part alone expands into, which no move of the pivot changes; the count with the pivot at the catalogue's origin, the least over 1,681 pivots from −1 to 1 in steps of 0.05, and the count everywhere off the cheapest locus; d(d + 1), the most any polynomial of that degree expands into; and the locus. circle: 2, 1, 1, 1, 3, 6, point; ellipse: 2, 4, 4, 4, 6, 6, point; hyperbola: 2, 3, 3, 3, 5, 6, point; parabola: 2, 4, 6, 6, 6, 6, none; cubic: 3, 8, 8, 8, 12, 12, line x = 0; folium: 3, 8, 11, 11, 12, 12, line x + y = 0; lemniscate: 4, 2, 5, 5, 9, 20, point; quintic: 5, 18, 18, 18, 30, 30, line x = 0, and the origin on it.
Fig. 2 Eight catalogue curves: their degree, the number of cosines their equation expands into with the pivot at the catalogue’s origin, the least over the 1,681 pivots tried, the count everywhere off the cheapest locus, and that locus.

Every curve’s count takes at most three values over the square — one for the parabola, two for most, three for the quintic — and never goes below the catalogue’s. The circle costs 1 at its centre and 3 anywhere else; the ellipse 4 at its centre and 6 elsewhere; the hyperbola 3 and 5; the lemniscate 5 and 9. The cubic costs 8 on the line x=0x = 0 and 12 off it, and the folium 11 on the line x+y=0x + y = 0 and 12 off it. The quintic costs 18 at the catalogue’s point, 22 elsewhere on the line x=0x = 0, and 30 everywhere else. The parabola costs 6 at all 1,681 pivots.

So each curve has one cheapest locus — a point for the centred curves, a line for the cubics, a point on a line for the quintic, nothing for the parabola — and the catalogue’s pivot lies on it every time. The catalogue chose well, though not by design: it wrote each equation in its simplest form, and the simplest form puts the origin at a centre, at a double point or on a line the curve is built about, which is where the derivatives that a move would add vanish.

A floor and a ceiling

Two numbers bracket every count in the table, and neither depends on the pivot. The first is what a curve’s top-degree part costs on its own. Moving the pivot never changes that part, so it is a floor in practice: no pivot tried took any curve below it. The second is the most any polynomial of the curve’s degree can cost, an equation with every monomial present and nothing cancelling, which is d(d+1)d(d + 1) for degree dd: 2 for a line, 6 for a conic, 12 for a cubic, 20 for a quartic, 30 for a quintic, 42 for a sextic. Each curve’s catalogue count lies between its floor and that ceiling, and off its locus each curve is pushed as high as its top-degree part lets it go.

For most of the catalogue that is all the way. The ellipse and the parabola reach 6 off their loci, the cubic and the folium 12, the quintic 30: anywhere but its locus each costs as much as any curve of its degree can. Three curves stop short, and for one reason. The circle’s top part is x2+y2x^2 + y^2, the squared distance from the pivot, which expands into a single cosine; a circle costs one term found that, and its derivatives at a moved pivot are linear terms bringing two more, so the circle never costs more than 3. The lemniscate’s top part is the square of the same quantity and expands into two, and it never costs more than 9 against a quartic’s 20. The hyperbola’s top part, xyxy, carries no trace, so it never brings in cos⁡(α−β)\cos(\alpha - \beta) and stops at 5. A curve built from the distance to the pivot stays cheap wherever its pivot goes, because the distance is the one quantity the arm measures for nothing.

At the other end, the quintic at its catalogue point costs exactly 18, the same as x5x^5 alone. Its other two terms, 0.4x2y0.4x^2y and −y-y, bring in no combination that x5x^5 does not already pay for. That is a coincidence of this equation and this pivot, and it is the whole of why the quintic looked cheap: from its catalogue point it is priced as its leading term, and from anywhere else as a general quintic.

Why the locus is a centre or a line

For a conic the new terms a move brings are linear, and they are the conic’s gradient at the pivot. A centred conic’s gradient vanishes only at its centre, so the centre is the one pivot with no linear terms, and anywhere else the linear terms add their two combinations, (1, 0) and (0, 1): four becomes six for the ellipse, three becomes five for the hyperbola. A parabola has no centre. Its own equation already contains a linear term, yy, so it already pays for (1, 0) and (0, 1), and moving its pivot adds linear terms it has already paid for. That is why it costs six everywhere: the move costs it nothing because it was already as dear as a conic can be.

A move adds the cosines the gradient brings. The ellipse x² + 2.2y² = 1.6 expanded into cosines of whole-number combinations mα + nβ of the arm's two angles, each labelled (m, n). With the pivot at its centre: (0, 2), (1, -1), (1, 1), (2, 0). With the pivot at (0.3, 0.2): (0, 1), (1, 0), (0, 2), (1, -1), (1, 1), (2, 0). The new ones are the arm's own angles alone, which are what the linear terms x and y expand into — and the linear terms a move adds are the ellipse's gradient at the new pivot, nought only at the centre.
Fig. 3 The ellipse’s equation expanded into cosines of the arm’s angles, each labelled by its combination (m, n): with the pivot at its centre, and at (0.3, 0.2), with the two terms the move adds marked.

For a cubic the new terms are quadratic, its second derivatives at the pivot. A quadratic generally brings in all four of its combinations, but one of them, (1, −1), is special: cos⁡(α−β)\cos(\alpha - \beta) is what x2+y2x^2 + y^2 expands into, the squared distance from the pivot, and its amplitude is the trace of the quadratic part — for the new terms a move brings, half the Laplacian of the cubic part at the pivot. Where that Laplacian vanishes, the combination (1, −1) is missing and the count is one lower. For the folium, x3+y3x^3 + y^3 has Laplacian 6x+6y6x + 6y, which vanishes on the line x+y=0x + y = 0: the folium’s locus.

On the folium's line one term cancels exactly. The folium x³ + y³ − 1.5xy = 0 with the arm's pivot moved to (t/2, t/2), across the line x + y = 0 on which its count is 11: the amplitude of the one cosine, cos(α − β), whose presence makes the difference. -0.4: 1.200 (12 terms), -0.3: 0.900 (12 terms), -0.2: 0.600 (12 terms), -0.1: 0.300 (12 terms), 0: 0.000 (11 terms), 0.1: 0.300 (12 terms), 0.2: 0.600 (12 terms), 0.3: 0.900 (12 terms), 0.4: 1.200 (12 terms). It is 3|t| exactly: half the Laplacian of the folium's cubic part, 6(x + y), at the pivot, which is the trace of the moved equation's quadratic terms: the part that is a multiple of x² + y², the only quadratic that expands into cos(α − β).
Fig. 4 The folium with its pivot moved across the line x + y = 0: the amplitude of cos(α − β) in its moved equation, and its number of terms, at each distance.

Measured, the amplitude of cos⁡(α−β)\cos(\alpha - \beta) is exactly three times the pivot’s displacement across the line in the units of the figure — 0.3 at a tenth, 1.2 at four tenths — and nought on it, where the count drops from 12 to 11. The cubic x3−0.2x−yx^3 - 0.2x - y is cheaper on its line for a stronger reason. Its only cubic term is x3x^3, whose second derivatives at the pivot all vanish when x0=0x_0 = 0, so on that line a move adds no quadratic terms at all and the count stays at 8.

The quintic is cheap at one point

The quintic is cheap at one point. The quintic x⁵ + 0.4x²y − y = 0 with the arm's pivot moved along the x-axis (round) and along the y-axis (square), in steps of 0.05. At the catalogue's pivot its equation has 18 terms. Moved along the y-axis, where x stays nought, it has 22: the move adds the multiple of x² that 0.4x²(y + y₀) leaves, four cosines. Moved along the x-axis it has 30, the most a quintic of this kind can have, because x⁵ shifted spills into every lower power of x.
Fig. 5 The quintic with its pivot moved along the x-axis and along the y-axis, in steps of 0.05: the number of terms in its equation at each position.

The quintic x5+0.4x2y−y=0x^5 + 0.4x^2y - y = 0 shows the same mechanism with more room. Moved along the y-axis, so that x0x_0 stays nought, x5x^5 is untouched and 0.4x2y0.4x^2y becomes 0.4x2y+0.4y0x20.4x^2y + 0.4y_0x^2: one new quadratic, four new combinations, 22. Moved anywhere with x0x_0 not nought, x5x^5 spills into x4x^4, x3x^3, x2x^2 and xx, every one of them bringing combinations the catalogue form lacks, and the count is 30, the most this curve reaches anywhere in the square.

That changes how the earlier essay’s best result reads. The quintic was nearly free because four of its eighteen terms — a line through the pivot bent by the square of the radius — draw it to 1.4% of the reach. Those eighteen terms are the quintic seen from one point. From a pivot a twentieth of a link to the side, the same curve’s equation has thirty, and nothing here says that its nearest cheap curve is still near: the cheap family is lines through the pivot, and the quintic passes through the pivot only at the catalogue’s point. Its cheapness belongs to where the arm is as much as to the curve.

The ellipse’s nearest cheap curve

Exact counts are one price. The earlier essay’s other price was the distance to the nearest curve a smaller budget can build, and that needs the full search, which is quick for a conic. With the arc being priced held fixed as the arc the catalogue placement draws — moving the pivot must not also change how much curve is asked for — the ellipse was priced at every pivot, in steps of 0.1, from which the arm reaches the whole ellipse: 197 of them.

The ellipse's nearest cheap curve is no nearer from anywhere else. The ellipse x² + 2.2y² = 1.6 priced from 197 pivots in steps of 0.1 — every one from which the arm reaches the whole ellipse — by the nearest curve of degree two with at most three terms (rings) and at most four (dots), in link lengths. At its centre the three-term price is 0.228; over the other pivots it runs from 0.224 to 0.251. Four terms are exact at the centre only; a tenth of a link away they leave 0.112 at best, and from a fifth of a link out the fourth term buys nothing at all.
Fig. 6 The ellipse priced from every pivot that reaches all of it: the distance to its nearest curve of degree two with at most three terms and with at most four, against the pivot’s distance from the centre.

At three terms the price barely moves: 0.228 link lengths from the centre, and between 0.224 and 0.251 from everywhere else. No pivot buys a nearer three-term curve worth having. At four terms the centre is exact and every other pivot is not: a tenth of a link away the best four-term curve is still 0.112 away, and from a fifth of a link out the fourth term buys nothing at all over the third. The ellipse is expensive in itself at every budget below its own four.

A jump in count, a slope in size

The count is a whole number, so leaving the locus is a jump: the folium goes from 11 to 12 the moment its pivot leaves its line, however small the step. The terms that jump in are small, though. The folium’s new cosine grows in proportion to the distance from the line, and the ellipse’s two new ones are its gradient at the pivot, which grows in proportion to the distance from its centre. A pivot a little off the locus costs a few more gadgets, each with a little amplitude.

That is what the ellipse’s prices show. A tenth of a link from its centre, the best four-term curve is 0.112 away: the four terms are the ones the centred ellipse uses, and the nearest curve they can build is essentially that ellipse with its centre back on the pivot, a tenth of a link from where it should be. The price of dropping the small new terms is the misplacement itself. The centred ellipse slid back onto the pivot is exactly a tenth of a link from the real one at the ends of its long axis, and the search, which fits by least squares and then measures the worst distance, lands slightly above that, at 0.112. From about a fifth of a link out the misplacement costs more than giving up a term altogether, and the four-term price joins the three-term price at around 0.23.

So a designer who cannot put the pivot exactly on the locus has a choice the counts alone hide. Pay for the extra terms and draw the curve exactly, or drop them and draw the curve as if the pivot were on its locus, with an error about the size of the misplacement. For a pivot misplaced by a manufacturing tolerance the second is cheap and nearly exact. For a pivot deliberately put somewhere else it is no use, and the full count is the price.

What a designer can take

Mount the arm where the curve’s own equation is simplest. That is a centre of symmetry for a centred curve and, for a cubic, a point where the Laplacian of its top-degree part vanishes. The catalogue’s placements are such points, and any other placement of the pivot costs terms.

A dear curve stays dear. The ellipse, the parabola, the lemniscate and the folium cost the most they can cost with the pivot almost anywhere, and their best placement is the one the earlier census already priced. Exact costs more than close found that close beats exact for straight lines; for these curves no placement of the pivot makes close cheap either.

A cheap curve may be cheap only where it is. A curve that a few terms draw well, as the quintic is, should be checked from the pivot the machine will actually have. Two circles for the price of one found curves that cost nothing extra because they share a cosine with another; the quintic is the converse case, a curve whose savings belong to a single point.

What the pivots do not settle

A square about the catalogue’s pivot. The search covered pivots within one link of each catalogue position. The counts are integers and the loci are explained by vanishing derivatives, which do not depend on how far away the pivot is, so nothing is expected to change further out, but it was not measured.

Pivots on the curve. The earlier essay suggested a pivot on the ellipse itself, where the curve passes through the pivot once with one tangent. No pivot on the ellipse can reach the whole ellipse, so it could not be priced on the same arc, and a different arc would make a different question.

Eight curves. The floor, the ceiling and the loci were measured on the catalogue’s eight curves. The argument from vanishing derivatives says what to expect of any other: a locus where the derivatives a move would add vanish or cancel, and the ceiling everywhere else unless the top-degree part is built from the distance to the pivot. A curve with more than one centre-like point, or none, would test it.

The quintic’s nearest curves from other pivots. Its nearest-curve search takes about half a minute a pivot and was not run over the square; how far its four-term price rises off the catalogue’s point is the open question below.

Still open: how far the quintic’s cheapness reaches

The quintic’s exact count jumps from 18 to 22 or 30 the moment the pivot leaves its point, but the nearest four-term curve is a different price. It is built from lines through the pivot bent by powers of the radius, and a curve that passes near the pivot, rather than through it, might still be near one of those.

The distinct argument would be the quintic’s four- and six-term prices as the pivot moves off its point, along the line x=0x = 0 where its exact count is 22 and across it where the count is 30. If the four-term price rises smoothly from 1.4% of the reach, a nearly-free curve is nearly free from a neighbourhood of pivots, and the exact count overstates what moving costs. If it jumps, the quintic’s cheapness is as much a property of one point as its exact count is, and a compiler handed a quintic should move the pivot to it before doing anything else.

What this makes readable

Essays that name this one as a prerequisite.

About the same objects

Not linked from either essay — found by the objects both name.

What links here

Essays that link to this one from their own argument.

The objects this essay names

Each one links to every other essay that touches it.

Algebraic curveCost modelFrequency pairImplicit equationSparsityTwo-link arm