Integral of array y(x) using the trapezoidal rule
function integral_TrapezoidalRule extends Modelica.Icons.Function; input Real[:] x "dependent array"; input Real[size(x, 1)] y "independent array"; output Real integral "Resulting integral"; end integral_TrapezoidalRule;