Parabeln in Latex erstellen
Verfasst: Di 12. Jun 2012, 10:49
Hallo, ich bin neu im Forum und habe mich angemeldet, weil ich mit folgendem Quelltext Probleme habe:
\documentclass{scrbook}
\usepackage[latin1]{inputenc}
\usepackage[ngerman]{babel}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[domain=-2:2] \draw[very thin,color=gray] (-7.1,-7.1) %das letzte für die kästchen
grid (7.9,7.9);
\draw[->] (-4.2,0) -- (4.2,0) node[right] {$x$}; %x Achse
\draw[->] (0,-1.2) -- (0,8.2) node[above] {$f(x)$}; % y Achse
\draw[color=red] plot (\x,{pow(\x,3)}) node[right] {$f(x) =0,2x^2$};
\draw[color=blue, samples=50] plot (\x,{pow(\x,2)}) node[right] {$f(x) = x^2$};
\end{tikzpicture}
\end{document}
Mein Problem ist nun die rote Funktion, welche ich in eine f(x)=0,2x^2 umwandeln möchte. Aber ich verstehe an dieser Stelle den Quelltext plot (\x,{pow(\x,3)}) Was genau wird durch \x und {pow...} aufgeteilt? Und vor allem was muss ich da rein schreiben, wenn ich meine Funktion f(x)=0,2x^2 bekommen möchte?
Ich hoffe jemand kann mir das irgendwie erklären ;(
Vielen Dank schon einmal![b][/b]
\documentclass{scrbook}
\usepackage[latin1]{inputenc}
\usepackage[ngerman]{babel}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[domain=-2:2] \draw[very thin,color=gray] (-7.1,-7.1) %das letzte für die kästchen
grid (7.9,7.9);
\draw[->] (-4.2,0) -- (4.2,0) node[right] {$x$}; %x Achse
\draw[->] (0,-1.2) -- (0,8.2) node[above] {$f(x)$}; % y Achse
\draw[color=red] plot (\x,{pow(\x,3)}) node[right] {$f(x) =0,2x^2$};
\draw[color=blue, samples=50] plot (\x,{pow(\x,2)}) node[right] {$f(x) = x^2$};
\end{tikzpicture}
\end{document}
Mein Problem ist nun die rote Funktion, welche ich in eine f(x)=0,2x^2 umwandeln möchte. Aber ich verstehe an dieser Stelle den Quelltext plot (\x,{pow(\x,3)}) Was genau wird durch \x und {pow...} aufgeteilt? Und vor allem was muss ich da rein schreiben, wenn ich meine Funktion f(x)=0,2x^2 bekommen möchte?
Ich hoffe jemand kann mir das irgendwie erklären ;(
Vielen Dank schon einmal![b][/b]