How can I do this?

I do not know how to do this. Is it possible to do it in LaTeX or should I create a figure with GeoGebra and insert it?
How can I do this?

I do not know how to do this. Is it possible to do it in LaTeX or should I create a figure with GeoGebra and insert it?
A little fun with TikZ and PGFkeys.
\documentclass[varwidth]{standalone}
\usepackage{tikz}
\usetikzlibrary{decorations.pathmorphing}
\tikzset{
fromto/.code=\pgfqkeys{/tikz/fromto}{#1}, fromto/.cd,
from/.initial=0, to/.initial=10, min/.initial=0, max/.initial=10,
fromto style/.style={circle, draw, inner sep=+0pt, minimum size=+3pt},
include/.style={/tikz/fromto/fromto style, fill=black},
exclude/.style={/tikz/fromto/fromto style, fill=white},
From/.is choice,
From/in/.style={/tikz/fromto/from style/.style={fromto/include}},
From/ex/.style={/tikz/fromto/from style/.style={fromto/exclude}},
From/no/.style={/tikz/fromto/from style/.style={coordinate, label/.style}},
To/.is choice,
To/in/.style={/tikz/fromto/to style/.style={fromto/fromto style, fromto/include}},
To/ex/.style={/tikz/fromto/to style/.style={fromto/fromto style, fromto/exclude}},
To/no/.style={/tikz/fromto/to style/.style={coordinate, label/.style}},
From=no, To=no,
every fromto picture/.style={x=2.5mm, baseline, >=latex,
every label/.style={overlay, /utils/exec=\scriptsize}},
axes/.style={->},
range/.style={decoration={snake, amplitude=+1pt, segment length=+2pt}, decorate}}
\newcommand*\fromto[1][]{
\tikzpicture[fromto={#1}, fromto/every fromto picture]
\draw[fromto/axes/.try] (right:\pgfkeysvalueof{/tikz/fromto/min}) --
(right:\pgfkeysvalueof{/tikz/fromto/max}) -- ++ (right:10\pgflinewidth);
\draw[fromto/range/.try] (right:\pgfkeysvalueof{/tikz/fromto/from})
-- (right:\pgfkeysvalueof{/tikz/fromto/to})
node[at start, fromto/from style, label=$\pgfkeysvalueof{/tikz/fromto/from}$]{}
node[at end, fromto/to style, label=$\pgfkeysvalueof{/tikz/fromto/to}$]{};
\endtikzpicture}
\begin{document}
\begin{enumerate}
\item \fromto[from=3, From=ex]
\item \fromto[to=7, To=in]
\item \fromto[from=3, From=in, to=6, To=ex]
\item \fromto[min=-5, max=15, from=-3, to=14, From=in, To=ex]
\end{enumerate}
\end{document}

\tikzpicture command. I would try \tikzpicture[scale=1.6,fromto={#1}, fromto/every fromto picture].
– Habi
Oct 28 '13 at 13:15
x = 2.5mm (default: 1cm) to the every fromto picture style so that it looks more like your picture. You can set this to any other length so that the arrow gets longer or shorter. The nodes with the numbers are set in \scriptsize (see the every label style). Then you can change the line width or the parameters of the snake line. And of course, you can also use scale.
– Qrrbrbirlbel
Oct 29 '13 at 13:10
With PSTricks just for fun!
\documentclass[pstricks,border=15pt]{standalone}
\usepackage{pst-coil}
\psset{coilheight=.4,coilwidth=5pt,coilarm=2.5pt,linejoin=1,arrowinset=0}
\begin{document}
\begin{pspicture}(6,-3)
% x > 3
\psline(0,0)(6,0)
\uput[d](2,0){$3$}
\pszigzag[coilarmB=5pt]{o->}(2,0)(6,0)
% x >= 3
\psline(0,-1)(6,-1)
\uput[d](2,-1){$3$}
\pszigzag[coilarmB=5pt]{*->}(2,-1)(6,-1)
% 2 <= x < 3
\psline(0,-2)(6,-2)
\uput[d](2,-2){$2$}
\uput[d](4,-2){$3$}
\pszigzag{*-o}(2,-2)(4,-2)
% x < 2 or x >=3
\psline(0,-3)(6,-3)
\uput[d](2,-3){$2$}
\uput[d](4,-3){$3$}
\pszigzag[coilarmA=5pt]{<-o}(0,-3)(2,-3)
\pszigzag[coilarmB=5pt]{*->}(4,-3)(6,-3)
\end{pspicture}}
\end{document}

coilheight is a factor (dimensionless).coilwidth is a length.coilarm is a length.The formula relating them is given as follows.
If L represents the distance from (x1,y1) to (x2,y2) in \pszigzag(x1,y1)(x2,y2), N represents the number of winding then
coilheight=(L-2*coilarm)/(coilwidth*N).
Fortunately, you don't need to keep the number of winding equal for each case above. That is why we just let the number of winding gets automatically assigned.
If you are interested to assign the number of winding, see my another answer here.