/// <summary>
        ///     Returns instance of InterpolativeMathFunction with automatically generated derivations.
        /// </summary>
        /// <param name="expression">Interpreted math function of two real variables i.e. "x^2 + y^2".</param>
        /// <returns>
        ///     Instance of class if mathExpression is in correct format, othervise
        ///     returns null;
        /// </returns>
        public static InterpolativeMathFunction FromExpression(MathExpression expression)
        {
            // TODO: osetrit vynimky pre neplatne vstupy
            var f = expression.Interpret();
            var dx = expression.InterpretMathDifferentiation
                (expression.Variables[0]);
            var dy = expression.InterpretMathDifferentiation
                (expression.Variables[1]);
            var dxy = expression.InterpretMathDifferentiation
                (expression.Variables[0], expression.Variables[1]);

            return new InterpolativeMathFunction(f, dx, dy, dxy);
        }