M65. Mixed derivatives, between walls

Package: A7, its first part: a mixed derivative in a stationary equation on a box, as in \(u_{xx} + b\,u_{xy} + u_{yy} = f\). The modes of the axes do not hold it, and the iteration of milestone 63 does: it is one more term of the remainder.

What was built

  • A mixed derivative in the remainder. bounded_varying reads a term \(b\,\partial_i\partial_j u\) of a stationary equation on a box, with \(b\) constant or varying, as a term of the remainder with nothing that stands for it in the operator of the modes. With constant coefficients the term is taken out of the linear form of the equation before the modes are asked for it.

  • A check that the equation is elliptic. The coefficients of the second derivatives make a symmetric matrix at every sample point, which must have one sign. An equation that fails is refused with the reason, and the bound \(b^2 < 4ac\) in it.

  • A plan that says what it does. The plan names what the iteration replaces: the coefficients that vary, the mixed derivative, or both.

  • Refused as before: a mixed derivative in time, on a round domain and in an eigenproblem, and every derivative above the second order. The message for boxes no longer speaks of constant coefficients.

What it reaches

On the unit square, with the value given on its sides, for \(\nabla^2 u + b\,u_{xy} - u = f\) with a solution that is known:

\(b\)

Grid

Steps

Largest error

Time

0.5

\(24^2\)

13

\(6\cdot10^{-13}\)

0.01 s

1

\(24^2\)

20

\(10^{-12}\)

0.01 s

1.5

\(24^2\)

30

\(4\cdot10^{-12}\)

0.01 s

1.8

\(64^2\)

53

\(4\cdot10^{-12}\)

0.15 s

1.95

\(64^2\)

98

\(10^{-11}\)

0.24 s

\(\cos 3x\), in the medium \(1 + x^2\)

\(24^2\)

17

\(2\cdot10^{-12}\)

0.03 s

The unit cube, with \(\tfrac12 u_{xy} - 0.6\,u_{yz}\)

\(16^3\)

15

\(9\cdot10^{-14}\)

0.09 s

The tests check a plate with the value on three sides and the slope on the fourth, with the error falling by more than fifty from 6 to 9 and from 9 to 12 points, the same with \(b = -1.8\) and with the sign of the equation turned, a mixed coefficient that varies in a medium, a cube with two mixed derivatives, and a mixed derivative beside a cubic term, which Newton’s method solves.

Decisions

D65.1. The mixed derivative is iterated on, with no reference

Developer, 2026-11-20.

Three ways lead to a mixed derivative on a box. A solve in the full tensor basis is dense in every pair of axes that the derivative joins: the cube of the points of a plane in work, and out of reach in space. A change of coordinates that removes the derivative shears the box, which is then no box, and does not exist for a coefficient that varies. The iteration of milestone 63 takes the term as it is.

The term has no mean that the modes could hold, so all of it is remainder. It is of the order of the operator, unlike the remainder of a medium, and the iteration contracts by \(|b|/(2\sqrt{ac})\) for short waves: by less than one for every elliptic equation, on every grid. So the steps do not grow with the grid, and they do grow towards the bound: a hundred at \(b^2 = 0.95\cdot4ac\), and 183 at \(b^2 = 0.99\cdot4ac\). That was taken as good enough. The limit of two hundred steps that the iteration has by itself is not raised, and an equation still closer to the bound fails with the message that names max_iterations.

D65.2. Ellipticity is checked before the solve

Developer, 2026-11-20.

Without a check, an equation that is not elliptic would end in an iteration that does not converge, with advice to raise its steps, or would converge to the solution of a problem that the conditions do not pose. So the matrix of the second derivatives is looked at on the samples that milestone 63 takes for the means, eight along each axis, and must have one sign there. For a complex coefficient its real part is taken, which is strong ellipticity. Without a mixed derivative the check of milestone 63 stands as it was, coefficient by coefficient.

D65.3. In time and on round domains the refusal stays

Developer, 2026-11-20.

In time the terms outside the operator of the modes are stepped, and a term of second order that is stepped limits the step as an explicit method does. On a round domain the derivatives of a field on the grid are not taken (milestone 63). Both stay refused, and a region of the plane takes the stationary case on a disk.

D65.4. Singular corners are reported, not treated

Developer, 2026-11-20.

A mixed derivative shears the equation, and a corner of the box that opens wider than a right angle in the sheared coordinates has a singularity \(r^{\pi/\omega}\) whenever the data do not fit: \(r^{3/2}\) for \(\nabla^2 u + u_{xy}\). Collocation on a box has no mesh to shrink. The planner measures the spectrum of the solution as before and says that it is not resolved, and the method page names the region of the plane as the way to more digits.

What is left

  • The plate equation \(\nabla^4 u = f\), with two conditions on each face.

  • A mixed derivative in time, in an eigenproblem and on a round domain.

  • A preconditioner that holds the mixed derivative, for equations close to where they stop being elliptic.