Use an asymptotic expansion at fixed , evaluating the boundary conditions at the instantaneous . At leading order, the downslope equation gives . The wall condition and the surface condition imply
Here denotes the total leading velocity, to distinguish it from the dimensional scale . The continuity equation and wall impermeability then give
The transverse momentum equation gives . The normal stress condition therefore yields
The leading volume flux per unit width is . Consequently mass conservation gives . This relation eliminates inside the first inertial correction:
Set . The downslope equation and boundary conditions are
Two integrations give
The pressure correction is not needed for this calculation because its downslope pressure gradient enters only at .
Integrating the total velocity across the film gives
Indeed the three inertial polynomial terms integrate to . Integrating the continuity equation and using the kinematic boundary condition gives . Hence the Benney equation is
Normal gravity smooths height variations on the upper side of the slope, while the inertial correction can amplify them. Surface tension suppresses sufficiently short wavelengths.
Set . The boundary value problem becomes
For , direct substitution gives . This growing polynomial solution is useful for reduction of order.
Write . Substitution into the linear ordinary differential equation cancels the terms proportional to and gives
An integrating factor for this first-order equation for yields
The far-field boundary condition selects the convergent integral from :
Any additional multiple of would grow at . The chosen expression tends to zero: for ,
Here and . Thus the far-field boundary condition is verified without a cancellation of large terms.
At , differentiating gives , so . Using the antiderivative supplied in the paper gives the explicit answer
Here is the error function. Finally,
recovers the unique correction satisfying . The decay bound also shows that approaches a finite constant at , as allowed by the normal velocity matching. This is the weak surface-shear perturbation of stagnation flow.
If the printed condition is instead imposed literally on a positive half-line, reduction of order gives
It satisfies but grows as , so it cannot describe the fluid domain specified in this paper. This makes the consequence of the printed sign error explicit.
Use an Oberon record containing an active coefficient count and a bounded array of coefficients in ascending power order. A count of zero represents the zero polynomial; a count represents . Trailing zero coefficients are allowed, so the count need not be the degree of a polynomial plus one.
CONST Capacity = 1024;
TYPE Polynomial = RECORD
  len: INTEGER;
  coeff: ARRAY Capacity OF REAL
END;

PROCEDURE Horner(VAR p: Polynomial; x: REAL): REAL;
  VAR i: INTEGER; value: REAL;
BEGIN
  i := p.len; value := 0.0;
  WHILE i > 0 DO
    i := i-1;
    value := p.coeff[i] + x*value
  END;
  RETURN value
END Horner;
The representation invariant is , with only indices below len significant. The parameter is passed by reference to avoid a full record copy; the procedure does not modify it.
Let be the original coefficient count. At each guard test the loop invariant is
The empty sum is zero initially. If the old index is , after decrementing and updating,
which preserves the loop invariant. The loop variant is , decreasing by one until zero. At exit,
This is exactly the right-to-left nesting of Horner's method, matching the supplied right fold. It uses arithmetic operations and additional scalar storage. REAL gives ordinary floating-point evaluation; the displayed identities specify the ideal arithmetic calculation, with the usual rounding in an actual floating-point implementation.
Add polynomials by adding equal-power coefficients, interpreting a missing coefficient as zero. Compute into a local record before assigning the output, so the result may safely be the same actual record as either input.
PROCEDURE Add(VAR p, q, result: Polynomial);
  VAR t: Polynomial; i: INTEGER; u, v: REAL;
BEGIN
  t.len := p.len;
  IF q.len > t.len THEN t.len := q.len END;
  i := 0;
  WHILE i < t.len DO
    u := 0.0; v := 0.0;
    IF i < p.len THEN u := p.coeff[i] END;
    IF i < q.len THEN v := q.coeff[i] END;
    t.coeff[i] := u+v;
    i := i+1
  END;
  result := t
END Add;
With , the loop invariant is and, for , t.coeff[k] is the sum of the two extended input coefficients at . The loop variant is . The inputs remain unchanged throughout the loop, and at exit every active coefficient is correct. The time complexity is for the active arithmetic; assigning the fixed-capacity record can additionally copy its full capacity.
For the product, each pair of input terms contributes . Initialize the active result to zero, then accumulate these pairwise contributions:
PROCEDURE Multiply(VAR p, q, result: Polynomial);
  VAR t: Polynomial; i, j, k: INTEGER;
