0
$\begingroup$

My code is: Plot[D[Integrate[E^(t*(-x^2)),{x,t+2,t^2}],t],{t,-2,3}].

The errors/warnings are:

General::ivar: "-1.9999 is not a valid variable."

General::ivar: "-1.89786 is not a valid variable."

General::ivar: "-1.79582 is not a valid variable."

General::stop: "Further output of \!\(\* StyleBox[ RowBox[{\"General\", \"::\", \"ivar\"}], \"MessageName\"]\) will be suppressed during this calculation. "

The graph turns out empty in the end.

What did I do wrong this time?

$\endgroup$
  • $\begingroup$ Use Evaluated->True in Plot. $\endgroup$ – Spawn1701D Apr 28 '13 at 18:54
  • $\begingroup$ That worked... Thanks. What does it try to do if I DON'T add this property? $\endgroup$ – user76568 Apr 28 '13 at 18:56
  • $\begingroup$ If you check Plot's Attributes you will see that has the HoldAll attribute, hence the expression will remain unevaluated. $\endgroup$ – Spawn1701D Apr 28 '13 at 18:56
  • $\begingroup$ Yes, or Plot[Evaluate@D[Integrate[E^(t*(-x^2)),{x,t+2,t^2}],t],{t,-2,3}]. I'm sure this is a duplicate question, but too lazy to look now:) $\endgroup$ – Ajasja Apr 28 '13 at 18:56
  • 1
    $\begingroup$ It's a duplicate of this question, which a duplicate of another question. $\endgroup$ – Michael E2 Apr 28 '13 at 21:23