%\documentclass{article} %DÉSACTIVER POUR A5
\documentclass[a5paper]{article} %ACTIVER POUR A5

%########
% Packages #
%########

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[french]{babel}

%######Affichage des maths
\DecimalMathComma %pour ne plus avoir d'espace après la virgule dans l'écriture décimale des nombres

\usepackage{amsmath}
\usepackage{amssymb,amsthm}
\usepackage{mathrsfs}
\usepackage{amsopn}

\usepackage[np]{numprint}%écriture des nombres avec des espaces et en écriture scientifique

\usepackage{dsfont} %Pour faire le 1 double barre de la fonction caractérisitque dans un enironnement maths. \mathds{1}
%\usepackage{bbold} %Double barre mais en petit pour tout les nombres dans un enironnement maths.\mathbb{1}

%######Graphique
\usepackage[dvipsnames]{xcolor}
\usepackage{graphicx}
\usepackage{pgf}
\usepackage{tikz}
\usepackage{tkz-tab}
\usetikzlibrary{shapes,arrows}

\usepackage{geometry} 
\geometry{hscale=0.85,vscale=0.85,centering}

%######Tableau
\usepackage{array} %pour centrer dans un tableau
\usepackage{colortbl} %pour colorier les cellules lignes colonnes d'un tableau: \rowcolor{}, \columncolor{}, \cellcolor{purple!25}
\usepackage{tabularx} %quelques amélioraions de l'environnement tabular
\usepackage{diagbox} %Pour faire une diagonale dans une case d'un tableau: \diagbox{bas gauche}{haut droit}
\usepackage{multirow} %fusionner des cellules horizontalement

%######Hyperliens dans les pdf

\usepackage[colorlinks=true,linkcolor=magenta,urlcolor=magenta]{hyperref}% Pour créer des liens à l'intérieur du pdf: \hyperlink{label}{texte du lien} permettra d'atteindre la cible identifiée par \hypertarget{label}{texte de la cible}. Les textes du lien et de la cible peuvent être vides.

%######Des symboles et images

\usepackage{marvosym} %Image de téléphone protable avec la commande \Mobilefone

\usepackage{fdsymbol} %Notamment le cœur plein: \varheartsuit

\usepackage{eurosym}%pour afficher le symbole euro

%######Vrac

\usepackage{enumerate}%énumération avec des lettres 
\usepackage{tasks}%Pour avoir une liste en ligne utiliser \begin{tasks}(2) (pour deux colonnes) et non pas enumerate puis \task et non pas \item 

\usepackage{stmaryrd}%pour faire des "intervalles" d'entiers \llbracket et \rrbracket

\usepackage{xlop}%poser les calculs en colonne: \opdiv[displayintermediary=nonzero,voperation=top,shiftdecimalsep=none]{27}{45}
\opset{decimalsepsymbol={,}}

\usepackage{verbatim}%pour utiliser commande \exclure et normalement pour faire l'affichage tel quel sans compiler le texte. 
%\usepackage{alltt}%Pour utiliser une commande latex dans un environnement verbatim il faut utiliser: alltt
%Pour écrire juste suelques mots en verbatim au milieu d'un phrase: \verb|quelques mots|

\usepackage{fancyhdr}

%######Algo

\usepackage{listings} % \begin{lstlisting} \end{lstlisting} affiche du code comme le fait le langage choisi. \lstset{language=Pascal} \lstset{language=Python} pour choisir le langage dans le document avant chaque programme ou avant le \begin{document} pour l'appliquer à tout le document. 
%\lstset{} permet d'indiquer toutes les options. Pas de caractère accentué (option lourdingue à rajouter) qui vont s'ppliquer pour toute la suite du document: \lstset{language=Python}
%Il espossible d'inclure un code python d'un fichier extérieur \lstinputlisting{source_filename.py}.
%Il est possible de définir une présentation personnalisé par un ensemble de configuration enregistré dans un fichier de style
\lstdefinestyle{pythonstyle}{
	language=Python,
	backgroundcolor=\color{gray!30},   
	commentstyle=\color{Plum},
	keywordstyle=\color{blue},
	numberstyle=\tiny\color{black},
	stringstyle=\color{ForestGreen},
	basicstyle=\ttfamily\color{black},
	breakatwhitespace=false,         
	breaklines=true,                 
	captionpos=b,                    
	keepspaces=true,                 
	numbers=none,                   
	numbersep=5pt,                  
	showspaces=false,                
	showstringspaces=false,
	showtabs=false,                  
	tabsize=1
}
\lstset{style=pythonstyle}

\lstdefinestyle{bashstyle}{
	language=bash,
	backgroundcolor=\color{black},   
	commentstyle=\color{white},
	keywordstyle=\color{magenta},
	numberstyle=\tiny\color{black},
	stringstyle=\color{white},
	basicstyle=\ttfamily\footnotesize\color{white},
	breakatwhitespace=false,         
	breaklines=true,                 
	captionpos=b,                    
	keepspaces=true,                
	numbers=left,                    
	numbersep=5pt,                  
	showspaces=false,                
	showstringspaces=false,
	showtabs=false,                  
	tabsize=1
}
%\lstset{style=bashstyle}

\usepackage[french]{algorithm2e}%pseudocode

\usepackage{scratch3}

%############### Formule developpée molécule chimie

\usepackage{chemfig}

%#####################
% Commande et environnement #
%#####################

\theoremstyle{plain}

%Pour redéfinir les commande section (changer la couleur centrer):
\usepackage{titlesec}
\titleformat{\section}[block]{\color{blue}\Large\bfseries\filcenter}{}{1em}{}
\titleformat{\subsection}[hang]{\color{purple}\large\bfseries}{\thesubsection}{1em}{}
\titleformat{\subsubsection}[hang]{\color{RoyalBlue} \bfseries}{\thesubsubsection}{1em}{}
\titleformat{\paragraph}[hang]{}{}{1em}{}

\renewcommand{\thesection}{{}}
\renewcommand{\thesubsection}{\color{purple}}
\renewcommand{\thesubsubsection}{\color{RoyalBlue}}

\newenvironment{correction}{\color{Brown}}{\medskip}

\newenvironment{sujet}{}{\medskip}

%environnement bareme
\newenvironment{bareme}{\color{RoyalBlue}\footnotesize \hfill }{\footnotesize \emph{~points}}

%environnement détais du barème
\newenvironment{details}{\color{RoyalBlue}\noindent ~\\}{~\\}

%environnement notabene
\newenvironment{notabene}{\color{PineGreen}\noindent ~\\}{~\\}

%environnement exemples
\newenvironment{exemples}{\color{blue} \medskip \noindent \underline{Exemples.}}{}

%environnement remarques
\newenvironment{remarques}{\medskip \noindent {\color{BlueViolet}\underline{Remarques.}}\color{BlueViolet}}{}

\newenvironment{lecon}{\color{black}}{}

\newenvironment{culturegenerale}{\color{Violet}}{}

