Now what about well-definition? Also I wasn't referring to a sequence of package sizes and unit prices but rather to an ideal algorithm for generating the unit price for any package size once the unit price for a particular size is known.
I'll expand on my example of using the arithmetic mean, to show where well-definition comes in.
Let f denote our desired function (strictly decreasing and smooth on its natural domain), X>0 denote a particular size, and A>0 a particular unit price, and set f(X)=A. Then the price of a package of size X is AX.
What should f(x) be for any other value of x? Setting the variable a=f(x), it is clear that one extreme for the unit price is a constant, a=A, while the other is that which would render the package price constant, so that ax=AX, or a=AX/x; notice that when x=X, the extremes are equal.
Whatever algorithm generates f(x) must be well-defined (or self-consistent), so that if the algorithm is used upon (x,a) to generate f(X), it must show that f(X)=A.
It is evident that the limiting case f(x)=A is well-defined, while to show that the other limiting case, f(x)=AX/x, is well-defined, simultaneously replace X with x, x with X, and A with AX/x to obtain f(X)=AX/x*x/X, and upon cancelling, f(X)=A. There is also an essential symmetry to be seen from the earlier statement of this extreme, ax=AX, but the method I have used will be easier to understand when dealing with the other proposed algorithms.
Additionally, if we set the variable r=X-x then I would like whatever algorithm generates f(x) to satisfy the functional equation (X-r)f(X-r)+(X+r)f(X+r)=2AX; at the limiting extreme f(x)=A, or if X=x, this equation is easily satisfied, while at the other limiting extreme f(x)=AX/x, the functional equation becomes (X-r)AX/(X-r)+(X+r)AX/(X+r)=2AX, which simplifies to the true statement AX+AX=2AX.
A change of variable may make this easier to work with even though less symmetric-looking...in terms of x, the functional equation is xf(x)+(2X-x)f(2X-x)=2AX. This implies that f(x) should become infinite in the limit as x→0, because if f(0) were finite, then the equation would yield 2Xf(2X)=2AX, from which f(2X)=A, and f is supposed to be strictly decreasing (f(x)=A is a limiting case but not an actually acceptable solution).
An algorithm that should work here is the arithmetic mean of the extremes, f(x)=(1+X/x)A/2, which means xf(x)=(x+X)A/2, so that (2X-x)f(2X-x)=(3X-x)A/2, so their sum is (x+X+3X-x)A/2, which is 4XA/2, which is indeed 2AX; more generally, consider the mean weighted by P>0, given by f(x)=(P+X/x)A/(1+P), which means xf(x)=(Px+X)A/(1+P), so that (2X-x)f(2X-x)=((2P+1)X-Px)A/(1+P), so their sum is (Px+(2P+2)X-Px)A/(1+P), which is 2(1+P)XA/(1+P), which is indeed 2AX.
I believe that any algorithm satisfying that functional equation must be such a weighted arithmetic mean, and I suspect any proof of that statement would rely on the smoothness of f.
However, there is a problem: It is not well-defined, essentially because the roles of f(x) and A are not symmetric.
To see why, in f(x)=(P+X/x)A/(1+P), simultaneously replace x with X, X with x, and A with (P+X/x)A/(1+P), yielding f(X)=(P+x/X)(P+X/x)A/(1+P)2, which, remembering that f(X) is supposed to equal A, expands out to A=(P2+(x/X+X/x)P+1)A/(P2+2P+1) and simplifies to P2+2P+1=P2+(x/X+X/x)P+1 and further to 2=x/X+X/x, or 2Xx=x2+X2, or x2-2Xx+X2=0, or (x-X)2=0, so that x=X...which means that using the algorithm to derive f(x) from f(X), and then using it again to derive f(X) from f(x), will result in two different values for f(X)!
Because the values of f(x) under this algorithm depend on which initial choice is made, it is not well-defined; a similar argument shows the essence of well-definition, that once a particular f(x) is derived from f(X), the attempts to derive some f(y) will give different results if f(x) is used as the new base-point or the original base-point f(X) is used.
However, another simple algorithm for deriving f(x) from a specified f(X) is well-defined: the geometric mean of the extremes, f(x)=A*sqrt(X/x). A symmetry argument works well here, but let's use another line of argument intimated in the previous paragraph: From this algorithm, if x and y are fixed then, f(y)=A*sqrt(X/y), but if the base-point were f(x) instead of f(X), then X would be replaced with x and A would be replaced with A*sqrt(X/x), so that f(y)=A*sqrt(X/x)*sqrt(x/y), which simplifies to f(y)=A*sqrt(X/y), same as before; this is a sort of "transitivity" of the algorithm.
This algorithm does not satisfy the desired functional equation, however: xf(x)=A*sqrt(Xx), so (X-r)f(X-r)=A*sqrt(X)*sqrt(X-r), (X+r)f(X+r)=A*sqrt(X)*sqrt(X+r), and substitution and simplification yield sqrt(X-r)+sqrt(X+r)=2sqrt(X); then squaring and simplification yield 2X+2sqrt(X2-r2)=4X, from which sqrt(X2-r2)=X, and squaring yields X2-r2=X2, so r=0, which means the functional equation is only satisfied in the trivial case x=X.
Maybe such an "additivity principle" isn't so important after all...indeed, it is likely inconsistent with well-definition!
If we started with the functional equation expressed as xf(x)+(2X-x)f(2X-x)=2Xf(X) and swapped the positions of x and X, this becomes Xf(X)+(2x-X)f(2x-X)=2xf(x), and solved for "2Xf(X)", this becomes 4xf(x)-2(2x-X)f(2x-X)=2Xf(X), which is very different...
Now let's look at another candidate algorithm ventured forth in this thread: the harmonic mean of the extremes, which simplifies to f(x)=2AX/(x+X). Simultaneously substituting x with X, X with x, and A with 2AX/(x+X) yields f(X)=4AXx/(x+X)2, and because f(X) is supposed to be A, simplification yields (x+X)2=4Xx, so x2+2Xx+X2=4Xx, so x2-2Xx+X2=0, so (x-X)2=0, so x=X; therefore this one is not well-defined. Note that if A is substituted with f(X) initially, it is evident that the algorithm is not symmetric with respect to the base-point.
Similarly, there's a problem with the quadratic mean of the extremes, f(x)=A/x*sqrt((x2+X2)/2), because it too is not symmetric with respect to the base-point.
However, much as with the idea I came up with for generalizing to a weighted arithmetic mean, perhaps a weighted geometric mean would allow me to find more well-defined algorithms; let the geometric mean of the extremes, weighted by P>0, of two numbers Y and B be (YPB)1/(1+P), leading to f(x)=(A1+PX/x)1/(1+P), which simplifies to f(x)=A*(X/x)1/(1+P). Indeed this is symmetric with respect to the base-point, for substitution of f(x) with a, and simplification, yield a1+Px=A1+PX.
Note that as P approaches 0, f(x) approaches AX/x, and as P approaches infinity, f(x) approaches A.
An interesting exercise is to determine and then test criteria for which value of P is "best" (I tried maximizing the curvature of the graph of the expression for f(x), but as a function of P instead; note that none of the derivatives in P is zero when P>0); also, are there any well-defined algorithms for f(x) other than the infinite family I just mentioned?