If you are using Windows operating system and you want to clean the auxiliary files generated for integral.pdf, you can add \makeatletter\@for\x:={tex,dvi,ps,log,aux}\do{\immediate\write18{cmd /c del integral.\x}}\makeatother below the comment % do cleaning here if necessary!.
–
stalking isn't toleratedMar 31 '13 at 7:37

Here is a tkz-fct demonstration. I borrowed the integration from Alain Matthes' answer in Tikz-PGF: Draw integral test plot. For this to work, you should have gnuplot installed and compile with pdflatex with -shell-escape enabled.

The .gif version

To create the .gif, you should install imagemagick first. After compiling

@Karl'sstudents I am used to putting \caption every time. :)
–
hpesoj626Mar 31 '13 at 7:00

Oh my ghost. I meant that floating does not make sense in a frame. Try adding \lipsum[1-20] before the figure and adding [allowframebreaks] to the frame; you will see that floating is not useful.
–
stalking isn't toleratedMar 31 '13 at 7:11

Hmmm... Yes. You are right. I learned something new today, thanks to you.
–
hpesoj626Mar 31 '13 at 7:12

One more: You don't need -shell-escape in \immediate\write18{pdflatex -shell-escape tikzintegral} because there is no external application invocation in tikzintegral.tex. :-)
–
stalking isn't toleratedMar 31 '13 at 7:22