The curve as an equation

The quintic's cheapness runs along a line

A quintic whose equation costs a compiled machine eighteen cosines is drawn to a few per cent of the arm's reach by four of them, and its exact count jumps to 22 or 30 the moment the arm's pivot moves. Priced by the nearest curve instead, the two directions part completely. Along the line x = 0 the nearest four-term curve stays within 7.3% of the reach out to 0.4 of a link and the nearest six-term within 3.4%. Across it the four-term price goes from 3.2% to 18% between a twentieth and a tenth of a link, and from 0.15 on four terms buy nothing over three. The move along adds four cosines of amplitude 0.2 and 0.4 times the move; the move across adds twelve, sixty to ninety times larger in total.

Assumes Moving the pivot only adds terms and Four terms of eighteen draw the quintic.

A compiled machine draws a curve with the tip of a two-link arm, and its cost is set by the curve’s equation: every curve is a sum of cosines of whole-number combinations of the arm’s two angles, and each cosine is a gadget the machine compiled has to build. Four terms of eighteen draw the quintic found one catalogue curve that is nearly free. The quintic x5+0.4x2y−y=0x^5 + 0.4x^2y - y = 0 costs eighteen cosines exactly, and four of them, a line through the pivot bent by the square of the radius, come within 1.4% of the arm’s reach.

Moving the pivot only adds terms then asked whether an expensive curve could be made cheap by mounting the arm elsewhere, and found that no curve can: the catalogue already put each pivot where its equation is shortest. The quintic’s count went from 18 to 22 when the pivot moved along the line x=0x = 0 and to 30, the most its shape allows, when it moved anywhere else. That essay ended with the question this one answers. The exact count jumps the moment the pivot moves, but the nearest four-term curve is a different price, and it might rise smoothly, in which case a nearly free curve is nearly free from a neighbourhood of pivots, or jump with the count, in which case the quintic’s cheapness belongs to one point.

It does neither. Its cheapness belongs to a line.

Along one line the nearly free curve stays nearly freeThe arm's pivot is fixed at the centre of its reach (dashed); the quintic x⁵ + 0.4x²y − y = 0 is drawn with its own point — where the catalogue put the pivot — moved 0.2 of a link along the line x = 0, which is the same as moving the pivot the other way. Heavy: the arc priced, the part of the quintic within 1.4 of its own point. Thin: the nearest curve built from at most four cosines of the arm's angles, found by trying every set of four: 6.0% of the reach away, the line through the pivot bent by the square of the radius. The equation itself costs 22 cosines here.the quintic's priced arc, 22 terms exactnearest with four terms, 6.0% of the reachblack: the arm's pivot · ring: the quintic's own pointalong 0.2
Fig. 1 The arm’s pivot fixed at the centre of its reach, and the quintic moved instead, its own point marked with a ring. Heavy: the arc priced. Thin: the nearest curve built from at most four cosines. The slider moves the quintic along the line x = 0 and across it.

An arc every pivot can reach

The earlier price was taken on the whole of the quintic inside the arm’s reach, and that arc runs out to the edge. A pivot moved by any amount in any direction loses a piece of it, and the search refuses a pivot that cannot reach everything it is asked to draw, because moving the pivot must not also change how much curve is being priced.

The quintic fills the reach, so a shorter arc is priced from every pivot. The quintic x⁵ + 0.4x²y − y = 0 inside the arm's reach of 1.95 from the catalogue's pivot (dashed). The arc the earlier price was taken on runs out to the edge of the reach, so a pivot moved by any amount fails to reach part of it. The price here is taken on the part within 1.4 of the quintic's own point (heavy, inside the dotted circle), which every pivot within 0.55 reaches whole. Marked: the pivots priced, 6 along the line x = 0 (squares) and 6 across it (rings), at 0.05, 0.1, 0.15, 0.2, 0.3, 0.4 of a link, shown four times larger in the box on the right.
Fig. 2 The quintic inside the arm’s reach from the catalogue’s pivot, the arc within 1.4 of its own point drawn heavy, and the twelve pivots priced, magnified four times in the box: six along the line x = 0 and six across it.

