Smoothing function as presented in C. RICHTER, “Proposal of New Object-Oriented Equation-Based Model Libraries for Thermodynamic Systems,” Technical University Carolo-Wilhelmina in Braunschweig (2008).
The general solution is a hypergeometric function (http://mathworld.wolfram.com/HypergeometricFunction.html): 2f1. This function exists in scipy and GNU GSL.
function smoothing_cosN input Real x "Value of interest (i.e. x - x_t)"; input Real deltax "Transition width"; input Integer n = 2 "(n-1)th order continuous"; output Real y "Sigmoid result"; end smoothing_cosN;