I have a lot of functions (mostly exponential included and more precisely complicated combinations of Gaussian and Slater ones) which decay and become zero in the different points depending on the parameters values. So I can't specify a special point as the range of plot for all of them. For this reason I want to write a simple code which solves the function for zero and gives me the desire point where the function value becomes zero. So I can use the solution of this code as the range of my plots automatically. As a toy example suppose

Plot[Exp[-x^2], {x, 0, pran}, PlotRange -> All]

but when I use

pran=Solve[Exp[-x^2] == 0, x]

I get empty list! why? Any idea? Or alternative?

  • 1
    $\begingroup$ Exp[-x^2] never equals zero except in the limit as x -> Infinity or x -> -Infinity. $\endgroup$
    – Bob Hanlon
    Oct 16 at 5:31
  • 1
    $\begingroup$ Pick a "sufficiently" small value, e.g., Solve[Exp[-x^2] == 10^-6, x, PositiveReals] $\endgroup$
    – Bob Hanlon
    Oct 16 at 5:37

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.