%Pour redéfinir les environnements exercices et autres avec de la couleur
\newsavebox{\selvestebox}
\newenvironment{colbox}[1]
{\newcommand\colboxcolor{#1}%
	\begin{lrbox}{\selvestebox}%
		\begin{minipage}{\dimexpr\columnwidth-2\fboxsep\relax}}
		{\end{minipage}\end{lrbox}%
	\begin{center}
		\colorbox{\colboxcolor}{\usebox{\selvestebox}}
\end{center}}

%environnement exercice
\newcounter{Exercice}
\setcounter{Exercice}{1}
\newcounter{Exercicecorrection}
\newenvironment{exercice}[1]{ \setcounter{Exercicecorrection}{\theExercice} \color{black} \begin{colbox}{LimeGreen!30} \hfill \small {\color{OliveGreen}Exercice \theExercice. {\color{black}#1}} \hfill \addtocounter{Exercice}{1}}{ \end{colbox} }

%environnement exercicecorrection
\newenvironment{exercicecorrection}{\medskip \small \color{Brown} \noindent \underline{Correction de l'exercice \theExercicecorrection}
	
}{}

%environnement definition
\newcounter{Definition}
\setcounter{Definition}{1}
\newenvironment{definition}{\medskip \noindent {\color{orange}Définition \theDefinition} \addtocounter{Definition}{1} \newline \noindent \begin{tabular}{|m{12cm}|}\hline \\ }{\\ \hline \end{tabular}}

%environnement théorème il est possible d'ajouter un titre de théorème en mettant entre accolade le titre après le begin{theoreme}
\newcounter{Theoreme}
\setcounter{Theoreme}{1}
\newenvironment{theoreme}[1]{\medskip \noindent {\color{purple}Théorème \theTheoreme #1} \addtocounter{Theoreme}{1} 
	
	\noindent \begin{tabular}{|m{12cm}|}\hline \\ }{\\ \hline \end{tabular}}

%environnement proposition
\newcounter{Proposition}
\setcounter{Proposition}{1}
\newenvironment{proposition}[1]{\medskip \noindent {\color{PineGreen}Proposition \theProposition #1} \addtocounter{Proposition}{1}
	
	\noindent \begin{tabular}{|m{12cm}|}\hline \\ }{\\ \hline \end{tabular}}

%environnement propriété
\newcounter{Propriete}
\setcounter{Propriete}{1}
\newenvironment{propriete}[1]{\medskip \noindent {\color{PineGreen}Propriété \thePropriete #1} \addtocounter{Propriete}{1}
	
	\noindent \begin{tabular}{|m{12cm}|}\hline \\ }{\\ \hline \end{tabular}}

%environnement méthode
\newcounter{Methode}
\setcounter{Methode}{1}
\newenvironment{methode}[1]{\medskip \noindent {\color{PineGreen}Méthode \theMethode #1} \addtocounter{Methode}{1}
	
	\noindent \begin{tabular}{|m{12cm}|}\hline \\ }{\\ \hline \end{tabular}}

%environnement lemme
\newcounter{Lemme}
\setcounter{Lemme}{1}
\newenvironment{lemme}[1]{\medskip \noindent {\color{PineGreen}Lemme \theLemme #1} \addtocounter{Lemme}{1}
	
	\noindent \begin{tabular}{|m{12cm}|}\hline \\ }{\\ \hline \end{tabular}}

%environnement corollaire
\newcounter{Corollaire}
\setcounter{Corollaire}{1}
\newenvironment{corollaire}[1]{\medskip \noindent {\color{PineGreen}Corollaire \theCorollaire #1} \addtocounter{Corollaire}{1} 
	
	\noindent \begin{tabular}{|m{12cm}|}\hline \\ }{\\ \hline \end{tabular}}

%environnement démonstration
\newcounter{Demonstration}
\setcounter{Demonstration}{1}
\newenvironment{preuve}[1]{\medskip \noindent {\color{PineGreen} Démonstration} \hfill #1 \addtocounter{Demonstration}{1} \color{violet} 
	
}{\hfill $\blacksquare$}

%environnement conclusion encadré et coloré
\newenvironment{conclusion}
{\color{PineGreen}\begin{tabular}{|c|}\hline \\ \begin{minipage}{0.85\linewidth} \begin{center} }
			{\end{center} \end{minipage} \\ \\ \hline \end{tabular} }

%Commande pour l'objectif et l'écrire en vert
\newcommand{\objectif}[1]{{\color{PineGreen}#1}
	
	\medskip}

%########################
%Test conditionnel pour l'affichage    #
%########################
\newif\ifs
%\strue%affiche la boite à trous
\sfalse%affiche la réponse

%Pour faire une case à trou complétable sur le pdf
\newcounter{Trous}
\setcounter{Trous}{1}
\newcommand{\trous}[2][3cm]{
	\ifs
	\begin{Form}
		\TextField[name=\theTrous ,bordercolor=,borderwidth=0, backgroundcolor=gray!20, align=1,  width=#1 ,height=0.2cm, bordersep=0,color=black] {}
	\end{Form}
	\xspace
	\else
	#2
	\fi
	\addtocounter{Trous}{1}
}

%#########################
%en tête puis pied de page
%#########################

\pagestyle{empty}
\pagestyle{fancy} 
\renewcommand{\headrulewidth}{0pt}%Pas de ligne horizontale en haut
\lhead[]{}%entre crochets pages paires entre accolades pages impaires
\chead[\small ]{\footnotesize \href{http://unemainlavelautre.net/baccalaureat_0ieme.html}{Bac 2023/03/29 La Réunion.} }% l left, c center, r right
\rhead[]{}
\lfoot[]{}
\cfoot[\small -\thepage -]{\small -\thepage -}
\rfoot[]{}

%############################
%les environnements qu'on affiche ou pas  #
%############################

\newcommand{\exclure}[1]{\renewenvironment{#1}{\begingroup\comment}{\endcomment\endgroup\ignorespaces}}

%Pour cours corrections
%\exclure{preuve} \exclure{exemples} \exclure{remarques} \exclure{corollaire} \exclure{lemme} \exclure{proposition} \exclure{theoreme} \exclure{culturegenerale} \exclure{definition} \exclure{lecon} \exclure{sujet} \exclure{notabene} \exclure{details} \exclure{bareme} \exclure{sujet} \exclure{correction}  \exclure{methode}

%Pour cours exercices
%\exclure{preuve} \exclure{exemples} \exclure{remarques} \exclure{corollaire} \exclure{lemme} \exclure{proposition} \exclure{theoreme} \exclure{culturegenerale} \exclure{definition} \exclure{lecon} \exclure{exercicecorrection} \exclure{notabene} \exclure{details} \exclure{bareme} \exclure{sujet} \exclure{correction}  \exclure{methode}

%Pour cours lecon
%\exclure{preuve} \exclure{exemples} \exclure{remarques} \exclure{lecon} \exclure{exercice} \exclure{exercicecorrection} \exclure{notabene} \exclure{details} \exclure{bareme} \exclure{sujet} \exclure{correction}

%Pour cours intégrale
%\exclure{details} \exclure{bareme} \exclure{sujet} \exclure{notabene} 

%Pour devoir surveillé sujet
%\exclure{preuve} \exclure{exemples} \exclure{remarques} \exclure{corollaire} \exclure{lemme} \exclure{proposition} \exclure{theoreme} \exclure{culturegenerale} \exclure{definition} \exclure{lecon} \exclure{exercicecorrection} \exclure{notabene} \exclure{details} \exclure{correction}

%Pour devoir surveillé correction
%\exclure{preuve} \exclure{exemples} \exclure{remarques} \exclure{corollaire} \exclure{lemme} \exclure{proposition} \exclure{theoreme} \exclure{culturegenerale} \exclure{definition} \exclure{lecon} \exclure{exercicecorrection} \exclure{notabene} \exclure{sujet}

%Pour devoir surveillé intégrale
\exclure{preuve} \exclure{exemples} \exclure{remarques} \exclure{corollaire} \exclure{lemme} \exclure{proposition} \exclure{theoreme} \exclure{culturegenerale} \exclure{definition} \exclure{lecon} \exclure{exercicecorrection} \exclure{notabene}

%###############################
%#Double numérotation des pages#
%###############################
%\pagenumbering{roman} %À mettre juste avant \begin{document}. DOnc simplement décommenter.
%\pagenumbering{arabic} %À copier décommenté 

\begin{document}

\section{Bac 2023/03/29 La Réunion.}

\subsection{Exercice 1. \hfill 5 points}

\subsubsection{Partie A.}

\begin{enumerate}
	\item 
	
	\begin{correction}
		
		~
		
		\begin{center}
			\begin{tikzpicture}[xscale=1,yscale=1]
			%Écarts entre entre racine et premier niveau
			\def\xA{2};
			%Nombre de nœuds du premiers niveau
			\def\noA{2};
			%Nombre de nœuds du deuxième niveau
			\def\noB{4};
			%Nombre de nœuds par embranchement du deuxième niveau
			\def\noBe{2};
			%Écarts entre nœuds du deuxième niveau
			\def\xB{2+\xA};
			\def\yB{1};
			%Racine
			\coordinate (O) at ({0},{-\yB/2});
			%Pour ne pas écrire les mots above et below
			\def\posA{above};
			\def\posB{below};
			%Position des nœuds du premier niveau
			%Dessin des nœuds branches du premier niveau 
			\foreach \nA/\A/\numero/\contenu/\ponderation/\position in {
				nA1/A1/1/$R$/$\np{0,2}$/\posA,
				nA2/A2/2/$\overline{R}$/$\np{0,8}$/\posB
			}{
				\coordinate (\A) at ({\xA},{\noB*\yB-(\noBe+1)/2*\yB-\noB*\yB/2-(\numero-1)*\yB*\noBe});
				\draw node (\nA) at (\A) {\contenu};
				\draw (O)--(\nA) node[midway, sloped, \position] {\ponderation};
			};
			%Position des nœuds, dessin des nœuds et des branches du deuxième niveau
			\foreach \nA/\nB/\B/\numero/\contenu/\ponderation/\position in {
				nA1/nB1/B1/1/$S$/$\np{0,9}$/\posA,
				nA1/nB2/B2/2/$\overline{S}$/$\np{0,1}$/\posB,
				nA2/nB3/B3/3/$S$/$x$/\posA,
				nA2/nB4/B4/4/$\overline{S}$/$1-x$/\posB
			}{
				\coordinate (\B) at ({\xB},{(\noB-\numero)*\yB-\noB*\yB/2});
				\draw node (\nB) at (\B) {\contenu};
				\draw (\nA)--(\nB) node[midway, sloped, \position] {\ponderation};
			};
			\end{tikzpicture}
		\end{center}
		
	\end{correction}
	
	\item 
	
	\begin{correction}
		
		\objectif{Déterminons $x$.}
		
		$\{ R,\overline{R}\}$ est un système complet d'événements donc, d'après la formule des probabilités totales,
		
		\begin{align*}
			\mathbb{P}(S) &= \mathbb{P}(R \cap S) + \mathbb{P}(\overline{R} \cap S)\\
			\intertext{Puisque $\mathbb{P}(R)\ne 0$ et $\mathbb{P}(\overline{R})\ne 0$, d'après la formule des probabilités composées:}
			\mathbb{P}(S) &= \mathbb{P}(R) \times \mathbb{P}_R(S)+ \mathbb{P}(\overline{R}) \times \mathbb{P}_{\overline{R}}(S)\\
			&= 0,2 \times 0,9 + 0,8 \times x\\
			&= 0,8x+0,18
		\end{align*}
		
		Or, d'après l'énoncé, $\mathbb{P}(S)= 0,82$ donc
		\begin{align*}
			0,82 &= 0,8 x +0,18\\
			\intertext{équation du premier degré qui équivaut successivement à:}
			0,82 {\color{orange}-0,18} &= 0,8x + 0,18 {\color{orange}-0,18}\\
			0,64 &= 0,8x\\
			\frac{0,64}{\color{orange}0,8} &= \frac{0,8x}{\color{orange}0,8}\\
			0,8 &= x
		\end{align*}
		
		\begin{conclusion}
			
			$x=0,8$.
			
		\end{conclusion}
		
	\end{correction}
	
	\item 
	
	\begin{correction}
		
		\objectif{Calculons $\mathbb{P}_S(R)$.}
		
		Par définition de la probabilité conditionnelle, et puisque $\mathbb{P}(S) \ne 0$,
		
		\begin{align*}
			\mathbb{P}_S(R) &= \frac{\mathbb{P}(R \cap S)}{\mathbb{P}(S)}\\
			&= \frac{0,2 \times 0,9}{0,82}\\
			&\approx 0,219 \ \text{en tronquant.}
		\end{align*}
		
		En arrondissant à $10^{-2}$
		
		\begin{conclusion}
			
			$\mathbb{P}_S(R) \approx 0,22$.
			
		\end{conclusion}
		
	\end{correction}
	
\end{enumerate}

\subsubsection{Partie B.}

\begin{enumerate}
	\item 
	
	\begin{enumerate}
		\item 
		
		\begin{correction}
			
			\begin{conclusion}
				
				$X \hookrightarrow \mathscr{B}(5;0,82)$.
				
			\end{conclusion}
			
		\end{correction}
		
		\item 
		
		\begin{correction}
			
			\objectif{Calculons $\mathbb{P}(X \leqslant 3)$.}
			
			{\color{orange}Avec la calculatrice:} \[ \mathbb{P}(X \leqslant 5) \approx 0,2223 \text{en tronquant.} \]
			
			\begin{conclusion}
				
				En arrondissant à $10^{-3}$: $\mathbb{P}(X \leqslant 3) \approx 0,222$.
				
			\end{conclusion}
				
		\end{correction}
		
	\end{enumerate}
	
	\item 
	
	\begin{enumerate}
		\item 
		
		\begin{correction}
			
			\objectif{Calculons $p_n$.}
			
			Soit $X_n$ la variable aléatoire au choix des $n$ clients associe le nombre de clients satisfaits.
			
			$X_n \hookleftarrow \mathscr{B}(n;0,82)$ et donc
			\begin{align*}
				p_n &= \mathbb{P}(X=n)\\
				&= \binom{n}{n} \times 0,82 ^n \times (1-0,82)^{n-n}\\
				&= 1 \times 0,82^n \times 1
			\end{align*}
			
			\begin{conclusion}
				
				$p_n=0,82^n$.
				
			\end{conclusion}
			
		\end{correction}
		
		\item 
		
		\begin{correction}
			
			\objectif{Résolvons dans $\mathbb{N}$ l'inéquation $p_n<0,01$.}
			
			\begin{align*}
				p_n<0,01 &\Leftrightarrow 0,82^n <0,01\\
				\intertext{Puisque $\ln$ réalise une bijection de $\mathbb{R}_+^*$ sur $\mathbb{R}$ et qu'elle est strictement croissante:}
				p_n<0,01 &\Leftrightarrow \ln\left( 0,82^n \right) < \ln(0,01)\\
				&\Leftrightarrow n \ln(0,82)< \ln(0,01)\\
				\intertext{Puisque $0,82<1$, $\ln(0,82) <0$ et donc}
				p_n<0,01 &\Leftrightarrow \frac{n\ln(0,82)}{\color{orange}\ln(0,82)} > \frac{\ln(0,01)}{\color{orange}\ln(0,082)}\\
				&\Leftrightarrow n > \frac{\ln(0,01)}{\ln(0,82)}
				\intertext{Or $n \in \mathbb{N}$ et $23,2<frac{\ln(0,01)}{\ln(0,82)} < 23,21$ donc}
				p_n<0,01 &\Leftrightarrow n\geqslant 24
			\end{align*}
			
			\begin{conclusion}
				
				$p_n<0,01$ si et seulement si $n \in \mathbb{N}$ et $n\geqslant 24$.
				
			\end{conclusion}
			
		\end{correction}
		
	\end{enumerate}
	
\end{enumerate}

\subsection{Exercice 2.\hfill 5 points}

\begin{enumerate}
	\item 
	
	\begin{correction}
		
		\objectif{Calculons $u_1$.}
		
		\begin{align*}
			u_1 &= \frac{6u_0+2}{u_n+5}\\
			&= \frac{6 \times 8+2}{8+5}
		\end{align*}
		
		\begin{conclusion}
			
			$u_1=\frac{50}{13}$.
			
		\end{conclusion}
		
	\end{correction}
	
	\item 
	
	\begin{enumerate}
		\item 
		
		\begin{correction}
			
			\objectif{Étudions la monotonie de $f$.}
			
			$f=\frac{u}{v}$ où $u:x \mapsto 6x+5$ et $v: x \mapsto x+5$. Comme $u$ et $v$ sont dérivables sur $\mathbb{R}$ et que $v$ ne s'annule qu'en $-5$, $f$ est dérivable sur $[0;+\infty[$.
			
			\medskip
			Puisque $u'=6$ et $v'=1$, de $f'=\frac{u'v-uv'}{v^2}$ nous déduisons, pour tout $x \in \mathbb{R}_+$,
			
			\begin{align*}
				f'(x) &= \frac{6 \times (x+5) -(6x+2) \times 1}{(x+5)^2}\\
				&= \frac{28}{(x+5)^2}
			\end{align*}
			
			Clairement $f'>0$ sur $\mathbb{R}^+$.
			
			\begin{conclusion}
				
				$f$ est strictement croissante sur $\mathbb{R}_+$.
				
			\end{conclusion}
			
			\medskip
			\objectif{Démontrons que si $x>2$ alors $f(x)>2$.}
			
			Soit $x>2$.
			
			Puisque $f$ est strictement croissante sur $\mathbb{R}_+$: \[ f(x) > f(2). \]
			
			Or $f(2)=\frac{6\times 2+2}{2+5}=2$ donc $f(x)>2$.
			
			\begin{conclusion}
				
				$\forall x \in \mathbb{R}_+,\ x>2 \Rightarrow f(x)>2$.
				
			\end{conclusion}
			
		\end{correction}
		
		\item 
		
		\begin{correction}
			
			Soit, pour tout $n \in \mathbb{N}$, $\mathscr{P}(n)$: \og $u_n>2$ \fg{}.
			
			\medskip
			\objectif{Démontrons par récurrence que $\mathscr{P}(n)$ est vraie pour tout $n \in \mathbb{N}$.}
			
			\begin{enumerate}[*]
				\item $u_0=8>2$ donc $\mathscr{P}(0)$ est vraie.
				
				\item Soit $n \in \mathbb{N}$. Supposons $\mathscr{P}(n)$ vraie et démontrons qu'alors $\mathscr{}(n+1)$ est vraie.
				
				Par hypothèse de récurrence: $u_n>2$. Puisque $f$ est strictement croissante sur $]2;+\infty[$, $f(u_n)>f(2)$. Or $f(u_n)=u_{n+1}$ et $f(2)=2$ donc $u_{n+1}>2$.
				
				$\mathscr{P}(n+1)$ est vraie.
				
				\item Nous avons donc démontré par récurrence que 
				
			\end{enumerate}
			
			\begin{conclusion}
				
				$\forall n \in \mathbb{N},\ u_n>2$.
				
			\end{conclusion}
			
		\end{correction}
		
	\end{enumerate}
	
	\item 
	
	\begin{enumerate}
		\item 
		
		\begin{correction}
			
			\objectif{Étudions la monotonie de $(u_n)$.}
			
			Soit $n \in \mathbb{N}$.
			
			$u_n>2$ donc $2-u_n<0$, $u_n+1>0$ et $u_n+5>0$. Par produit et quotient: $u_{n+1}-u_n<0$.
			
			Ceci étant vrai pour tout $n\in\mathbb{N}$,
			
			\begin{conclusion}
				
				$(u_n)$ est strictement décroissante.
				
			\end{conclusion}
			
		\end{correction}
		
		\item 
		
		\begin{correction}
			
			\objectif{Justifions la convergence de $(u_n)$.}
			
			$(u_n)$ est décroissante et minorée par $2$ donc, d'après le théorème de la limite monotone,
			
			\begin{conclusion}
				
				$(u_n)$ converge.
				
			\end{conclusion}
			
		\end{correction}
		
	\end{enumerate}
	
	\item 
	
	\begin{enumerate}
		\item 
		
		\begin{correction}
			
			\objectif{Calculons $v_0$.}
			
			\begin{align*}
				v_0 &= \frac{u_0-2}{u_0+1}\\
				&= \frac{8-2}{8+1}
			\end{align*}
			
			\begin{conclusion}
				
				$v_0=\frac{2}{3}$.
				
			\end{conclusion}
			
		\end{correction}
		
		\item 
		
		\begin{correction}
			
			\objectif{Démontrons que $(v_n)$ est géométrique.}
			
			Soit $n \in \mathbb{N}$.
			
			\begin{align*}
				v_{n+1} &= \frac{u_{n+1}-2}{u_{n+1}+1}\\
				&= \frac{\frac{6u_n+2}{u_n+5}-2}{\frac{6u_n+2}{u_n+5}+1}\\
				&= \frac{\frac{6u_n+2-2(u_n+5)}{u_n+5}}{\frac{6u_n+2+u_n+5}{u_n+5}}\\
				&= \frac{4u_n-8}{u_n+5} \times \frac{u_n+5}{7u_n+7}\\
				&= \frac{4(u_n-2)}{7(u_n+1)}\\
				&= \frac{4}{7} \times \frac{u_n-2}{u_n+1}\\
				&= \frac{4}{7} \times v_n
			\end{align*}
			
			\begin{conclusion}
				
				$(v_n)$ est géométrique de raison $\frac{4}{7}$.
				 
			\end{conclusion}
			
		\end{correction}
		
		\item 
		
		\begin{correction}
			
			\objectif{Étudions la convergence de $(v_n)$.}
			
			$(v_n)$ est géométrique de raison $\frac{4}{7}$ et de terme initial $u_0=\frac{2}{3}$ donc, pour tout entier naturel $n$, \[ v_n=\frac{2}{3} \times \left( \frac{4}{7} \right)^n. \]
			
			Puisque $-1< \frac{4}{7} <1$, $\left( \frac{4}{7} \right)^n \underset{n \to +\infty}{\longrightarrow} 0$.
			
			Finalement, par produit:
			
			\begin{conclusion}
				
				$\displaystyle \lim_{n\to + \infty} v_n =0$.
				
			\end{conclusion}
			
			\medskip
			\objectif{Déterminons la limite de $(u_n)$.}
			
			Notons $\ell$ la limite de $(u_n)$.
			
			$x \mapsto \frac{x-2}{x+1}$ étant continue sur $]2;+\infty[$, en passant à la limite lorsque $n$ tend vers $+\infty$ dans $v_n=\frac{u_n-2}{u_n+1}$ nous obtenons
			
			\begin{align*}
				0 &= \frac{\ell -2}{\ell +1}\\
				0 &= \ell -2\\
				0 {\color{orange}+2} &= \ell -2 {\color{orange}+2}\\
				2 &= \ell 
			\end{align*}
			
			\begin{conclusion}
				
				$\displaystyle \lim_{n \to +\infty} u_n=2$.
				
			\end{conclusion}
			
		\end{correction}
		
	\end{enumerate}
	
	\item 
	
	\begin{correction}
		
		\begin{conclusion}
			
			Le programme renvoie $10$.
			
		\end{conclusion}
		
		\medskip
		\begin{conclusion}
			
			$u_{10}$ est la première valeur de $(u_n)$ qui s'approche de la imite $2$ à $0,01$ près (forcément par excès).
			
		\end{conclusion}
	
	\end{correction}
	
\end{enumerate}

\subsection{Exercice 3.}

\begin{enumerate}
	\item 
	
	\begin{correction}
		
		\objectif{Déterminons une représentation paramétrique de $(d)$.}
		
		Soit $M(x,y,z)$ un point de l'espace.
		
		Puisque $(d)$ contient $A$ et admet $\vec{u}$ pour vecteur directeur, $M \in(d)$ si et seulement si il existe $t \in \mathbb{R}$ tel que $\overrightarrow{AM}=t\vec{u}$.
		
		Cette dernière égalité équivaut successivement à
		
		\[	\begin{pmatrix} x-x_A \\ y-y_A \\ z-z_A \end{pmatrix} = \begin{pmatrix} t \times 0 \\ t \times 2 \\ t\times (-1) \end{pmatrix} \]
		
		\[ \begin{pmatrix} x-1 \\ y-1 \\ z-0 \end{pmatrix} = \begin{pmatrix} 0 \\ 2t \\-t\end{pmatrix} \]
		
		\[ \left\{ \begin{array}{l} x-1 = 0\\ y-1= 2t \\ z=-t \end{array} \right. \]
		
		\begin{conclusion}
			
			$(d):\ \left\{ \begin{array}{l} x=1 \\ y=2t+1 \\ z=-t \end{array} \right.,\ t \in \mathbb{R}$.
			
		\end{conclusion}
		
	\end{correction}
	
	\item 
	
	\begin{correction}
		
		\objectif{Démontrons que $B \in \mathcal{P}\cap (d)$.}
		
		\begin{enumerate}
			\item $1+4 \times (-1)+2 \times 1+1=0$ donc $B \in \mathcal{P}$.
			
			\item Si $B \in (d)$ alors, puisque $z_B=1$, nécessairement $t_B=-1$.
			
			Réciproquement, si $t=-1$ alors le point de coordonnées $(1 ; 2 \times (-1) +1;1)$ appartient à $(d)$. Autrement dit $B \in (d)$.
			
			Ainsi $B \in(d)$.
			
		\end{enumerate}
		
		\begin{conclusion}
			
			$B$ appartient à $\mathcal{P}$ et $(d)$.
			
		\end{conclusion}
		
		\medskip
		\objectif{Démontrons que $\mathcal{P}$ et $(d)$ sont sécants.}
		
		De l'équation cartésienne de $\mathcal{P}$ nous déduisons que $\vec{\nu} \begin{pmatrix} 1 \\ 4 \\ 2 \end{pmatrix}$ est un vecteur normal à $\mathcal{P}$.
		
		\medskip
		Ainsi $\vec{u} \begin{pmatrix} 0 \\ 2 \\ -1 \end{pmatrix}$ et $\vec{\nu} \begin{pmatrix} 1 \\ 4 \\ 2 \end{pmatrix}$. Or $\begin{vmatrix} 0 & 1 \\ 2 & 4 \end{vmatrix}=0 \times 4-2 \times 1=-2$ donc $\vec{u}$ et $\vec{\nu}$ ne sont pas colinéaires.
		
		\begin{conclusion}
			
			$\mathcal{P}$ et $(d)$ sont sécants.
			
		\end{conclusion}
		
	\end{correction}
	
	\item 
	
	\begin{enumerate}
		
		\item 
		
		\begin{correction}
			
			\objectif{Justifions que $A$, $B$ et $C$ définissent un plan.}
			
			$\overrightarrow{AB} \begin{pmatrix} 0 \\ -2 \\ 1 \end{pmatrix}$ et $\overrightarrow{AC} \begin{pmatrix} 0 \\ -1 \\ -1 \end{pmatrix}$.
			
			\begin{enumerate}[*]
				\item $\overrightarrow{AB} \ne \vec{0}$ et $\overrightarrow{AC} \ne \vec{0}$.
				
				\item $\overrightarrow{AB}$ et $\overrightarrow{AC}$ ne sont pas colinéaires puisque $\begin{vmatrix} -2 & -1 \\ 1 & -1 \end{vmatrix}= -2 \times (-1)-1 \times 0=2\ne 0$.
				
			\end{enumerate}
			
			\begin{conclusion}
				
				$A$, $B$ et $C$ définissent un plan.
				
			\end{conclusion}
			
		\end{correction}
		
		\item 
		
		\begin{correction}
			
			\objectif{Démontrons que $\vec{n}$ est normal à $(ABC)$.}
			
			\begin{enumerate}[*]
				\item $\vec{n} \cdot \overrightarrow{AB}= 1 \times 0 + 0 \times (-2) + 0 \times 1=0$.
				
				\item $\vec{n} \cdot \overrightarrow{AC}= 1 \times 0 + 0 \times (-1) + 0 \times (-1)=0$.
				
			\end{enumerate}
			
			Ainsi $\vec{n}$ est orthogonal à deux vecteurs d'une base de la direction de $(ABC)$ donc 
			
			\begin{conclusion}
				
				$\vec{n}$ est normal à $(ABC)$.
				
			\end{conclusion}
			
		\end{correction}
		
		\item 
		
		\begin{correction}
			
			\objectif{Déterminons une équation cartésienne de $(ABC)$.}
			
			Soit $M(x,y,z)$ un point de l'espace.
			
			$M \in (ABC)$ si et seulement si $\overrightarrow{AM}\cdot \vec{n}=0$.
			
			Ce qui équivaut encore successivement à
			
			\begin{align*}
				(x-1) \times 1 +(y-1) \times 0 + (z-0) \times 0 &= 0\\
				x-1 &= 0
			\end{align*}
			
			\begin{conclusion}
				
				$(ABC): \ x=1$.
				
			\end{conclusion}
			
		\end{correction}
				
	\end{enumerate}
	
	\item 
	
	\begin{enumerate}
		\item 
		
		\begin{correction}
			
			\objectif{Démontrons que $ABC$est isocèle en $A$.}
			
			Le repère étant orthonormé norme et longueur se confondent.
			
			\begin{align*}
				AB &= \|\overrightarrow{AB} \| \\
				&= \sqrt{ (x_B-x_A)^2+(y_B-y_A)^2+ (z_B-z_A)^2}\\
				&= \sqrt{(1-1)^2+(-1-1)^2+(1-0)^2}\\
				&= \sqrt{5}
			\end{align*}
			
			De même: $AC=\sqrt{5}$ et donc $AB=AC$ et
			
			\begin{conclusion}
				
				$ABC$ est isocèle en $A$.
				
			\end{conclusion}
			
		\end{correction}
		
		\item 
		
		\begin{correction}
			
			\objectif{Calculons $AH$.}
			
			\begin{enumerate}[*]
				\item Puisque $H$ est le milieu de $[BC]$ \[ x_H=\frac{x_B+x_C}{2}= \frac{1+1}{2}=1.\]
				
				De même $y_H=-1$ et $z_H=0$.
				
				Ainsi $H(1;-1;0)$.
				
				\item $AH = \| \overrightarrow{AH} \| =\sqrt{ (1-1)^2+(1-(-1))^2 +(0-0)^2}$.
				
			\end{enumerate}
			
			\begin{conclusion}
				
				$AH=2$.
				
			\end{conclusion}
			
			\medskip
			\objectif{Calculons l'aire $\mathscr{A}(ABC)$ de $ABC$.}
			
			$ABC$ étant isocèle en $A$, le milieu $H$ de $[BC]$ est aussi le pied de la hauteur issue de $A$ et donc
			
			\begin{align*}
				\mathscr{A}(ABC) &= \frac{1}{2} \times BC \times AH\\
				\intertext{Or il est aisé de vérifier que $BC=2$ donc}
				\mathscr{A}(ABC) &= \frac{1}{2} \times 2 \times 2
			\end{align*}
			
			\begin{conclusion}
				
				$\mathscr{A}(ABC)=2$.
				
			\end{conclusion}
			
		\end{correction}
		
	\end{enumerate}
	
	\item 
	
	\begin{enumerate}
		\item 
		
		\begin{correction}
			
			\objectif{Démontrons que $(BD)$ est la hauteur de $ABCD$ issue de $D$.}
			
			$\overrightarrow{DB} \begin{pmatrix} 1 \\ 0 \\ 0 \end{pmatrix}$ donc $\overrightarrow{DB} = \vec{n}$.
			
			Or $\vec{n}$ est normal à $(ABC)$ donc $\overrightarrow{DB}$ est orthogonal à $\overrightarrow{AB}$ et $\overrightarrow{CB}$.
			
			Nous en déduisons que $(DB)$ est perpendiculaire à $(ABC)$.
			
			\begin{conclusion}
				
				$(DB)$ est la hauteur de $ABCD$ issue de $D$.
				
			\end{conclusion}
			
		\end{correction}
		
		\item 
		
		\begin{correction}
			
			\objectif{Calculons le volume $\mathscr{V}$ de $ABCD$.}
			
			Puisque $(BD)$ est la hauteur de $ABCD$ issue de $D$:
			
			\begin{align*}
				\mathscr{V} &= \frac{1}{3} \times \mathscr{A}(ABC) \times BD\\
				&= \frac{1}{2} \times 2 \times 1
			\end{align*}
			
			\begin{conclusion}
				
				$\mathscr{V}=1$.
				
			\end{conclusion}
			
		\end{correction}
		
	\end{enumerate}
	
\end{enumerate}

\subsection{Exercice 4. \hfill 5 points}

\begin{enumerate}
	\item 
	
	\begin{correction}
		
		\begin{conclusion}
			
			Réponse c.
			
		\end{conclusion}
		
	\end{correction}
	
	\item 
	
	\begin{correction}
		
		\begin{conclusion}
			
			Réponse a.
			
		\end{conclusion}
		
	\end{correction}
	
	\item 
	
	\begin{correction}
		
		\begin{conclusion}
			
			Réponse d.
			
		\end{conclusion}
		
	\end{correction}
	
	\item 
	
	\begin{correction}
		
		\begin{conclusion}
			
			Réponse b.
			
		\end{conclusion}
		
	\end{correction}
	
	\item 
	
	\begin{correction}
		
		\begin{conclusion}
			
			Réponse a.
			
		\end{conclusion}
		
	\end{correction}
	
\end{enumerate}

\end{document}

\section{Modèles.}

\subsection{Graphique}

\begin{center}
	\begin{tikzpicture}[xscale=1,yscale=1]
	\def\xY{-0.5};
	\def\yY{-0.5};
	\def\xZ{8.5};
	\def\yZ{7};
	\coordinate (Y) at (\xY,\yY);
	\coordinate (Z) at (\xZ,\yZ);
	\draw[xstep=0.1cm, ystep=0.1cm, line width=0.01cm,gray!50!white] (Y) grid (Z);
	\draw[xstep=1cm, ystep=1cm, line width=0.02cm,black!70!white] (Y) grid (Z);
	\draw (0,0)node[below left,fill=white]{\small $0$};
	\foreach \x in {1, 2}	\draw[thick](\x,0.1cm)--(\x,-0.1cm) node[below,fill=white]{\footnotesize  \pgfmathparse{\x }\pgfmathprintnumber{\pgfmathresult}};
	\foreach \y in {1,2}	\draw[thick](0.1cm,\y)--(-0.1cm,\y) node[left,fill=white]{\footnotesize  \pgfmathparse{\y }\pgfmathprintnumber{\pgfmathresult}};
	\draw[ ->,very thick] (\xY, 0) -- (\xZ, 0) node[right]{$x$};
	\draw[ ->,very thick] (0, \yY) -- (0, \yZ) node[above]{$y$};
	\draw[blue, thick][samples=100,domain=0:7] plot(\x,{(\x +1)^2/exp(\x )});
	\draw[blue] (3,2) node[fill=white] {$\mathcal{C}_B$};
	\fill[color=gray , opacity=0.25] (-0.5, {(-(2/9)*((-0.5)*2)*(2*(-0.5))+(4/3)*(2*(-0.5))+4)/2})
	-- plot [domain=-0.5:2] (\x,{(-(2/9)*(\x*2)*(2*\x)+(4/3)*(2*\x)+4)/2})
	-- (2, {(-(2/9)*(2*2)*(2*2)+(4/3)*(2*2)+4)/2})
	-- (2,0) 
	--(-0.5,0)
	-- cycle;
	\draw[blue, thick] plot[smooth] coordinates {(-3,-1)(-2.5,-0.65)(-2,0)(-1.5,1)(-1,1.5)(-0.5,1.8)(0,2)(0.5,1.89)(1,1.6)(1.5,1.35)(2,1)(2.5,0.55)(3,0)(3.5,-0.9)(4,-1.5)(4.5,-1.82)(5,-2)};
	\end{tikzpicture}
\end{center}

Pour évaluer la fonction f en a avec tikz: \pgfmathparse{f(a)}\pgfmathresult

%Pour affecter la valeur a à la variable \x: \def\x{a}

\subsection{Graphique nouveau.}


\begin{center}
	
	\begin{tikzpicture}[xscale=1,yscale=1]
	%extremites du graphique
	\def\xcoinbasgauche{-2};
	\def\xcoinhautdroit{4};
	\def\ycoinbasgauche{-4};
	\def\ycoinhautdroit{4};
	%Les deux grilles
	\draw[xstep=0.5cm, ystep=0.5cm, line width=0.01cm,gray!40!white] ({\xcoinbasgauche},{\ycoinbasgauche}) grid ({\xcoinhautdroit},{\ycoinhautdroit});
	\draw[xstep=1cm, ystep=1cm, line width=0.02cm,black!60!white]({\xcoinbasgauche},{\ycoinbasgauche}) grid ({\xcoinhautdroit},{\ycoinhautdroit});
	%Les deux axes
	\draw[ ->,thick] (\xcoinbasgauche, 0) -- (\xcoinhautdroit, 0) node[right]{$x$};
	\draw[ ->, thick] (0, \ycoinbasgauche) -- (0, \ycoinhautdroit) node[above]{$y$};
	%repere orthonorme
	\coordinate (O) at ({0},{0});
	\draw (O) node[below left] {$O$};
	\coordinate (I) at ({1},{0});
	\draw (I) node[below left] {$I$};
	\coordinate (J) at ({0},{1});
	\draw (J) node[below left] {$J$};
	%fonction
	\draw[orange, thick][samples=100,domain=-1.2:3.2] plot({\x},{\x*\x*\x-3*\x*\x+2 )});
	%Points
	\foreach \a/\b in { -1/-2, 0/2, 1/0, 2/-2, 3/2} {\draw [red, thick] ({\a},{\b}) node{$\times$};}
	%Tangentes horizontales
	\def\longueurtangente{0.7};
	\foreach \a/\b in { 0/2, 2/-2}{ \draw[blue, thick][>=latex, <->] ({-\longueurtangente+\a}, {\b}) -- ({\longueurtangente+\a},{\b});}
	\end{tikzpicture}
	
\end{center}

\subsection{Pavé droit.}

\begin{center}
	
	\begin{tikzpicture}
	\def\longueur{5};
	\def\hauteur{3};
	\def\profondeur{2};
	\def\angledefuite{30};
	\def\coefficientmultiplicateur{0.8};
	\def\xA{0};
	\def\yA{0};
	%Création des points du bas.
	\coordinate (A) at ({\xA},{\yA});
	\coordinate (B) at ({\xA+\longueur},{\yA});
	\coordinate (C) at ({\xA+\longueur+\profondeur*cos(\angledefuite)},{\yA+\profondeur*sin(\angledefuite)});
	\coordinate (D) at ({\xA+\profondeur*cos(\angledefuite)},{\yA+\profondeur*sin(\angledefuite)});
	%Création des points du haut
	\coordinate (E) at ({\xA},{\yA+\hauteur});
	\coordinate (F) at ({\xA+\longueur},{\yA+\hauteur});
	\coordinate (G) at ({\xA+\longueur+\profondeur*cos(\angledefuite)},{\yA+\profondeur*sin(\angledefuite)+\hauteur});
	\coordinate (H) at ({\xA+\profondeur*cos(\angledefuite)},{\yA+\profondeur*sin(\angledefuite)+\hauteur});
	%Nom des points du bas dans le sens direct
	\draw (A) node [below left] {$A$};
	\draw (B) node [below right] {$B$};
	\draw (C) node [below right] {$C$};
	\draw (D) node [above left] {$D$};
	\draw (E) node [above left] {$E$};
	\draw (F) node [above] {$F$};
	\draw (G) node [above right] {$G$};
	\draw (H) node [above left] {$H$};
	%Les arêtes du bas
	\draw [] (A) -- (B);
	\draw [] (B) -- (C);
	\draw [dashed] (C) -- (D);
	\draw [dashed] (D) -- (A);
	%Les arêtes verticales
	\draw [] (A) -- (E);
	\draw [] (B) -- (F);
	\draw [] (C) -- (G);
	\draw [dashed] (D) -- (H);
	%Les arête du haut
	\draw [] (E) -- (F);
	\draw [] (F) -- (G);
	\draw [] (G) -- (H);
	\draw [] (H) -- (E);
	\end{tikzpicture}
	
\end{center}

\subsection{Dessin.}

\begin{tikzpicture}
\coordinate (A) at (0,0);
\coordinate (B) at (5,-1);
\coordinate (F) at (6,0);
\coordinate (C) at (7,1);
\coordinate (D) at (2,2);
\coordinate (O) at (3.5,0.5);
\coordinate (S) at (3.5,6);
\coordinate (J) at (3.5,3.5);
\coordinate (K) at (3,4.666);
\draw (A) node {$\bullet$};
\draw (B)node {$\bullet$};
\draw (F)node {$\bullet$};
\draw (C)node {$\bullet$};
\draw (D)node {$\bullet$};
\draw (O)node {$\bullet$};
\draw (S)node {$\bullet$};
\draw (J)node {$\bullet$};
\draw (K)node {$\bullet$};
\draw (A)node[below]{$A$};
\draw (B)node[below right]{$B$};
\draw (F)node[right]{$F$};
\draw (C)node[right]{$C$};
\draw (D)node[above right]{$D$};
\draw (O)node[above right]{$O$};
\draw (S)node[above]{$S$};
\draw (J)node[above right]{$J$};
\draw (K)node[below right]{$K$};
\draw[blue, thick](A)--(B)--(C);
\draw[blue, thick,dashed](A)--(D)--(C);
\draw[blue, thick](A)--(S);
\draw[blue, thick](B)--(S);
\draw[blue, thick](C)--(S);
\draw[blue, thick,dashed](D)--(S);
\draw[blue, thick,dashed](O)--(S);
\draw[blue, thick](F)--(S);
\draw[blue, thick,dashed](A)--(C);
\draw[blue, thick,dashed](D)--(B);
\draw[blue, thick,dashed](B)--(J)--(C);
\fill[color=gray , opacity=0.05] (A)--(B)--(C)--(D)--cycle;	
\fill[color=gray , opacity=0.1] (B)--(C)--(S)--cycle;
\fill[color=gray , opacity=0.15] (A)--(D)--(C)--(S)--cycle;
\fill[color=gray , opacity=0.20] (B)--(C)--(J)--cycle;			
\end{tikzpicture}

\subsection{Arbre nouveau 2 niveau.}

\begin{center}
	\begin{tikzpicture}[xscale=1,yscale=1]
	%Écarts entre entre racine et premier niveau
	\def\xA{2};
	%Nombre de nœuds du premiers niveau
	\def\noA{2};
	%Nombre de nœuds du deuxième niveau
	\def\noB{6};
	%Nombre de nœuds par embranchement du deuxième niveau
	\def\noBe{3};
	%Écarts entre nœuds du deuxième niveau
	\def\xB{2+\xA};
	\def\yB{1};
	%Racine
	\coordinate (O) at ({0},{-\yB/2});
	%Pour ne pas écrire les mots above et below
	\def\posA{above};
	\def\posB{below};
	%Position des nœuds du premier niveau
	%Dessin des nœuds branches du premier niveau 
	\foreach \nA/\A/\numero/\contenu/\ponderation/\position in {
		nA1/A1/1/$2^0$/$\np{1}$/\posA,
		nA2/A2/2/$2^1$/$\np{2}$/\posB
	}{
		\coordinate (\A) at ({\xA},{\noB*\yB-(\noBe+1)/2*\yB-\noB*\yB/2-(\numero-1)*\yB*\noBe});
		\draw node (\nA) at (\A) {\contenu};
		\draw (O)--(\nA) node[midway, sloped, \position] {\ponderation};
	};
	%Position des nœuds, dessin des nœuds et des branches du deuxième niveau
	\foreach \nA/\nB/\B/\numero/\contenu/\ponderation/\position in {
		nA1/nB1/B1/1/$3^0$/$\np{1}$/\posA,
		nA1/nB2/B2/2/$3^1$/$\np{2}$/\posB,
		nA1/nB3/B3/3/$3^2$/$\np{1}$/\posA,
		nA2/nB4/B4/4/$3^0$/$\np{2}$/\posB,
		nA2/nB5/B5/5/$3^1$/$\np{1}$/\posA,
		nA2/nB6/B6/6/$3^2$/$\np{2}$/\posB
	}{
		\coordinate (\B) at ({\xB},{(\noB-\numero)*\yB-\noB*\yB/2});
		\draw node (\nB) at (\B) {\contenu};
		\draw (\nA)--(\nB) node[midway, sloped, \position] {\ponderation};
	};
	\end{tikzpicture}
\end{center}

\subsection{Arbre nouveau 3 niveaux.}

\begin{center}
	\begin{tikzpicture}[xscale=1,yscale=1]
	%Écarts entre entre racine et premier niveau
	\def\xA{2};
	%Nombre de nœuds du premiers niveau
	\def\noA{3};
	%Nombre de nœuds du deuxième niveau
	\def\noB{6};
	%Nombre de nœuds par embranchement du deuxième niveau
	\def\noBe{2};
	%Écarts entre nœuds du deuxième niveau
	\def\xB{2+\xA};
	\def\yB{1};
	%Nombre de nœuds du troisième niveau
	\def\noC{12};
	%Nombre de nœuds par embranchement du troisième niveau
	\def\noCe{2};
	%Écarts entre nœuds du troisième niveau
	\def\xC{2+\xB};
	\def\yC{1};
	%Racine
	\coordinate (O) at ({0},{-\yB/2});
	%Pour ne pas écrire les mots above et below
	\def\posA{above};
	\def\posB{below};
	%Position des nœuds du premier niveau
	%Dessin des nœuds branches du premier niveau 
	\foreach \nA/\A/\numero/\contenu/\ponderation/\position in {
		nA1/A1/1/$2^0$/$\np{1}$/\posA,
		nA2/A2/2/$2^1$/$\np{1}$/\posA,
		nA3/A3/3/$2^2$/$\np{1}$/\posB
	}{
		\coordinate (\A) at ({\xA},{\noC*\yC-(\noCe*\noBe+1)/2*\yC-\noC*\yC/2-(\numero-1)*\yC*\noBe*\noCe});
		\draw node (\nA) at (\A) {\contenu};
		\draw (O)--(\nA) node[midway, sloped, \position] {\ponderation};
	};
	%Position des nœuds, dessin des nœuds et des branches du deuxième niveau
	\foreach \nA/\nB/\B/\numero/\contenu/\ponderation/\position in {
		nA1/nB1/B1/1/$3^0$/$\np{1}$/\posA,
		nA1/nB2/B2/2/$3^1$/$\np{1}$/\posB,
		nA2/nB3/B3/3/$3^0$/$\np{1}$/\posA,
		nA2/nB4/B4/4/$3^1$/$\np{1}$/\posB,
		nA3/nB5/B5/5/$3^0$/$\np{1}$/\posA,
		nA3/nB6/B6/6/$3^1$/$\np{1}$/\posB
	}{
		\coordinate (\B) at ({\xB},{\noC*\yC-(\noCe+1)/2*\yC-\noC*\yC/2-(\numero-1)*\yC*\noCe});
		\draw node (\nB) at (\B) {\contenu};
		\draw (\nA)--(\nB) node[midway, sloped, \position] {\ponderation};
	};
	
	%Position des nœuds, dessin des nœuds et des branches du troisième niveau
	\foreach \nB/\nC/\C/\numero/\contenu/\ponderation/\position in {
		nB1/nC1/C1/1/$5^0$/$\np{1}$/\posA,
		nB1/nC2/C2/2/$5^0$/$\np{1}$/\posA,
		nB2/nC3/C3/3/$5^1$/$\np{1}$/\posA,
		nB2/nC4/C4/4/$5^1$/$\np{1}$/\posA,
		nB3/nC5/C5/5/$5^0$/$\np{1}$/\posA,
		nB3/nC6/C6/6/$5^0$/$\np{1}$/\posA,
		nB4/nC7/C7/7/$5^1$/$\np{1}$/\posA,
		nB4/nC8/C8/8/$5^1$/$\np{1}$/\posA,
		nB5/nC9/C9/9/$5^0$/$\np{1}$/\posA,
		nB5/nC10/C10/10/$5^0$/$\np{1}$/\posA,
		nB6/nC11/C11/11/$5^1$/$\np{1}$/\posA,
		nB6/nC12/C12/12/$5^1$/$\np{1}$/\posA
	}{
		\coordinate (\C) at ({\xC},{(\noC-\numero)*\yC-\noC*\yC/2});
		\draw node (\nC) at (\C) {\contenu};
		\draw (\nB)--(\nC) node[midway, sloped, \position] {\ponderation};
	};
	\end{tikzpicture}
\end{center}

\subsection{Arbre.}

\begin{center}
	\begin{tikzpicture}[xscale=1,yscale=1]
	\coordinate (A1) at (4,3);
	\coordinate (A2) at (4,1);
	\coordinate (A3) at (4,-1);
	\coordinate (A4) at (4,-3);
	\coordinate (B1) at (2,2);
	\coordinate (B2) at (2,-2);
	\coordinate (C1) at (0,0);
	\draw node (A11) at (A1) {$1$};	
	\draw node (A12) at (A2) {$2$};
	\draw node (A13) at (A3) {$3$};
	\draw node (A14) at (A4) {$4$};
	\draw node (B11) at (B1) {$1$};
	\draw node (B12) at (B2) {$2$};
	\draw (B11)--(A11)node[midway,sloped,above]{\color{blue}$0,5$};
	\draw (B11)--(A12)node[midway,sloped,below]{\color{blue}$0,5$};
	\draw (B12)--(A13)node[midway,sloped,above]{\color{blue}$0,25$};
	\draw (B12)--(A14)node[midway,sloped,below]{\color{blue}$0,25$};
	\draw (C1)--(B11)node[midway,sloped,above]{\color{blue}$\frac{3}{8}$};
	\draw (C1)--(B12)node[midway,sloped,below]{\color{blue}$\frac{5}{8}$};
	\end{tikzpicture}
\end{center}

\subsection{Arbre bis.}

\begin{center}
	
	\begin{tikzpicture}[scale=0.5]
	%Création des nœuds
	\foreach \A/\ord/\n in {A1/7/1, A2/5/7, A3/3/1, A4/1/7, A5/-1/1, A6/-3/7, A7/-5/1, A8/-7/7} \node (\A) at (8,\ord){\n};
	\foreach \B/\ord/\n in {B1/6/1, B2/2/3, B3/-2/1, B4/-6/3} \node (\B) at (4,\ord) {\n};
	\foreach \C/\ord/\n in {C1/4/1, C2/-4/2} \node (\C) at (0,\ord) {\n};
	\foreach \D/\ord/\n in {D1/7/1, D2/5/7, D3/3/3, D4/1/21, D5/-1/2, D6/-3/14, D7/-5/6, D8/-7/42} \node (\D) at (12,\ord){\n};
	%Branches entre les nœuds
	\foreach \B/\A in {B1/A1, B1/A2, B2/A3, B2/A4, B3/A5, B3/A6, B4/A7, B4/A8} \draw (\B) -- (\A);
	\foreach \C/\B in {C1/B1, C1/B2, C2/B3, C2/B4} \draw (\C) -- (\B);
	\foreach \C in {C1, C2} \draw (-4,0) -- (\C);
	\end{tikzpicture}
	
\end{center}

\subsection{Tab}

\begin{center}
	\begin{tikzpicture}
	\tkzTabInit[lgt=1.6 , espcl=1.6, deltacl=0.5]{$x$ /0.8, $f'$ /0.8, $f$ /1.6}
	{$-\infty$ ,$1$, $+\infty$}
	\tkzTabLine{,+,d,+,}%
	\tkzTabVar {+/ $\mathrm{e}$, -D+ / $0$ / $+\infty$, - / $\mathrm{e}$ / }
	\end{tikzpicture}
\end{center}

\subsection{Tab2.}

\begin{tikzpicture}
\tkzTabInit[lgt=1 , espcl=1.6]{$x$ /0.8, $C_M'$ /0.8, $C_M$ /2.4}
{$-\infty$ ,$-10$, $0$, $5$, $10$, $40$,  $+\infty$}
\tkzTabLine{,+,z,-,d,-,t,-,z,+,t,+,}%
\tkzTabVar {-/$-\infty$, +/$30$,-D+/$-\infty$ /$+\infty$,R/ /,-/$70$, R/ /, +/$+\infty$ }
\tkzTabVal[draw]{3}{5}{0.5}{}{$75$}
\tkzTabVal[draw]{5}{7}{0.5}{}{$\np{92,5}$}
\draw[fill=Red!80,opacity=0.2](M30) rectangle (M63);
\end{tikzpicture}

\subsection{Python}

\begin{center}
	\begin{minipage}{5cm}
		\lstset{emph={fonction}, emphstyle=\color{red},
			emph={[2]variable1,variable2}, emphstyle={[2]\color{orange}}}
		\begin{lstlisting}{style=pythonstyle}
		def fonction(variable1):
		variable2=3
		\end{lstlisting}
	\end{minipage}
\end{center}

\subsection{Bash}

%\begin{minipage}{5cm}
\begin{lstlisting}{style=bashstyle}
sudo apt update
sudo apt upgrade
\end{lstlisting}
\hfill {\tiny \href{http://unemainlavelautre.net/fichier.txt}{Pour copier-coller: clic droit, ouvrir dans une nouvelle fenêtre.}}
%\end{minipage}

\subsection{Pseudocode}

\begin{tabular}{|c|}
	\hline
	\begin{minipage}{8cm}
		\LinesNumbered
		\SetKw{entrer}{entrer}
		\SetKw{prend}{prend la valeur}
		\SetKw{afficher}{afficher}
		\begin{algorithm}[H]
			\SetAlgoLined
			\DontPrintSemicolon
			\entrer pi
			0\;
			\Tq{1}{
				2\;
				\eSi{3}{
					4\;
					5\;
				}{
					6\;
				}
			}
			
			\Pour{7}{
				\Si{8}{
					9\;
				}
			}
		\end{algorithm}
	\end{minipage}
	\\
	\hline
\end{tabular}

\subsection{Tabularx}

Pour center dans une seule cellule \hfill avant et après le texte suffisent

\noindent
\begin{tabularx}{\linewidth}{|m{2.5cm}|*{6}{>{\centering\arraybackslash}X|}}
	\hline
	Nombre affiché sur la face & 1 & 2 & 3 & 4 & 5 & 6
	\\
	\hline
\end{tabularx}

\subsection{Tableau sans une case et diagonale.}


\begin{tabular}{|*{7}{c|}}
	\cline{2-7} \multicolumn{1}{c|}{}& Moyenne & Minimum & Quartile 1 & Médiane &	Quartile 3 & Maximum
	\\
	\hline
	Série $T$ &	\backslashbox{$v_n$}{$u_n$}&	67&	70&	72&	74& 78
	\\
	\hline
	Série $P$ &&&&&& 
	\\
	\hline
\end{tabular}

\subsection{Tableau ligne colonne.}

\begin{tabular}{|*{11}{c|}}
	\hline
	\multirow{2}*{Fournisseur} & \multicolumn{8}{c|}{Critères} & \multirow{2}*{Note globale} & \multirow{2}*{Classement}
	\\
	\cline{2-9}
	& Sécurité &&&&&&&&&
	\\
	\hline
	&  &&&&&&&&&
	\\
	\hline
\end{tabular}\\

\subsection{Retrait dans la marge.}

\hspace*{-1cm}

\subsection{Note dans la marge}

\marginpar{\color{red}$\heartsuit$}

\subsection{Notation modulo.}

$3 \equiv 1 \mod{2}$

\subsection{Diapositive.}

%Pour afficher la page en paysage il faut modifier
%\usepackage[a5paper,landscape]{article} %ACTIVER POUR A5
%\geometry{hscale=0.9,vscale=0.9,centering} %ACTIVER POUR A5

\pagecolor{cyan!25}

\begin{center}
	
	\begin{tikzpicture}
	\coordinate (AA) at (-9,6.5);
	\node (AA) at (AA) {};
	\coordinate (BB) at (9,6.5);
	\node (BB) at (BB) {};
	\coordinate (CC) at (9,-6.5);
	\node (CC) at (CC) {};
	\coordinate (DD) at (-9,-6.5);
	\node (DD) at (DD) {};
	\draw (AA)--(BB)--(CC)--(DD)--(AA);
	\end{tikzpicture}
	
\end{center}

\subsection{Binomiale.}

\begin{enumerate}[*]
	\item Épreuve de Bernoulli.
	
	\begin{enumerate}[$\bullet$]
		\item Expérience: lancer un dé.
		\item Succès: \og Obtenir $6$ \fg{}.
		\item Probabilité de succès: $p=\frac{1}{6}$.
	\end{enumerate}
	
	\item Schéma de Bernoulli.
	
	L'épreuve de Bernoulli précédemment décrite est répétée à l'identique et de façon indépendante $n=3$ fois.
	
	\item Loi binomiale.
	
	$X$ compte le nombre de $6$ parmi les $3$ lancés, donc compte le nombre de succès donc: $X \hookrightarrow \mathscr{B}\left( 3, \frac{1}{6} \right)$.
	
\end{enumerate}