# Draw mathematical analysis figures in latex [duplicate]

I wonder if it is possible to draw the following figures in latex:

For the first image I want a typical real analysis diagram. For the other three I want to draw a cylinder and with squares and rhombus sections...

Is this possible with latex?

Ŕeferences

For my own reference I save here some examples of tikz referenced in the comments:

http://www.texample.net/tikz/examples/

• Of course, it is possible. Did you try anything? You may want to look at tikz. – xxx--- Mar 16 '18 at 11:35
• @pushpen.paul i'm actually looking to examples on tex exchange but i dont find any in the are of analysis, the idea is to begin with existing solutions – Rodrigo Mar 16 '18 at 11:37
• Have a look at texample.net/tikz/examples There are lots of examples starting from easy to going crazy. – faltfe Mar 16 '18 at 13:02
• on the other hand i never understood downvoting without commenting... – Rodrigo Mar 16 '18 at 14:34

\documentclass{article}
\usepackage{tikz}
\usepackage{tikz-3dplot}
\tdplotsetmaincoords{0}{0}
\begin{document}

\begin{tikzpicture}[thick]
\draw[-latex](-1,0)--(6,0);
\draw[-latex](0,-1)--(0,4);
\coordinate (O) at (0,0);
\coordinate (lb) at (1,1);
\coordinate (tr) at (5,3);
\draw (lb) rectangle (tr);
\coordinate (x) at (barycentric cs:lb=1,tr=1);
\draw[fill] (x) circle (2pt);
\draw[dashed] (lb) -- (O-|lb) node[below] {$t_0-a$};
\draw[dashed] (lb-|tr) -- (O-|tr) node[below] {$t_0+a$};
\draw[dashed] (lb) -- (O|-lb) node[left] {$x_0-b$};
\draw[dashed] (lb|-tr) -- (O|-tr) node[left] {$x_0+b$};
\draw[dashed] (lb-|x) -- (O-|x) node[below] {$t_0$};
\draw[dashed] (lb|-x) -- (O|-x) node[left] {$x_0$};
\end{tikzpicture}

\begin{tikzpicture}[thick]
\tdplotsetrotatedcoords{0}{70}{0}
\begin{scope}[tdplot_rotated_coords]
\foreach \X in {0,3,6}
{
\ifnum\X=0
\draw (0,0,\X) circle (1);
\else
\fi
}
\draw (0,1,0) -- (0,1,6);
\draw (0,-1,0) -- (0,-1,6);
\end{scope}
\end{tikzpicture}

\begin{tikzpicture}[thick]
\tdplotsetrotatedcoords{0}{70}{-20}
\begin{scope}[tdplot_rotated_coords]
\foreach \X in {0,3,6}
{\ifnum\X=0
\draw (-1.5,-1,\X) -- (-1.5,1,\X) -- (1.5,1,\X) -- (1.5,-1,\X) -- cycle;
\else
\draw[dashed] (-1.5,1,\X) -- (-1.5,-1,\X) -- (1.5,-1,\X);
\draw (-1.5,1,\X) -- (1.5,1,\X) -- (1.5,-1,\X);
\fi
}
\draw[dashed] (-1.5,-1,0) -- (-1.5,-1,6);
\draw (-1.5,1,0) -- (-1.5,1,6);
\draw (1.5,-1,0) -- (1.5,-1,6);
\draw (1.5,1,0) -- (1.5,1,6);
\end{scope}
\end{tikzpicture}

\begin{tikzpicture}[thick]
\tdplotsetrotatedcoords{0}{110}{-70}
\begin{scope}[tdplot_rotated_coords]
\foreach \X in {0,3,6}
{\ifnum\X=0
\draw (-1.5,-1,\X) -- (-1.5,1,\X) -- (1.5,1,\X) -- (1.5,-1,\X) -- cycle;
\else
\draw[dashed] (-1.5,1,\X) -- (1.5,1,\X) -- (1.5,-1,\X);
\draw (-1.5,1,\X) -- (-1.5,-1,\X) -- (1.5,-1,\X);
\fi
}
\draw (-1.5,-1,0) -- (-1.5,-1,6);
\draw (-1.5,1,0) -- (-1.5,1,6);
\draw (1.5,-1,0) -- (1.5,-1,6);
\draw[dashed] (1.5,1,0) -- (1.5,1,6);
\end{scope}
\end{tikzpicture}
\end{document}


• i'm studying a bit your code, for the third picture what parameter should i touch to reduce the height a bit so that it looks more like a rhombus? – Rodrigo Apr 2 '18 at 21:07
• @Rodrigo Are you talking about the third or the last picture? As you see, the longer sides come with the 1.5 coordinates and the shorter ones with 1. If you want to make the sides more equal, change 1.5 to 1.2, say. – user121799 Apr 2 '18 at 21:12
• oh sorry i meant the last picture. yes now is perfect! – Rodrigo Apr 2 '18 at 21:14