public double Calculate(double x, out bool isDomainOfFunction)
 {
     if (root.IsDomainOfFunction(x))
     {
         isDomainOfFunction = true;
         return(root.GetResult(x));
     }
     isDomainOfFunction = false;
     return(0);
 }