|
@@ -0,0 +1,39 @@
|
|
|
+\documentclass{article}
|
|
|
+\usepackage[pdftex,active,tightpage]{preview}
|
|
|
+\setlength\PreviewBorder{0mm}
|
|
|
+
|
|
|
+\usepackage{pgfplots}
|
|
|
+\usepackage{tikz}
|
|
|
+\usetikzlibrary{arrows, positioning, calc}
|
|
|
+
|
|
|
+\usepackage{xcolor}
|
|
|
+\definecolor{pink}{HTML}{FF0BB7}
|
|
|
+
|
|
|
+\begin{document}
|
|
|
+\begin{preview}
|
|
|
+\begin{tikzpicture}
|
|
|
+ \begin{axis}[
|
|
|
+ axis x line=middle,
|
|
|
+ axis y line=middle,
|
|
|
+ enlarge y limits=true,
|
|
|
+ xmin=-8.5, xmax=8.5, % Positive domain...
|
|
|
+ width=15cm, height=8cm, % size of the image
|
|
|
+ grid = major,
|
|
|
+ grid style={dashed, gray!30},
|
|
|
+ ymin=-4, % start the diagram at this y-coordinate
|
|
|
+ ymax= 4, % end the diagram at this y-coordinate
|
|
|
+ axis background/.style={fill=white},
|
|
|
+ ylabel=$y$,
|
|
|
+ xlabel=$x$,
|
|
|
+ legend style={at={(0.07,0.37)}, anchor=north}
|
|
|
+ ]
|
|
|
+ \addplot[domain=-8:8,thick,samples=200,red] {x};
|
|
|
+ \addplot[domain=-8:8,thick,samples=200,green] {x-x^3/6};
|
|
|
+ \addplot[domain=-8:8,thick,samples=200,blue] {x-x^3/6+x^5/120};
|
|
|
+ \addplot[domain=-8:8,thick,samples=200,pink] {x-x^3/6+x^5/120-x^7/(7!)+x^9/(9!)-x^11/(11!)+x^13/(13!)-x^15/(15!)};
|
|
|
+ \addplot[domain=-8:8,thick,samples=200,black] {sin(deg(x))};
|
|
|
+ \legend{$T_1$, $T_3$, $T_5$, $T_{15}$, $T_\infty$}
|
|
|
+ \end{axis}
|
|
|
+\end{tikzpicture}
|
|
|
+\end{preview}
|
|
|
+\end{document}
|