# Math Quiz 10

**
**The XY coordinates in the attached file describe the shape of a plane curve.

There exists a coordinate system in which the shape can be perfectly* defined with a very simple equation.

Find that equation.**

*for purposes of this exercise, let’s say that means within 1 ppm for each coordinate
*
*

MQ10 XY data.csv (2.12 KB)

MQ10 XY data.csv (2.12 KB)

In cartesian space, the closest logarithmic fit is about y=0.22*ln(x)+0.22.

This is still not great though, it is a decent approximation for values with x<0.3, but is worse between 0.3<x<0.6. Also, the accuracy is nowhere close to 1ppm.

*You can fit a 4th-degree rational function that’s accurate within ±0.0045, but that’s not “simple” and it’s not within 1 ppm.

``````y =  ( 0.014276438 - 0.802004924*x - 15.16719888*x^2 + 66.06068525*x^3 - 36.17009406*x^4 )  /  ( -0.017352118 + 0.530402174*x + 47.33893283*x^2 + 22.84085288*x^3 + 63.98324943*x^4 ) + 0.001
``````

There’s a better way…

Ether,
are you just looking for “here’s my answer” with work shown, or could we start posting “here’s what I tried; here’s what I’ve ruled out; I’ve got some speculation on how/what needs to be done”?

To be clear, I’m fine with either, just wanted to know what parameters should be followed for posts.

Thanks.

Thanks for bringing that up.

The purpose of these quizzes is to start a conversation from which both participants and readers can gain insight. The journey is as important as the goal.

Thanks.

Ok, so here’s what i’ve got:
The problem statement says a coordinate system exists, but it doesn’t state if it’s Cartesian, or polar, or maybe even something else. The equation is “simple” but something simple in a polar coordinate system can be complex in a Cartesian one. It’s also undetermined what the origin of said system is.

I know it’s not a circle (polar, r=constant). The perpendicular bisectors of each adjacent point segment aren’t close to intersecting at a single point.

I tried rotating the points to get a good fit on a parabola, which would have a relatively simple equation, assuming the origin was on the vertex. The best I got was around 142.5 degrees clockwise, but that didn’t quite match up.

Also, the radius of curvature appears to be increasing from the starting point until the ending point.

Other observations:
The points are not equidistant in spacing. The minimum distance appears to be around the 5th or 6th point.
I couldn’t find a rotation which places the x or y coordinate in equal spacing in Cartesian coordinates.

Excellent observations. Reps to you!

Perhaps you (or someone else) can build on those observations.

*

Hmm… Intriguing.

Perhaps some sort of spiral equation?

OK, so how to further explore that hypothesis?

*

I haven’t had time to work this out thoroughly, but if the points are equally spaced in the theta direction of a polar coordinate system, I think you could derive the coordinate system origin.

with playing around with a spreadsheet, I think it’s in the vicinity of 0.86,-0.51 and the theta interval is 0.025 radians.
as far as taking a swag at the final answer, since it’s supposedly “simple” I’m going to guess r=theta.

More rigorous work will follow soon, hopefully.

I had the same idea as MechEng83 last night, then started with his solution this evening (also in a spreadsheet, which I cleaned up just a bit and posted). My goal was to minimize the ratio of the standard deviation of the angle with its mean. (Actually, I used the sine of the angle, much easier to calculate with a cross product.) The point kept marching up and to the right. I eventually hit paydirt.

The center point where all of the angular displacements are the same is
(1.16, -0.3)
At this point, the angular displacements are all exactly 1 degree (to within the precision of the numbers as given). Using the mathematical convention (x axis is 0 degrees and the y axis is 90 degrees), the points span the range from 139 to 199 degrees, inclusive.

While the radial function increases monotonically as the points are given, it appears to be somewhat concave down. Of the stock excel fits, polynomial (quadratic by default) is better than the others, but is not an exact match.

An explanation of the spreadsheet is in order. The top two rows were used to create the “origin” for the polar coordinate system. Each cell to the right of C1 and C2 was added with another power of 1/10 to create C1 and C2. This let me manually migrate towards a minimum value for the scaled deviation. Row3 just has the results I was trying to optimize on. Row 4 is headers for the table. Below this, columns A and B are Ether’s data. Column C is the distance from the origin (not used). Columns D and E are the x and y values relative to the origin specified by (C1,C2). Column F is the distance of the point from the point (C1,C2). Column G is the change in the sine of the angle from (C1,C2) to this point and the next. Column H is the angle in degrees from (C1,C2) to Ether’s point, x towards y, in the range from 0 to 360.

OBTW, I’ve been working MQ9 for the cube extension off and on. I think I have all of the terms integrated on scratch paper, but I’m still writing them up and checking. I definitely have the mean distance from the origin to an arbitrary point complete, but the random line has eight times as many terms to start, and several of those are quite a bit nastier than the distance from the origin.

MQ10-polar-origin.xlsx (28.3 KB)

MQ10-polar-origin.xlsx (28.3 KB)

Impressive work Gus.

Of the stock excel fits, polynomial (quadratic by default) is better than the others, but is not an exact match.

Try rotating the polar axis and fitting the power function r = θb

*

*Using the analysis results from Gus’ last post, and the hint in post 13, the final solution step is quite straightforward.

Open a LibreOffice spreadsheet and populate columns A and B with the XY data. Label the data in column A x_data. Label the data in column B y_data.

In column C put degrees from 139 to 199 stepping by 1.

In column D put radians equivalent of column C: colD=colC/180*pi()

Initialize cell O2 to zero

Label cell P2 “_b” and initialize it to one.

Label cell L2 “_a” and put the formula = O2/180*pi()

In column E put the 2-parameter polar equation model:
r = (colD - _a)^_b

In column G put formula colE*COS(colD)+1.16
Label the data cells in this column x_model

In column H put the formula colE*SIN(colD)-0.3
Label the data cells in this column y_model

In cell M2 put the formula SUMXMY2(x_data,x_model) + SUMXMY2(x_data,x_model). This is the objective function for the Solver.

Tools | Solver
Target Cell M2
Minimum
By changing cells O2 : P2
Solve
click continue a couple of times to refine the value

When I saw θb, my mind read “theta flat” :o .

In any case, I found the answer a different way:
Assuming that r=θb, we know that dr/dθ = bθb-1, so that r/(dr/dθ) = θ/b. I therefore calculated the slope of r using the numbers given. The intercept of the line with r=0 is therefore (a good approximation to) θ[sub]0[/sub], and the slope is (approximately) 1/b. My spreadsheet gave a θ[sub]0[/sub] of 2.007223652 radians, or 115.0054438 degrees, and a b=0.499973651. These did not work out exactly, but a bit of tweaking found that 115 degrees and 0.5 worked “exactly”.

Using the mathematical polar coordinate system centered on 1.16, -0.3 and rotated 115 degrees counterclockwise, the equation is simply:

r = √θ

Going back to calculate the original series:
D = [139…199]
θ[sub]1[/sub] = D * π / 180
θ = (D-115) * π / 180
r = √θ
x = cosθ[sub]1[/sub] + 1.16
y = sinθ[sub]1[/sub] - 0.3

An updated spreadsheet with a “double check” tab is attached. The maximum error in the reconstructed x and y is less than 10-14.

MQ10-polar-origin.xlsx (46.7 KB)

MQ10-polar-origin.xlsx (46.7 KB)