So the price here is taken on a shorter arc, the part of the quintic within 1.4 link lengths of its own point, which keeps both of its bends and drops the steep ends. Any pivot within 0.55 of a link of the catalogue’s reaches all of it. The same arc is priced at the catalogue’s own pivot too, so that every number below is compared with its own reference rather than with the earlier one. On this arc the catalogue’s pivot gives 2.5% of the reach at four terms and at six. The earlier 1.4% was taken on more curve and is not comparable.

The price itself is the one the earlier essays used. Every set of cosines up to the budget is tried; within each set the curve of the quintic’s degree that uses only those cosines is fitted to points of the arc by gradient-weighted least squares, and the fit is charged the worse of two distances, from the arc to the fitted curve and from the fitted curve’s own points inside the reach back to the arc, so that a close fit with a stray branch elsewhere pays for it. A least-squares fit is not the curve that minimises the worst distance, so each price is an upper bound on the true nearest curve’s distance. It is the same bound at every pivot, which is what a comparison between pivots needs.

Along the line the price barely moves

Across the line the four-term price jumps; along it, it barely moves. The quintic priced on its arc within 1.4 of its own point, with the pivot moved along the line x = 0 and across it. Along: 0, four terms 2.5%, six 2.5%; 0.05, four terms 1.6%, six 1.6%; 0.1, four terms 2.3%, six 2.2%; 0.15, four terms 4.7%, six 1.6%; 0.2, four terms 6.0%, six 1.8%; 0.3, four terms 7.3%, six 2.5%; 0.4, four terms 7.1%, six 3.4%. Across: 0, four terms 2.5%, six 2.5%; 0.05, four terms 3.2%, six 3.2%; 0.1, four terms 18.4%, six 5.6%; 0.15, four terms 33.6%, six 7.4%; 0.2, four terms 33.8%, six 8.9%; 0.3, four terms 34.0%, six 15.9%; 0.4, four terms 33.7%, six 23.6%. The nearest three-term curve is 33% to 41% away throughout (grey band): from 0.15 across, four terms are no better than three.
Fig. 3 The nearest four- and six-term curves’ distances as shares of the reach, against how far the pivot has moved, along the line x = 0 and across it. The grey band is the nearest three-term curve’s distance at every pivot.

Moving the pivot along the line x=0x = 0, the exact count is 22 at every pivot tried, and the nearest four-term curve’s distance runs 1.6%, 2.3%, 4.7%, 6.0%, 7.3% and 7.1% of the reach at 0.05, 0.1, 0.15, 0.2, 0.3 and 0.4 of a link. It rises, but slowly, and it levels off. At every one of these pivots the four cosines the search chooses are the same four as at the catalogue’s point, the line through the pivot bent by r2r^2, which is the family the cheapest curves at each degree found cheap. The six-term price barely moves at all: 1.6% to 3.4% over the same range.

Two of those numbers are below the catalogue’s own 2.5%. A twentieth of a link along the line, the search finds a four-term curve within 1.6%. That is a statement about an upper bound, and the catalogue’s pivot might have a closer four-term curve that least squares does not find. But it means the catalogue’s point is not where the approximation is best, only where the exact count is least, and the two questions have different answers.

Measured in link lengths rather than shares, the four-term price at 0.3 of a link is 0.146, about half the move. The ellipse in moving the pivot only adds terms paid roughly its whole misplacement when its new terms were dropped: the nearest curve with its old cosines was the centred ellipse slid back onto the pivot. The quintic along its line pays less than its misplacement. Its four cheap cosines are not drawing the old quintic in the wrong place; they are drawing a different four-term curve that follows the moved one.

Across it the price jumps

Moving the pivot the other way, along y=0y = 0, the exact count is 30 at every pivot tried, and the four-term price is 3.2% at 0.05 of a link, 18.4% at 0.10 and 33.6% at 0.15. From there on it does not move again, because from 0.15 the nearest four-term curve is no closer than the nearest three-term one: the bent line has stopped being worth its fourth cosine and the best four terms are simply the best three. The six-term price rises at every step instead of levelling, 3.2%, 5.6%, 7.4%, 8.9%, 15.9% and 23.6%.

