update
This commit is contained in:
Enrique Andrade Gonzalez 2017-11-27 20:12:40 +00:00
parent 67f14d7942
commit d0411a43a3

View File

@ -0,0 +1,121 @@
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{pgf,tikz}
\usepackage{pgfplots}
\usetikzlibrary{arrows,backgrounds}
\pgfplotsset{width=10cm,compat=newest}
\title{\#05 Draw graphs of the following functions}
\author{Enrique Andrade González }
\date{Computer tools in mathematican's work}
\begin{document}
\maketitle
\section{$x^2-2x+3$}
\begin{tikzpicture}
\draw [->] (0,0) -- (0,12);
\draw [<->] (-4,0) -- (6,0);
\draw [help lines] (-4,0) grid (6,12);
% x ^ 2-2x + 3
\draw [blue, domain=-2:4] plot (\x, {pow(\x,2)-\x*2 +3})
node[right] {$v_1(x^2-2x +3)$)};
\node [below] at (0,0) {(0,0)};
\node [above] at (0,12) {(0,12)};
\node [left] at (-4,0) {(-4,0)};
\node [right] at (6,0) {(6,0)};
\end{tikzpicture}
\section{$cos(2x)$}
\begin{tikzpicture}
\draw [<->] (0,-3) -- (0,3);
\draw [<->] (-6,0) -- (6,0);
\draw [help lines] (-6,-3) grid (6,3);
% x ^ 2-2x + 3
\draw [blue, domain=-6:6, samples=100] plot (\x, {cos(\x*2 r)})
node[right] {$v_1(cos(x*2))$};
\node [below] at (0,0) {(0,0)};
\node [above] at (0,3) {(0,3)};
\node [left] at (-6,0) {(-6,0)};
\node [below] at (6,0) {(6,0)};
\node [below] at (0,-3) {(0,-3)};
\end{tikzpicture}
\section{$sin(1/x)$}
\begin{tikzpicture}
\draw [<->] (0,-3) -- (0,3);
\draw [<->] (-6,0) -- (6,0);
\draw [help lines] (-6,-3) grid (6,3);
%% Problema!!! Vale esta solución???
\draw [blue, domain=0.01:6, rotate=180, samples=100] plot (\x, {sin(1/\x r)});
% Problema al tener un 0 en el denominador.
\draw [blue, domain=0.01:6, samples=100] plot (\x, {sin(1/\x r)})
node[right] {$v_1(x^2-2x +3)$)};
\node [below] at (0,0) {(0,0)};
\node [above] at (0,3) {(0,3)};
\node [left] at (-6,0) {(-6,0)};
\node [right] at (6,0) {(6,0)};
\node [below] at (0,-3) {(0,-3)};
\end{tikzpicture}
\section{$x^2+y^2$}
\begin{tikzpicture}
\begin{axis}[
%hide axis,
xlabel=$x$,ylabel=$y$,mesh/interior colormap name=hot,colormap/blackwhite,]
\addplot3[domain=-3:3,surf,samples=41]
{x^2+y^2};
\end{axis}
\end{tikzpicture}
\section{$x^2-y^2+2*x*y^2+1$}
\begin{tikzpicture}
\begin{axis}[
%hide axis,
xlabel=$x$,ylabel=$y$,mesh/interior colormap name=hot,colormap/blackwhite,]
\addplot3[domain=-3:3,surf,samples=41]
{x^2-y^2+2*x*y^2+1};
\end{axis}
\end{tikzpicture}
\end{document}