BEGIN
  t.len := 0;
  IF (p.len > 0) & (q.len > 0) THEN
    t.len := p.len + q.len - 1
  END;
  (* Precondition: t.len <= Capacity. *)
  k := 0;
  WHILE k < t.len DO
    t.coeff[k] := 0.0; k := k+1
  END;
  IF t.len > 0 THEN
    i := 0;
    WHILE i < p.len DO
      j := 0;
      WHILE j < q.len DO
        t.coeff[i+j] := t.coeff[i+j]
                          + p.coeff[i]*q.coeff[j];
        j := j+1
      END;
      i := i+1
    END
  END;
  result := t
END Multiply;
The input representation invariants and the capacity precondition are assumed. No coefficient is accessed when either input is the zero polynomial. The initialization loop invariant says coefficients below are zero; its loop variant is t.len-k.
For positive input lengths , the outer loop invariant says that and each coefficient equals
The inner loop invariant adds the contributions with and to that sum, while . The update adds exactly the next missing term at index , preserving the inner loop invariant. The loop variants are for the outer loop and for the inner loop. On exit all pairs have contributed, yielding
The product uses arithmetic operations and a temporary coefficient array of capacity Capacity. Both operations allow trailing zeros; no extra normalization loop is required. Only the active coefficients are meaningful, so inactive record entries are never read by these operations. As in part (a), floating-point coefficients implement these formulas subject to rounding.
Use the characteristic polynomial convention , with the identity matrix. Put . Then
The required characteristic polynomial equation for this matrix is therefore
Using instead negates the cubic polynomial and leaves the eigenvalues unchanged.
If is positive and odd, is odd. The function is a strictly increasing function on the real numbers, so it is injective. Every real has the real odd root , so the function is also surjective.
If is positive and even, the exponent is positive and even. Then , while for all real . These facts disprove injectivity and surjectivity, respectively. Therefore
If the convention is used, gives exponent zero. Interpreting as the constant polynomial makes the function neither injective nor surjective. If is left undefined, that case does not define the stated function on all the real numbers. Neither convention adds a qualifying value of .
The exponential function eventually grows faster than the fixed polynomial. A direct justification uses the ratio :
For all sufficiently large , this ratio exceeds , so grows without bound. The proposed Big O notation bound is therefore impossible:
Take each partial derivative while holding the other coordinate fixed. Differentiating the polynomial term by term gives
Since the function is a polynomial, both orders of the mixed partial derivative agree everywhere.
At the origin the needed partial derivatives are
The Taylor series through total degree two is therefore
which gives
Here total degree is what matters: is quartic, not quadratic. The exact omitted polynomial is , which verifies the stated Big O notation remainder directly.
For the binomial distribution, the binomial theorem gives
Differentiation of the probability generating function recovers the first expected value and second factorial moment:
Since , the variance is
Thus
The formulas also hold for and the degenerate choices , with derivatives read directly from the resulting polynomial.
Put and . At , the value is , the gradient is , and the Hessian matrix is . Thus the quadratic Taylor expansion is
The exact remainder is , since the original polynomial has only the cubic term beyond degree two.
Define the characteristic polynomial using , where is the identity matrix. Expanding the determinant along the first row gives
Thus the characteristic equation is
The convention changes the sign of this cubic polynomial but gives the same roots.
Both sides of (ii) are polynomials in the colour count, and they agree at every integer . A nonzero polynomial has only finitely many roots, so this is a polynomial identity and holds also at . It can therefore be evaluated at every possible value of the Poisson random variable .
Take expectations and use the factorial moments from (a)(iv). The sum over is finite, so linearity of expectation gives
Combining this with (iii) proves Dobiński's formula for the Bell numbers:
For completeness, the empty set has one partition of a set, giving ; that case uses the empty-product conventions in this identity and a term in the partition sum.
The endpoint boundary conditions are
The finite difference equation can be written . Set . Then , so . Summing from to gives
Using and yields , hence . Therefore
This also covers , where there are no interior equations. Uniqueness follows because the difference of two solutions has zero second finite difference, hence is linear in , and vanishes at both endpoints. This is an exact finite difference solution for constant second derivative: the method is exact at the nodes here because the centered second finite difference differentiates this quadratic polynomial exactly.
The derivative factors as
The polynomial is differentiable everywhere, so its critical points occur precisely where this derivative vanishes. Hence
Their values are and .
Represent the zero polynomial by degree = -1, with an allocated one-element array whose element is zero. Its coefficient prefix is empty; the spare cell is merely convenient storage. For every nonzero polynomial, require degree >= 0, sufficient allocated capacity, and a nonzero leading polynomial coefficient.
PROCEDURE Zero(VAR p: Poly);
BEGIN
  p.degree := -1; NEW(p.coeff, 1); p.coeff[0] := 0.0