In link lengths the four-term price at 0.05 is 0.063, a little more than the move, the ellipse’s behaviour. At 0.10 it is 0.37, nearly four times the move. Somewhere between a twentieth and a tenth of a link across the line, the four cheap cosines stop being able to follow the quintic at all.

So the answer to the earlier question has two halves. Along the line x=0x = 0 the quintic’s cheapness reaches at least four tenths of a link and is still there; across it, it ends inside a tenth. The exact count was right to single out the line, where it is 22 instead of 30. What it could not say is that the line is where nearly all of the cheapness lives.

How four cosines follow a moved curve

The four cosines of the bent line are not the whole of what a four-term machine can draw. A constant in the equation costs nothing, because it needs no gadget, and every four-term curve the search found carries one. With it the family is

k+(a+b r2) x+(c+d r2) y=0,k + (a + b\,r^2)\,x + (c + d\,r^2)\,y = 0,

and kk is what lets the curve leave the pivot. Without it every member passes through the pivot, as the catalogue’s quintic does; with it the bent line can be moved off. Along the line x=0x = 0 the quintic’s own point, where its flat middle crosses the line, sits at (0,−y0)(0, -y_0) in the arm’s frame, and the nearest four-term curves cross the line at −0.045, −0.094, −0.149, −0.205, −0.318 and −0.430 for moves of 0.05 to 0.4: within 0.03 of the moved point every time, and within half a hundredth for every move up to 0.2. The free constant grows with the move, from 0.025 to about 0.12, and is spent on putting the curve’s crossing where the quintic’s is.

That is why the price along the line is less than the move. The four-term curve is not the old quintic left behind at the pivot; it is a bent line carried down the axis with the quintic, and what it pays for is only the difference between the two shapes once they are made to cross the axis together. That difference grows slowly, because the quintic’s own shape relative to its point does not change when the pivot moves, only its position does, and only the r2r^2 in the bent line, which is measured from the pivot, notices.

Across the line the same constant cannot do the same job. At a twentieth of a link the search still finds the bent line, at 3.2%. At a tenth it finds it again, at 18%, now crossing the line y=0y = 0 in three places. From 0.15 on the best four terms are three: a constant, the two linear cosines and the r2r^2 cosine, which together are the equation of a circle. The circle it draws has a radius of 15 links at 0.15 and 7.7 at 0.4, centred far off to one side — a nearly straight line through the quintic’s flat middle, missing both bends, and 34% of the reach away. Of the cheap curves the cheapest curves at each degree catalogued, circles about the pivot and lines through it, this is the one that survives when the bent line cannot follow: the most a few cosines can say about a quintic seen from the wrong side is that it is roughly straight.

Four small cosines against twelve large ones

Why the line should matter that much follows from what each move adds to the equation. With the pivot moved by y0y_0 the equation in the arm’s frame is the old one with yy replaced by y+y0y + y_0, and since the quintic is linear in yy that adds exactly

y0 (0.4x2−1).y_0\,(0.4x^2 - 1).

The constant is free: a machine does not build a gadget for it. In the arm’s angles, with two links of one, x=cos⁡α+cos⁡βx = \cos\alpha + \cos\beta, so

x2=1+12cos⁡2α+12cos⁡2β+cos⁡(α+β)+cos⁡(α−β),x^2 = 1 + \tfrac12\cos 2\alpha + \tfrac12\cos 2\beta + \cos(\alpha + \beta) + \cos(\alpha - \beta),

and the move adds four cosines, two of amplitude 0.2y00.2y_0 and two of 0.4y00.4y_0, and changes none of the old eighteen. Against the quintic’s own largest amplitudes, 6.3 and 3.1, a move of 0.3 adds terms of 0.06 and 0.12.

