\documentclass[french]{article}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage[table]{xcolor}
\usepackage{lmodern}
\usepackage{emerald}
\usepackage{eso-pic}
\usepackage[urlcolor=blue,colorlinks=true]{hyperref}
\usepackage[margin=1cm,bottom=2.5cm]{geometry}
\usepackage{titlesec}
\usepackage{fancyhdr}
\usepackage{tikz}
	\usetikzlibrary {decorations.pathmorphing , shapes.geometric , calc}
\usepackage{pas-math}
\usepackage{multicol}
\usepackage{cellspace}
\setlength{\cellspacebottomlimit}{4pt}
\setlength{\cellspacetoplimit}{4pt}
\usepackage{eurosym,numprint}

% Couleurs

\definecolor{bleuciel}{HTML}{45b5f4}
\definecolor{bleu}{HTML}{0e3e59}
\definecolor{orangesanguine}{HTML}{b43f0b}
\definecolor{vert}{HTML}{287f13}

% styles des titres

%%% Titre de la fiche

\renewcommand{\title}[1]{%
\begin{center}
\begin{tikzpicture}
\node[text width=0.5\linewidth, fill=bleuciel, ellipse,decorate,decoration={random steps,segment length=3pt,amplitude=2pt}, align=center,inner ysep=5mm, inner xsep=0pt,ball color=bleuciel] (titre) {\ECFJD\Huge #1};
\node[below] (auteur) at (titre.south) {\ECFJD Une fiche de cours de Stéphane Pasquet - Mise à jour : \today};
\node[below] at (auteur.south) {(\url{https://courspasquet.fr})\qquad\qquad(\url{https://mathweb.fr})};
\end{tikzpicture}
\end{center}
}

%%% section

\titleformat{\section}[block]
{\ECFJD\fontsize{16}{14}\selectfont\color{bleu}}
{\thesection}
{1em}
{\ECFJD}
\setlength{\parindent}{0pt}

%%% subsection

\titleformat{\subsection}[block]
{\ECFJD\fontsize{12}{12}\selectfont\color{orangesanguine}}
{\thesubsection}
{1em}
{\ECFJD}
\setlength{\parindent}{0pt}

%%% paragraph

\titleformat{\paragraph}[runin]
{\ECFJD\color{vert}}{\theparagraph}{1em}{}

%%% pied et tête de page

\renewcommand{\headrulewidth}{0pt}
\lhead{}
\cfoot{\ECFJD\Large\color{white}\fcolorbox{bleu}{bleu}{\thepage}}
\renewcommand{\headrulewidth}{0pt}


\begin{document}

\pagestyle{fancy}

\AddToShipoutPictureBG
{%
	\put(\LenToUnit{5mm},\LenToUnit{5mm})
	{%
		\begin{tikzpicture}
		\draw[fill=yellow!10,draw,thick,decorate,decoration = {random steps}] (0,0) rectangle +(\dimexpr\paperwidth-10mm,\dimexpr\paperheight-10mm);
		\end{tikzpicture}
	}
}


\title{Ensembles de nombres et intervalles}

\section*{Les divers ensembles}

\begin{itemize}
\item[\textbullet] \textbf{Entiers naturels} : $\N=\{0;1;2;3;\ldots\}$.

\item[\textbullet] \textbf{Entiers relatifs} : $\Z=\{\ldots;-3;-2;-1;0;1;2;3;\ldots\}
.$

\item[\textbullet] \textbf{Nombres décimaux}: c'est l'ensemble des nombres à virgule à écriture \textit{finie}. $\D=\{a \times 10^n~, a\in\Z,\ n\in\Z\}$

\item[\textbullet] \textbf{Nombres rationnels}: $\Q = \left\{\frac{a}{b},\ a\in\Z,\ b\in\Z,\ b\neq0\right\}$.

\item[\textbullet] \textbf{Nombres réels}: c'est l'ensemble de tous les nombres pouvant représenter une quantité réelle. On le note \R.
\end{itemize}

\subsection*{Représentations graphiques : droite des réels}

\begin{center}
\begin{tikzpicture}[outer ysep=1ex]
\draw[->,>=latex] (-5,0) -- (5,0) node[below] {\R};
\foreach\x in {-4,-3,-2,-1,0,1,2,3,4}
{
\draw (\x,0.1) -- (\x,-0.1) node[below] {$\x$};
}
\draw[thick,red] (3.14159,0.1) -- (3.14159,-0.1) node[above] {$\pi$};
\draw[thick,red] (1.414,0.1) -- (1.414,-0.1) node[above] {$\sqrt2$};
\draw[thick,red] ({-15/7},0.1) -- ({-15/7},-0.1) node[above] {$-\frac{15}{7}$};
\end{tikzpicture}
\end{center}

\subsection*{Représentations graphiques : diagramme de Venn}

\begin{center}
\begin{tikzpicture}
\filldraw[thick,fill=purple!10,draw=purple!50!black] (-7,-5) rectangle(7,5);
\node[purple!50!black] at (0,4.5) {\R};
\node[purple!50!black] at (-6,0) {$\sqrt2$};
\node[purple!50!black] at (5,4) {$\sqrt3$};
\node[purple!50!black] at (-6.5,-4.5) {$\pi$};
\node[purple!50!black] at (5.5,-3.5) {$\sqrt\pi$};
%
\filldraw[thick,fill=blue!10,draw=blue!50!black] (0,0) circle[x radius=5cm,y radius=4cm];
\node[blue!50!black] at (0,3.5) {\Q};
\node[blue!50!black] at (30:4.2) {$\frac{2}{7}$};
\node[blue!50!black] at (-30:4.2) {$-\frac{5}{9}$};
\node[blue!50!black] at (110:3.7) {$\frac{47}{3}$};
\node[blue!50!black] at (-130:3.9) {$-\frac{101}{11}$};
\node[blue!50!black] at (160:4.4) {$\frac{50}{13}$};
%
\filldraw[thick,fill=orange!10,draw=orange!50!black,opacity=75] (0,0) circle[x radius=4cm,y radius=3cm];
\node[orange!50!black] at (0,2.5) {\D};
\node[orange!50!black,scale=0.8] at (-150:3.2) {$-3,48$};
\node[orange!50!black] at (10:3.4) {$0,1$};
\node[orange!50!black,scale=0.8] at (-30:3.2) {$-0,001$};
\node[orange!50!black,scale=0.8] at (140:3) {$5\times10^{-8}$};
%
\filldraw[thick,fill=green!10,draw=green!50!black] (0,0) circle[x radius=3cm,y radius=2cm];
\node[green!50!black] at (0,1.5) {\Z};
\node[green!50!black] at (30:2.2) {$-2$};
\node[green!50!black] at (-50:1.9) {$-8$};
\node[green!50!black] at (-170:2.35) {$-18$};
%
\filldraw[thick,fill=red!10,draw=red!50!black] (0,0) circle[x radius=2cm,y radius=1cm];
\node[red!50!black] at (0,.5) {\N};
\node[red!50!black] at (-10:1) {$7$};
\node[red!50!black] at (-120:0.5) {$0$};
\node[red!50!black] at (150:1) {$1$};
\end{tikzpicture}
\end{center}
\[
\N\subset\Z\subset\D\subset\Q\subset\R\qquad \text{\og $\subset$ \fg}: \text{\og inclus dans \fg{} }
\]

\newpage

\section*{Intervalles}

\begin{center}
\begin{tikzpicture}
%
\draw[double distance=2pt,->] (0,0) node[left] {$x\in\intervFF{a}{b}$} -- (3,0) node[right] {$a\leqslant x\leqslant b$};
\draw[->,>=latex] (6,0) -- (12,0) node[below right] {\R};
\draw[very thick,red] (8,0) -- (11,0);
\draw[very thick,red] (8.2,0.2) -- (8,0.2) -- (8,-0.2) -- (8.2,-0.2);
\draw[very thick,red] (10.8,0.2) -- (11,0.2) -- (11,-0.2) -- (10.8,-0.2);
\node[below,red] at (8,-0.2) {$a$};
\node[below,red] at (11,-0.2) {$b$};
\node[above,red] at (9.5,0) {$x$};
%
\draw[double distance=2pt,->] (0,-1) node[left] {$x\in\intervOO{a}{b}$} -- (3,-1) node[right] {$a< x < b$};
\draw[->,>=latex] (6,-1) -- (12,-1) node[below right] {\R};
\draw[very thick,red] (8,-1) -- (11,-1);
\draw[very thick,red] (7.8,-0.8) -- (8,-0.8) -- (8,-1.2) -- (7.8,-1.2);
\draw[very thick,red] (11.2,-0.8) -- (11,-0.8) -- (11,-1.2) -- (11.2,-1.2);
\node[below,red] at (8,-1.2) {$a$};
\node[below,red] at (11,-1.2) {$b$};
\node[above,red] at (9.5,-1) {$x$};

%
\draw[double distance=2pt,->] (0,-2) node[left] {$x\in\intervOF{a}{b}$} -- (3,-2) node[right] {$a< x\leqslant b$};
\draw[->,>=latex] (6,-2) -- (12,-2) node[below right] {\R};
\draw[very thick,red] (8,-2) -- (11,-2);
\draw[very thick,red] (7.8,-1.8) -- (8,-1.8) -- (8,-2.2) -- (7.8,-2.2);
\draw[very thick,red] (10.8,-1.8) -- (11,-1.8) -- (11,-2.2) -- (10.8,-2.2);
\node[below,red] at (8,-2.2) {$a$};
\node[below,red] at (11,-2.2) {$b$};
\node[above,red] at (9.5,-2) {$x$};

%
\draw[double distance=2pt,->] (0,-3) node[left] {$x\in\intervFO{a}{b}$} -- (3,-3) node[right] {$a\leqslant x< b$};
\draw[->,>=latex] (6,-3) -- (12,-3) node[below right] {\R};
\draw[very thick,red] (8,-3) -- (11,-3);
\draw[very thick,red] (8.2,-2.8) -- (8,-2.8) -- (8,-3.2) -- (8.2,-3.2);
\draw[very thick,red] (11.2,-2.8) -- (11,-2.8) -- (11,-3.2) -- (11.2,-3.2);
\node[below,red] at (8,-3.2) {$a$};
\node[below,red] at (11,-3.2) {$b$};
\node[above,red] at (9.5,-3) {$x$};

%
\draw[double distance=2pt,->] (0,-4) node[left] {$x\in\intervFO{a}{+\infty}$} -- (3,-4) node[right] {$x\geqslant a$};
\draw[->,>=latex] (6,-4) node[below left] {$-\infty$} -- (12,-4) node[below right] {$+\infty$};
\draw[very thick,red] (8,-4) -- (12,-4);
\draw[very thick,red] (8.2,-3.8) -- (8,-3.8) -- (8,-4.2) -- (8.2,-4.2);
\node[below,red] at (8,-4.2) {$a$};

%
\draw[double distance=2pt,->] (0,-5) node[left] {$x\in\intervOO{-\infty}{a}$} -- (3,-5) node[right] {$x< a$};
\draw[->,>=latex] (6,-5) node[below left] {$-\infty$} -- (12,-5) node[below right] {$+\infty$};
\draw[very thick,red] (6,-5) -- (8,-5);
\draw[very thick,red] (8.2,-4.8) -- (8,-4.8) -- (8,-5.2) -- (8.2,-5.2);
\node[below,red] at (8,-5.2) {$a$};
\end{tikzpicture}
\end{center}

$I$ et $J$ désignent deux intervalles.

\subsection*{Union (réunion) d'intervalles}

L'union de $I$ et $J$ est l'ensemble de tous les nombres de $I$ et de $J$.
\[
I \cup J = \{ x | x\in I\text{ ou } x\in J\}
\]
\paragraph*{Exemple:} $I =\intervFF{1}{5}$ et $J=\intervFO{2}{6}$ $\to$ $I\cup J = \intervFO{1}{6}$.

\hspace{2cm}
\begin{tikzpicture}
\draw[->,>=latex] (0,0) -- (10,0);
\draw[thick,red] (1,0) -- (5,0) node[midway,above] {$I$};
\draw[thick,vert] (2,-0.1) -- (6,-0.1) node[midway,below] {$J$};
\draw[thick,red] (1.1,0.2) -- (1,0.2) -- (1,-0.2) node[below] {1} -- (1.1,-0.2);
\draw[thick,red] (4.9,0.2) -- (5,0.2) -- (5,-0.2) node[below] {5} -- (4.9,-0.2);
\draw[thick,vert] (2.1,0.2) -- (2,0.2) -- (2,-0.2) node[below] {2} -- (2.1,-0.2);
\draw[thick,vert] (6.1,0.2) -- (6,0.2) -- (6,-0.2) node[below] {6} -- (6.1,-0.2);
\draw[thick,bleu] (1,0.5) -- (6,0.5) node[midway,above] {$I\cup J$};
\draw[thick,bleu] (1.1,0.6) -- (1,0.6) -- (1,0.4) -- (1.1,0.4);
\draw[thick,bleu] (6.1,0.6) -- (6,0.6) -- (6,0.4) -- (6.1,0.4);
\end{tikzpicture}

\subsection*{Intersection d'intervalles}

L'intersection de $I$ et $J$ est l'ensemble de tous les éléments communs à $I$ et $J$.
\[
I \cap J = \{x|x\in I\text{ et }x\in J \}
\]

\paragraph*{Exemple:} $I =\intervFF{1}{5}$ et $J=\intervFO{2}{6}$ $\to$ $I\cap J = \intervFF{2}{5}$.

\hspace{2cm}
\begin{tikzpicture}
\draw[->,>=latex] (0,0) -- (10,0);
\draw[thick,red] (1,0) -- (5,0) node[midway,above] {$I$};
\draw[thick,vert] (2,-0.1) -- (6,-0.1) node[midway,below] {$J$};
\draw[thick,red] (1.1,0.2) -- (1,0.2) -- (1,-0.2) node[below] {1} -- (1.1,-0.2);
\draw[thick,red] (4.9,0.2) -- (5,0.2) -- (5,-0.2) node[below] {5} -- (4.9,-0.2);
\draw[thick,vert] (2.1,0.2) -- (2,0.2) -- (2,-0.2) node[below] {2} -- (2.1,-0.2);
\draw[thick,vert] (6.1,0.2) -- (6,0.2) -- (6,-0.2) node[below] {6} -- (6.1,-0.2);
\draw[thick,bleu] (2,0.5) -- (5,0.5) node[midway,above] {$I\cap J$};
\draw[thick,bleu] (2.1,0.6) -- (2,0.6) -- (2,0.4) -- (2.1,0.4);
\draw[thick,bleu] (4.9,0.6) -- (5,0.6) -- (5,0.4) -- (4.9,0.4);
\draw[bleu,<-,>=latex] (5.5,0.5) -- (6.5,0.5) node[right] {là où les intervalles se chevauchent};
\end{tikzpicture}
\end{document}