von localghost » Mo 24. Mai 2010, 18:53
Gewöhne dir bitte an, vollständige Beispiele zu erstellen.
Damit alles funktioniert, brauchst Du einen geschlossen Pfad. In diesem Fall heißt das, den Wertebereich einerseits anzupassen und ihn andererseits für
f(x) umzukehren.
\documentclass{minimal}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[domain=-2:2]
\path[fill=gray!30] (-1.4,0.2116)--plot[domain=-1.4:1.4](\x,{0.1*\x^3+0.01*\x+0.5})--(1.4, 0.7884)--(1.4,1.696)--plot[domain=1.4:-1.4](\x,{0.1*\x^2+1.5})--(-1.4,1.696)--(-1.4,0.2116);
\draw[->](-2.2,0)--(2.2,0) node[right]{$x$};
\draw[->](0,-0.2)--(0,2.2) node[above]{$f(x)$};
\draw[color=blue] plot (\x,0.1*\x^2+1.5) node[right]{$f(x)$};
\draw[color=blue] plot (\x,0.1*\x^3+0.01*\x+0.5) node[right]{$g(x)$};
\draw[dashed] (1.4,1.696)--(1.4, 0.7884);
\draw[dashed] (-1.4,0.2116)--(-1.4,1.696);
\coordinate [label=below:$a$] (a) at (-1.4,0);
\coordinate[label=below:$b$] (b) at (1.4,0);
\end{tikzpicture}
\end{document}
MfG
Thorsten
Gewöhne dir bitte an, vollständige Beispiele zu erstellen.
Damit alles funktioniert, brauchst Du einen geschlossen Pfad. In diesem Fall heißt das, den Wertebereich einerseits anzupassen und ihn andererseits für [i]f(x)[/i] umzukehren.
[code]\documentclass{minimal}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[domain=-2:2]
\path[fill=gray!30] (-1.4,0.2116)--plot[domain=-1.4:1.4](\x,{0.1*\x^3+0.01*\x+0.5})--(1.4, 0.7884)--(1.4,1.696)--plot[domain=1.4:-1.4](\x,{0.1*\x^2+1.5})--(-1.4,1.696)--(-1.4,0.2116);
\draw[->](-2.2,0)--(2.2,0) node[right]{$x$};
\draw[->](0,-0.2)--(0,2.2) node[above]{$f(x)$};
\draw[color=blue] plot (\x,0.1*\x^2+1.5) node[right]{$f(x)$};
\draw[color=blue] plot (\x,0.1*\x^3+0.01*\x+0.5) node[right]{$g(x)$};
\draw[dashed] (1.4,1.696)--(1.4, 0.7884);
\draw[dashed] (-1.4,0.2116)--(-1.4,1.696);
\coordinate [label=below:$a$] (a) at (-1.4,0);
\coordinate[label=below:$b$] (b) at (1.4,0);
\end{tikzpicture}
\end{document}[/code]
MfG
Thorsten