Four small cosines against twelve large ones. The total change in the amplitudes of the quintic's cosines when the arm's pivot moves, summed over every cosine, new or old. Along the line x = 0 the move adds y₀(0.4x² − 1), four new cosines of amplitude 0.2y₀ and 0.4y₀, and changes no old one: 0.060, 0.120, 0.180, 0.240, 0.360, 0.480 at 0.05, 0.1, 0.15, 0.2, 0.3, 0.4. Across it the move adds x₀(5x⁴ + 0.8xy) and more, twelve new cosines and growth in the old ones: 3.64, 7.71, 12.21, 17.20, 28.69, 42.44 — between 61 and 88 times as much.
Fig. 4 The total change in the amplitudes of the quintic’s cosines caused by moving the pivot, summed over new cosines and old ones, against the size of the move on log axes, along the line x = 0 and across it.

Moving by x0x_0 instead replaces xx by x+x0x + x_0, and the quintic is of degree five in xx. To first order the move adds x0(5x4+0.8xy)x_0(5x^4 + 0.8xy), and higher powers of x0x_0 add more; the fourth power of a sum of two cosines spreads into every combination of frequencies up to four. Summed over every cosine the move creates or changes, it adds 3.6 at a twentieth of a link and 7.7 at a tenth, between sixty and ninety times what the same move along the line adds, and the ratio grows with the move.

The move across spills into every cosine. The amplitudes of the quintic's cosines with the arm's pivot moved 0.3 of a link along the line x = 0 (left) and across it (right), one row per pair of frequencies, largest first. Keyed above: what the catalogue's equation already had, a cosine the move created, and growth in one it had. Along: 22 cosines, four new, the largest new one 0.12, nothing old changed. Across: 30 cosines, twelve new, the largest new one 4.78, and 8 old ones grown.
Fig. 5 The amplitude of every cosine in the quintic’s equation with the pivot moved 0.3 of a link along the line x = 0 and 0.3 across it, one row per pair of frequencies, keyed by what the catalogue’s equation already had, what the move created and what it grew.

Side by side, the two equations at 0.3 show where the weight goes. Along the line, the four new cosines are slivers beside the old ones, the largest 0.12. Across it, the new cosine at frequencies (1, 1) and (1, −1) is 4.8, three quarters of the quintic’s largest original term, the new (0, 2) and (2, 0) are 3.1, and the old terms at (0, 1) and (1, 0) have grown from 6.3 to 8.3. The bent line uses (0, 1), (1, 0), (1, −2) and (2, −1). Along the line nothing it relies on changed and nothing large appeared beside it. Across the line all four of its cosines grew and the new ones are as large as the ones it uses, so any four-term curve has to give up something the size of the curve itself.

That is the precise sense in which the count, 22 against 30, orders the two directions without pricing them. It counts four new cosines against twelve, a factor of three. The amplitudes differ by a factor of sixty or more, and the nearest-curve price follows the amplitudes.

Pivot by pivot

The exact count and the nearest curves, pivot by pivot. For each move of the pivot, along the line x = 0 and across it: the number of cosines in the quintic's exact equation, and the distance of the nearest curve with at most four and at most six of them, as shares of the reach, on the arc within 1.4 of the quintic's own point. 0 (catalogue): along 18, 2.5%, 2.5%; across 18, 2.5%, 2.5%. 0.05: along 22, 1.6%, 1.6%; across 30, 3.2%, 3.2%. 0.1: along 22, 2.3%, 2.2%; across 30, 18.4%, 5.6%. 0.15: along 22, 4.7%, 1.6%; across 30, 33.6%, 7.4%. 0.2: along 22, 6.0%, 1.8%; across 30, 33.8%, 8.9%. 0.3: along 22, 7.3%, 2.5%; across 30, 34.0%, 15.9%. 0.4: along 22, 7.1%, 3.4%; across 30, 33.7%, 23.6%.
Fig. 6 Every pivot priced: the number of cosines in the quintic’s exact equation, and the nearest four- and six-term curves’ distances as shares of the reach, along the line x = 0 and across it.

Read as a table the measurements show the mismatch between the two kinds of price most plainly. The exact column is constant along each line and differs between them by eight, and the four-term columns differ by a factor of five to eight once the move reaches a tenth. A compiler that read only the exact count would think a pivot 0.4 along the line, at 22 terms, was nearly as bad as one 0.05 across, at 30. Priced by the nearest curve, the first is drawn to 7.1% with four cosines and 3.4% with six, and the second, a twentieth of a link off, is the last pivot across the line at which four cosines are worth having at all.

