2014-07-15 22:23:52 +0200 | commented answer | Plot evaluation different than function evalution Thanks, that answers my question completely. |
2014-07-15 22:21:52 +0200 | received badge | ● Scholar (source) |
2014-06-29 13:38:24 +0200 | received badge | ● Notable Question (source) |
2014-06-29 13:38:24 +0200 | received badge | ● Famous Question (source) |
2014-06-29 13:38:24 +0200 | received badge | ● Popular Question (source) |
2014-02-20 19:33:02 +0200 | asked a question | Plot evaluation different than function evalution My sage input is It turns out that exp1 is $\newcommand{\Bold}[1]{\mathbf{#1}}-\frac{\sqrt{2} \sqrt{\pi} \text{ erf}\left(-\frac{\sqrt{2} \eta^{2} + i \sqrt{2} \omega - i \sqrt{2} \omega_{n}}{2 \eta}\right) e^{\left(-\frac{\omega^{2}}{2 \eta^{2}} + \frac{\omega \omega_{n}}{\eta^{2}} - \frac{\omega_{n}^{2}}{2 \eta^{2}}\right)}}{2 \eta} + \frac{\sqrt{2} \sqrt{\pi} \text{ erf}\left(\frac{\sqrt{2} \eta^{2} - i \sqrt{2} \omega + i \sqrt{2} \omega_{n}}{2 \eta}\right) e^{\left(-\frac{\omega^{2}}{2 \eta^{2}} + \frac{\omega \omega_{n}}{\eta^{2}} - \frac{\omega_{n}^{2}}{2 \eta^{2}}\right)}}{2 \eta}$ I wanted to check if exp2 can be used as an approximation of exp1. Now suppose I choose to evaluate the absolute error This is what it should be. However if I plot it (choosing five points for simplicity) For some reason below about 0.41 the plot function evaluates it to 0, but a call like shows that this is incorrect behavior. Any idea why plot fails to evaluate this correctly for "small" values? The larger omega is, the worse the cutoff is. That is, large omega means that the plot goes to 0 for even if eta is larger than 0.41 in general. For example choosing omega=2**5 gives a cutoff at about eta = 0.84, so that plot just puts zeros for eta < .84 in this case. |