function y = f( x )

    nSamplingPoints     = 0.5e4;

    if( size(x,1) > 1 && size(x,2) > 1 )
        error( 'Matrix-valued evaluation is infeasible.' );
    end

    % Remark:
    %  Integrals here could be evaluated far more efficiently in the
    %  vector-valued case by re-using values that have been calculated
    %  before. However, this implementation should still be sufficient
    %  for our needs.
    y = zeros(size(x));
    for i = 1:length(x)
        X       = linspace(0,x(i),1+ceil(abs(nSamplingPoints*x(i))));
        Y       = df(X);
        y(i)    = trapz(X,Y);
    end

end

