# Nondimensionalization

Here's a simple but interesting bit of math that came up while working on an implementation of Jakob and Hanika (2019). The reflectivity model they proposed is:

where are model parameters, and is a sigmoid function. Reflectivities tend to be rather smooth and the values of the polynomial not too large. If wavelengths are expressed numerically in nanometers, and especially will tend to be very small. This makes it harder to find minima of the function, as solvers tend get confused, unless special care is taken to change the default tolerances properly.

A more straightforward solution is to rescale to a more convenient range, a process a physicist would call nondimensionalization. Following the authors of the article, let

so that (and no longer has a physical unit) and

This makes solvers far more likely to converge, without having to fine tune their settings.

## Recovering the units

The interesting part is that having found the primed parameters, one can recover the unprimed ones. Start by equating and ,

Because is invertible, its inverse can be applied to both sides of the equation, resulting in an equality between the arguments. Then, replace with its definition and expand the right hand side,

Because the equation must hold for all , equate the two quadratic polynomials' coefficients to get the final answers.