END Zero;

PROCEDURE Normalize(VAR p: Poly);
BEGIN
  WHILE p.degree >= 0 DO
    IF p.coeff[p.degree] # 0.0 THEN RETURN END;
    DEC(p.degree)
  END
END Normalize;
Thus
The sentinel is a representation convention, not an assertion that the mathematical degree of the zero polynomial is an ordinary integer. In parts (b)–(e), algebraic correctness uses exact arithmetic on real numbers; ordinary floating-point arithmetic introduces rounding and needs an additional numerical policy if exact zero tests are to be replaced.
Allocate a fresh coefficient array, add matching polynomial coefficients, and normalize to remove any cancellation of leading terms.
PROCEDURE Add(VAR sum: Poly; a, b: Poly);
VAR result: Poly; d, cap, i: INTEGER;
BEGIN
  d := a.degree;
  IF b.degree > d THEN d := b.degree END;
  cap := d+1; IF cap < 1 THEN cap := 1 END;
  result.degree := d; NEW(result.coeff, cap);
  result.coeff[0] := 0.0;
  FOR i := 0 TO d DO
    result.coeff[i] := 0.0;
    IF i <= a.degree THEN
      result.coeff[i] := result.coeff[i] + a.coeff[i]
    END;
    IF i <= b.degree THEN
      result.coeff[i] := result.coeff[i] + b.coeff[i]
    END
  END;
  Normalize(result); sum := result
END Add;
The loop invariant says that every completed coefficient equals the corresponding coefficient of , treating missing coefficients as zero. Normalize changes no represented polynomial, and can reduce the result to the zero polynomial.
Neither input coefficient array is changed. Output variables are separate from input record variables; the fresh result also remains safe when the two inputs share a coefficient array.
Scan the polynomial coefficients from highest degree downward. Omit zero terms, omit coefficient magnitude one on nonconstant terms, print - for negative terms, and print + only before a positive term after the first. A helper prints small integral magnitudes without a decimal suffix; other real numbers use Out.Real.
PROCEDURE OutMagnitude(c: REAL);
VAR n: INTEGER;
BEGIN
  IF c < MAX(INTEGER) THEN
    n := ENTIER(c);
    IF c = n THEN Out.Int(n, 0) ELSE Out.Real(c, 0) END
  ELSE
    Out.Real(c, 0)
  END
END OutMagnitude;

PROCEDURE OutPoly(p: Poly);
VAR i: INTEGER; c, magnitude: REAL; first: BOOLEAN;
BEGIN
  IF p.degree < 0 THEN Out.String("0"); RETURN END;
  first := TRUE; i := p.degree;
  WHILE i >= 0 DO
    c := p.coeff[i];
    IF c # 0.0 THEN
      IF c < 0.0 THEN Out.Char("-")
      ELSIF ~first THEN Out.Char("+")
      END;
      magnitude := ABS(c);
      IF (i = 0) OR (magnitude # 1.0) THEN
        OutMagnitude(magnitude)
      END;
      IF i > 0 THEN
        Out.Char("x");
        IF i > 1 THEN Out.Char("^"); Out.Int(i, 0) END
      END;
      first := FALSE
    END;
    DEC(i)
  END
END OutPoly;
The representation invariant ensures a nonzero polynomial prints at least one term. Constant and retain their coefficients, whereas and omit magnitude one. Thus the requested example prints
Different Out.Real implementations may use decimal or scientific notation for nonintegral coefficients; either denotes the appropriate real number. The number of coefficient inspections is linear in the stored polynomial degree.
Not injective; surjective. Indeed, although . This polynomial is continuous, with as and as . For any prescribed real , choose with ; the intermediate value theorem supplies a preimage between and .