The same table also bounds what the shorter arc changed. At the catalogue’s pivot both budgets give 2.5%, which is higher than the 1.4% the full arc gave at four terms only because a different arc is being drawn; the drop from 33% at three terms to 2.5% at four is the same cliff as before. And six terms help along the line more than at the catalogue’s point: at 0.15 along, four terms are 4.7% and six are 1.6%, a split that never appears at the catalogue’s point, where four and six cost the same.

What a compiler should do with a quintic

Keep the pivot on the line, not on the point. A quintic like this one, symmetric through its own point and linear in yy, has a line of pivots, x=0x = 0, along which moving costs a handful of tiny cosines, and a four-term machine drawn from anywhere on it comes within a few per cent of the reach. The catalogue’s point is the cheapest place for the exact machine. For an approximate one, anywhere along the line within four tenths of a link is about as good.

Across the line, the tolerance is a twentieth of a link. A machine whose pivot is misplaced across the line by a manufacturing error of a few hundredths is still drawn well by four cosines. One misplaced by a tenth is not, and adding cosines buys back less than it does along the line: six terms are 5.6% a tenth across, against 2.2% a tenth along.

Price a move by what it adds, not by how many. A compiled machine and its own scale found that scaling a machine multiplies every coefficient at once and leaves its curve where it was; moving its pivot is the opposite case, a change that adds coefficients, and what it costs depends on their sizes. The size of the derivative a move adds to the equation is what the approximation has to absorb, and here it is 0.4x2−10.4x^2 - 1 in one direction and 5x4+0.8xy5x^4 + 0.8xy in the other. Two circles for the price of one found that cosines can be shared for nothing; this is the converse, cosines that are present and cost almost nothing to leave out. And exact costs more than close, found for straight lines, holds for the quintic too, with the margin set by a line of pivots rather than by one.

What the two lines do not settle

The pivots off both lines. Twelve pivots on two lines were priced, at about three seconds each with a budget of six cosines. Whether the cheap region is a narrow strip about x=0x = 0, a lens, or something with arms is not measured, and a square of pivots at the same spacing would take several minutes.

The arc. The arc within 1.4 of the quintic’s own point is a choice made so that every pivot can reach it. A longer arc would include more of the steep ends, where the bent line’s own shape is least like the quintic’s, and might move the levels, though not, by the argument from amplitudes, which direction is cheap.

The best curve, not the best fit. Every price is the worst distance of a least-squares fit, an upper bound on the nearest curve. That the catalogue’s point gives 2.5% and a twentieth of a link along gives 1.6% may only mean that least squares does better there; the comparison between the two lines is robust to that, since a factor of five to eight is not an artefact of the fit.

One curve. The cubic and the folium also have lines of cheapest pivots in moving the pivot only adds terms, and neither has a nearly free four-term curve to start with, so neither was measured. Whether a line of cheapest exact count is generally a line of cheapest approximation is open.

Still open: how wide the cheap strip is

Along the line x=0x = 0 the quintic’s four-term price stays below 7.5% to four tenths of a link, and across it the price passes 18% by a tenth. Between those two directions nothing is measured, and a pivot that is mostly along the line with a little across, the realistic case for a misplaced mounting, is exactly what the two lines do not cover.

The distinct argument would be the shape of the region of pivots from which four cosines draw the quintic within some fixed share of the reach, say five per cent. If it is a strip whose width is set by the across-the-line tolerance of about a twentieth of a link, then the amplitude argument is the whole story: whatever the move along, the cost is set by the component across. If it narrows as the pivot moves along the line, the two components interact, through the x0y0x_0 y_0 terms a diagonal move adds, and a tolerance cannot be stated one direction at a time. The measurement would price a grid of pivots within half a link of the catalogue’s on the same arc, and fit the five-per-cent contour.

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.

ApproximationCost modelFrequency pairLeast-squaresSparsityTwo-link arm