Message Boards Message Boards

1 Reply
0 Total Likes
View groups...
Share this post:

How to plot the result of Integration?

Posted 10 years ago
I like to do:
Plot[Integrate[x^2,x], {x,-3,3}]

and expect a graph of (x^3)/3, but always get various Errors like 
Integrate::ilim: "Invalid integration variable or limit(s) in -2.9998774285714287"

It looks like Integrate gets invokved with a concrete value of x. What i think i need is to get Integrate evaluated first, the result should then be used to do the Plot. But how do i say this to Mathematica? I played with things like Evaluate, Funtion, Apply but was unable to come to a solution.

Thank you for any help in advance,
POSTED BY: Thomas Vogler
I am so dumb.
Plot[Evaluate[Integrate[x^2, x]], {x, -3, 3}]

works. And i can do
f[x_] := Sin[x]/x
Plot[Evaluate[{f[x], Integrate[f[x], x]}], {x, -10, 10}]

which is my original problem.
POSTED BY: Thomas Vogler
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract