cubic-function-intermediate-value-theorem.tex 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. \documentclass{article}
  2. \usepackage[pdftex,active,tightpage]{preview}
  3. \setlength\PreviewBorder{2mm}
  4. \usepackage{pgfplots}
  5. \usepackage{tikz}
  6. \usetikzlibrary{arrows, positioning, calc, intersections, decorations.markings}
  7. \begin{document}
  8. % Define this as a command to ensure that it is same in both cases
  9. \newcommand*{\ShowIntersection}[2]{
  10. \fill
  11. [name intersections={of=#1 and #2, name=i, total=\t}]
  12. [red, opacity=1, every node/.style={above left, black, opacity=1}]
  13. \foreach \s in {1,...,\t}{(i-\s) circle (2pt)
  14. node [above left] {\s}};
  15. }
  16. \begin{preview}
  17. \begin{tikzpicture}
  18. \begin{axis}[
  19. %width=15cm, height=15cm, % size of the image
  20. %xmin= 0, % start the diagram at this x-coordinate
  21. %xmax= 250, % end the diagram at this x-coordinate
  22. %ymin=-7, % start the diagram at this y-coordinate
  23. %ymax= 7, % end the diagram at this y-coordinate
  24. ylabel=y,
  25. xlabel=x,
  26. axis lines=left,
  27. tick style={draw=none},
  28. xticklabels={,,},
  29. yticklabels={,,}
  30. ]
  31. \addplot[name path global=a, domain=30:250, red, thick,samples=500]
  32. {-0.00192*x*x*x+0.85*x*x-121.92*x+5815.75};
  33. % {-226/117649*x*x*x+100005/117649*x*x-14343768/117649*x+684216906/117649};
  34. \end{axis}
  35. \end{tikzpicture}
  36. \end{preview}
  37. \end{document}