I am wondering how to make Mathematica only evaluate real numbers by creating an initialization line in the beginning of a notebook. I would like to prevent the following:

  • complex trigonometric functions
  • complex matrices that are imaginary and not real
  • graphs and plots of imaginary values, both 2d and 3d
  • complex exponents and logarithms of negative numbers
  • algebraic expressions such as x^2+1=0 so Solve returns an empty result
  • special functions such as the error function as integration results

Is there a simple way to restrict a notebook object with a line of initialization code in order to return empty results such as {} or no solution found or out of domain error for cases such as arcsin(5)? I am looking for something similar to Wolfram Alpha Notebook's edition option to solve only over Real values. enter image description here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.