2
0
Fork 0
mirror of https://github.com/MartinThoma/LaTeX-examples.git synced 2025-04-26 06:48:04 +02:00
LaTeX-examples/tikz/cubic-function-intermediate-value-theorem/cubic-function-intermediate-value-theorem.tex

41 lines
1.3 KiB
TeX
Raw Normal View History

2012-08-27 19:23:20 +02:00
\documentclass{article}
\usepackage[pdftex,active,tightpage]{preview}
\setlength\PreviewBorder{2mm}
\usepackage{pgfplots}
\usepackage{tikz}
\usetikzlibrary{arrows, positioning, calc, intersections, decorations.markings}
\begin{document}
% Define this as a command to ensure that it is same in both cases
\newcommand*{\ShowIntersection}[2]{
\fill
[name intersections={of=#1 and #2, name=i, total=\t}]
[red, opacity=1, every node/.style={above left, black, opacity=1}]
\foreach \s in {1,...,\t}{(i-\s) circle (2pt)
node [above left] {\s}};
}
\begin{preview}
\begin{tikzpicture}
\begin{axis}[
%width=15cm, height=15cm, % size of the image
%xmin= 0, % start the diagram at this x-coordinate
%xmax= 250, % end the diagram at this x-coordinate
%ymin=-7, % start the diagram at this y-coordinate
%ymax= 7, % end the diagram at this y-coordinate
ylabel=y,
xlabel=x,
axis lines=left,
tick style={draw=none},
xticklabels={,,},
yticklabels={,,}
]
\addplot[name path global=a, domain=30:250, red, thick,samples=500]
{-0.00192*x*x*x+0.85*x*x-121.92*x+5815.75};
% {-226/117649*x*x*x+100005/117649*x*x-14343768/117649*x+684216906/117649};
\end{axis}
\end{tikzpicture}
\end{preview}
\end{document}