In white the direction coefficients.
The quadrilaterals are numbered in the style of Gaspalou: Aij: Area
at row i and column j.
S = A11+A12+A13=3.A22=37702429563
A check on the difference between the approximation of the value of
S given the values of m[i] and Aij reveals |approx(S)-S|<0.1 for all
4 equations described below. However, I used a different set of
In the given link the work by Gaspalou can be found. He uses a
square of size 6u by 6u. The total area is therefore (6u)^2 which
should equal 3S, with S the magic-square constant. So one could
substitute u^2=S/12 in his equations to find the correct value for
I decided to try and find similar equations using a slightly
different approach, compared with Gaspalou:
Take the origin in the center of
the magic square
I prefer that the absolute size of
the parameters m[i] in the equations are nearly equal
I prefer that the construction
process is still visible in the presentation of the equations.
For the near horizontal lines I used a direction-vector of the form
(1,m[i]), i.e. m[i]=direction coefficient.
For the near vertical lines I used a direction-vector of the form (m[i],1),
i.e. m[i]=1/(direction coefficient).
Initial values of these parameters
are found by considering the initial areas in the corners as
For instance m1=(sqrt(A11)-sqrt(A13))/(sqrt(S-A11-A13)=-0.06848
pretty close to -0.0768
The equations are:
Maybe you can appreciate the symmetry here. Every equation is
invariant to the order of the values m[i].
In this case each equation can be written as a function of m[i]+m[j]
and m[i].m[j], as an example:
24.(1-m1.m2)^2.A13 = -S [(m1+m2)(9(m1.m2)^2-17(m1.m2)+8)-6(m1.m2)^2+14(m1.m2)-8]
As a side note: if the Aij are about the same size we expect the m[i]
to be close to 0, so m[i].m[j] is much closer to 0.
If we put this product equal to 0 we get, as an approximation:
24.A13 = approx = 8.S [1-(m1+m2)]
This suggests that if A13>S/3=A22 we should have m1+m2<0 as is the
The two pairs of equations belonging to A11,A33 and A13,A31 are
Only a few signs must be changed, due to the quadrant in which the
Aij are situated.
This can be written into 4 equations, F[i](m1,m2,m3,m4)=0, each of
which is a polynomial in 2 of the m[i] and of order 3.
One could solve these by using F+J.dm=0.
Here F is
a vector consisting of the F[i], J the
Jacobian of F, dm a
vector of sought increment of m (a
vector of the m[i]), so in the next step we use m+dm.
This process will only be numerically stable if the pivots in the
matrix J are
not close to 0. Or in other words the increment dm will
not suddenly ďgo all over the placeĒ.
For those people who are not into Linear Algebra, an example:
=x^2y^2-1 + 2x^2.ydy+2y^2.xdx+ terms of
higher order in dx,dy
Where we assume that if dx,dy are small, the terms of higher order
in dx,dy will be very close to 0
Start with values for x,y and assume F(x+dx,y+dy) will be 0, we get
an equation like:
A second function G(x,y) would give a second linear expression in
dx,dy which we could solve together.
The Jacobian J consists
of the partial derivatives of these functions F en G towards x and y
(in matrix form).
Here dF/dx=2x^2.y and dF/dy=2y^2.x, the same expressions, which are
of course much easier to compute.
The expression for F(x+dx,y+dy) describes the tangent plane at the
graph of F(x,y) at the point (x,y). We look for the point in this
plane where F(x+dx,y+dy)=0. Or in other words, the same process as
applying Newton Raphson.
I didnít find a criterion relating the numbers Aij with existence of
a solution (I didnít try). For instance the fact that the lines
belonging to m1 and m3 must intersect on or outside the magic-square
translates to |m1-m3|<2/3. But since the equations are rather
complex this does not translate easily to the given numbers/areas.
My intuition tells me the ratio of the areas in the opposite
diagonal corners of the magic square canít be too large (if one
divides the larger value through the smaller one).
In the blog of William Walkington the given magic square with the
numbers 2..10 would give a ratio of: 9/3=3. All other shown magic
squares with a solution have a smaller maximum value for this ratio.
The square with the numbers 1..10 (which has no solution) has a
value of 8/2=4>3.
The prime magic square with A11=43,A13=67,A33=31,A31=7 and S=111 has
a maximum ratio of A13/A31=67/7 and does not give a solution.
He already sent this on Feb 04, 2017:
The Prime Area Magic Square with minimal magic sum S=213.
On Feb 25, 2017, Jan sent a new contribution
on the same theme.
The major new issues are:
a) Invariance relation between the
b) Two algorithms
c) Area semi-magic squares with integer
Please see his contribution