Advertisement
Guest User

Piecewise Function

a guest
Feb 14th, 2013
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. \documentclass[12pt]{article}
  2. \usepackage{pgf,tikz}
  3. \usetikzlibrary{arrows}
  4. \pagestyle{empty}
  5. \begin{document}
  6. \definecolor{uuuuuu}{rgb}{0.27,0.27,0.27}
  7. \begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
  8. \draw[->,color=black] (-3.74,0) -- (7.48,0);
  9. \foreach \x in {-3,-2,-1,1,2,3,4,5,6,7}
  10. \draw[shift={(\x,0)},color=black] (0pt,2pt) -- (0pt,-2pt) node[below] {\footnotesize $\x$};
  11. \draw[->,color=black] (0,-3.34) -- (0,5.56);
  12. \foreach \y in {-3,-2,-1,1,2,3,4,5}
  13. \draw[shift={(0,\y)},color=black] (2pt,0pt) -- (-2pt,0pt) node[left] {\footnotesize $\y$};
  14. \draw[color=black] (0pt,-10pt) node[right] {\footnotesize $0$};
  15. \clip(-3.74,-3.34) rectangle (7.48,5.56);
  16. \draw[smooth,samples=100,domain=0.0:2.0] plot(\x,{cos(((\x)*3.1415926535/2)*180/pi)+3});
  17. \draw[smooth,samples=100,domain=3.0:5.0] plot(\x,{1/((\x)-5)+5});
  18. \draw[smooth,samples=100,domain=2.0:3.0] plot(\x,{0-cos(((\x)*3.1415926535/2)*180/pi)+3});
  19. \begin{scriptsize}
  20. \fill [color=uuuuuu] (0,4) circle (1.5pt);
  21. \draw[color=uuuuuu] (0.14,4.28) node {$A$};
  22. \fill [color=uuuuuu] (3,3) circle (1.5pt);
  23. \draw[color=uuuuuu] (3.16,3.28) node {$B$};
  24. \draw [color=uuuuuu] (2,2) circle (1.5pt);
  25. \draw[color=uuuuuu] (2.16,2.28) node {$D$};
  26. \draw [color=uuuuuu] (2,4) circle (1.5pt);
  27. \draw[color=uuuuuu] (2.16,4.28) node {$E$};
  28. \draw [color=uuuuuu] (3,4.5) circle (1.5pt);
  29. \draw[color=uuuuuu] (3.14,4.78) node {$F$};
  30. \end{scriptsize}
  31. \end{tikzpicture}
  32. \end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement