%\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/28 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/28 La Réunion.}

\subsection{Exercice 1. \hfill 5 points}

\subsubsection{Partie A.}

\begin{enumerate}
	\item 
	
	\begin{correction}
		
		~
		
		\begin{center}
			\begin{tikzpicture}
				
				\coordinate (A1) at (6,0);
				\coordinate (A2) at (6,-2);
				\coordinate (B1) at (4,3);
				\coordinate (B2) at (4,1);
				\coordinate (B3) at (4,-1);
				\coordinate (B4) at (4,-3);
				\coordinate (C1) at (2,2);
				\coordinate (C2) at (2,-2);
				\draw node (A11) at (A1) {$A$};
				\draw node (A12) at (A2) {$\overline{A}$};
				\draw node (B11) at (B1) {$A$};
				\draw node (B12) at (B2) {$\overline{A}$};
				\draw node (B13) at (B3) {$D_2$};
				\draw node (B14) at (B4) {$\overline{D_2}$};
				\draw node (C11) at (C1) {$D_1$};
				\draw node (C12) at (C2) {$\overline{D_1}$};
				\draw (0,0)--(C11) node [midway, sloped, above]{\color{blue}$0,4$};
				\draw (0,0)--(C12) node [midway, sloped, below]{\color{blue}$0,6$};
				\draw (C11)--(B11) node [midway, sloped, above]{\color{blue}$0,3$};
				\draw (C11)--(B12) node [midway, sloped, below]{\color{blue}$0,7$};
				\draw (C12)--(B13) node [midway, sloped, above]{\color{blue}$0,7$};
				\draw (C12)--(B14) node [midway, sloped, below]{\color{blue}$0,3$};
				\draw (B13)--(A11) node [midway, sloped, above]{\color{blue}$0,2$};
				\draw (B13)--(A12) node [midway, sloped, below]{\color{blue}$0,8$};
			\end{tikzpicture}
		\end{center}
		
	\end{correction}
	
	\item 
	
	\begin{correction}
		
		\objectif{Calculons $\mathbb{P}(A)$.}
		
		$\{ D_1, \overline{D_1} \cap D_2, \overline{D_1} \cap \overline{D_2} \}$ est  un système complet d'événements donc d'après la formule des probabilités totales:
		
		\begin{align*}
			\mathbb{P}(A) &= \mathbb{P}(A \cap D_1) + \mathbb{P}\left[ A \cap \left( \overline{D_1} \cap D_2 \right) \right] + \mathbb{P}\left[ A \cap \left( \overline{D_1} \cap \overline{D_2} \right) \right]\\
			\intertext{Comme $\mathbb{P}(D_1)$, $\mathbb{P}(\overline{D_1}$ et $\mathbb{P}(\overline{D_1} \cap D_2)$ sont non nulles, d'après la formule des probabilités composées:}
			\mathbb{P}(A) &= \mathbb{P}(D_1) \times \mathbb{P}_{D_1} (A) + \mathbb{P}(\overline{D_1}) \times \mathbb{P}_{\overline{D_1}}(D_2) \times \mathbb{P}_{\overline{D_1} \cap D_2} (A) + 0\\
			&= 0,4 \times 0,3 + 0,6 \times 0,7 \times 0,2
		\end{align*}		
		
		\begin{conclusion}
			
			$\mathbb{P}(A)=0,204$.
			
		\end{conclusion}
		
	\end{correction}
	
	\item 
	
	\begin{correction}
		
		\objectif{Calculons $\mathbb{P}_A(D_1)$.}
		
		Par définition de la probabilité conditionnelle et puisque $\mathscr{P}(A)\ne 0$:
		
		\begin{align*}
			\mathbb{P}_A(D_1) &= \frac{\mathbb{P}(D_1 \cap A)}{\mathbb{P}(A)}\\
			&= \frac{0,4 \times 0,3}{0,204}
			&\approx 0,588235\ \text{en tronquant.}
		\end{align*}
		
		\begin{conclusion}
			
			En arrondissant à $10^{-4}$: $\mathbb{P}_A(D_1)\approx 0,5882$.
			
		\end{conclusion}
		
	\end{correction}
	
\end{enumerate}

\subsubsection{Partie B.}

\begin{enumerate}
	\item 
	
	\begin{enumerate}
		\item 
		
		\begin{correction}
			
			\begin{conclusion}
				
				$X \hookrightarrow \mathscr{B}(30;0,204)$.
				
			\end{conclusion}
			
		\end{correction}
		
		\item 
		
		\begin{correction}
			
			\objectif{Calculons $\mathbb{P}(X=6)$.}
			
			Puisque $X \hookrightarrow \mathscr{B}(30;0,204)$:
			
			\begin{align*}
				\mathbb{P}(X=6) &= \binom{30}{6} \times 0,204^6 \times (1-0,204)^{30-6}\\
				&\approx 0,1791\ \text{en tronquant.}
			\end{align*}
			
			\begin{conclusion}
				
				En arrondissant à $10^{-3}$: $\mathbb{P}(X=6) \approx 0,179$.
				
			\end{conclusion}
			
		\end{correction}
		
		\item 
		
		\begin{correction}
			
			\objectif{Calculons $\mathbb{E}(X)$.}
			
			Puisque $X \hookleftarrow \mathscr{B}(30;0,204)$:
			
			\begin{align*}
				\mathbb{E}(X) &= 30 \times 0,204
			\end{align*}
			
			\begin{conclusion}
				
				$\mathbb{E}(X)=6,12$.
				
			\end{conclusion}
			
			\medskip
			Ce que nous pouvons interpréter par:
			
			\begin{conclusion}
				
				si on recommence un grand nombre de fois le choix d'un échantillon de $30$ personnes, en moyenne il y aura $6,12$ acheteurs parmi les $30$.
				
			\end{conclusion}
			
		\end{correction}
		
	\end{enumerate}
	
	\item 
	
	\begin{correction}
		
		Soit $X_n$ la variable aléatoire qui à un échantillon de $n$ personnes associe le nombre de personnes qui achètent le produit.
		
		\medskip
		\objectif{Déterminons $n$ pour que $\mathbb{P}(Y_n\geqslant 0,99)$.}
				
		\begin{align*}
			\mathbb{P}(Y_n \geqslant 1) \geqslant 0,99 &\Leftrightarrow 1-\mathbb{P}\left(\overline{\{Y_n \geqslant 1\}}\right) \geqslant 0,99\\ &\Leftrightarrow 1- \mathbb{P}(Y_n<1) \geqslant 0,99\\
			&\Leftrightarrow 1-\mathbb{P}(X=0) \geqslant 0,99\\
			&\Leftrightarrow 1-\mathbb{P}(X=0) {\color{orange}-1} \geqslant 0,99 {\color{orange}-1}\\
			&\Leftrightarrow -\mathbb{P}(X=0) \geqslant -0,01\\
			&\Leftrightarrow {\color{orange}-1} \times (\mathbb{P}(X=0)) \leqslant {\color{orange}-1 \times }(-0,01)\ \text{car } -1<0\\
			&\Leftrightarrow \mathbb{P}(X=0) \leqslant 0,01\
			\intertext{Or, comme précédemment, $Y_n \hookrightarrow \mathscr{B}(n;0,204)$, donc }
			\mathbb{P}(Y_n \geqslant 1) \geqslant 0,99 &\Leftrightarrow \binom{n}{0} \times 0,204^0 \times (1-0,204)^{n-0} \leqslant 0,01\\
			&\Leftrightarrow 1 \times 1 \times 0,796^n \leqslant 0,01\\
			\intertext{$\ln$ est croissante et réalise une bijection de $\mathbb{R}_+^*$ sur $\mathbb{R}$ donc}
			\mathbb{P}(Y_n \geqslant 1) \geqslant 0,99 &\Leftrightarrow \ln\left( 0,796^n \right) \leqslant \ln(0,01) \\
			&\Leftrightarrow n \ln(0,796) \leqslant \ln(0,01)\\
			\intertext{$0,796<1$ donc $\ln(0,796)<0$ et par conséquent}
			\mathbb{P}(Y_n \geqslant 1) \geqslant 0,99 &\Leftrightarrow \frac{n \ln(0796)}{\color{orange}\ln(0,796)} \geqslant \frac{\ln(0,01)}{\color{orange}\ln(0,796)}\\
			&\Leftrightarrow n \geqslant \frac{\ln(0,01)}{\ln(0,796)}
		\end{align*}
		
		Or $\frac{\ln(0,01)}{\ln(0,796)} \approx 20,18$, en tronquant, donc, $n$ étant entier:
		
		\begin{align*}
			\mathbb{P}(Y_n \geqslant 1) \geqslant 0,99 &\Leftrightarrow n \geqslant 21
		\end{align*}
		
		\begin{conclusion}
			
			La plus petite valeur pour $n$ est donc $21$.
			
		\end{conclusion}
		
	\end{correction}
	
\end{enumerate}

\subsection{Exercice 2. \hfill 5 points}

\begin{enumerate}
	\item 
	
	\begin{correction}
		
		\objectif{Recherchons la limite de $f$ en $0$ par valeur supérieures.}
		
		Par croissance comparée: $\lim_{\begin{subarray}{c}x \to 0 \\ x>0 \end{subarray}} x \ln(x)=0$.
		
		Donc en sommant:
		
		\begin{conclusion}
			
			$\lim_{\begin{subarray}{c}x \to 0 \\ x>0 \end{subarray}} f(x)= 1$.
			
		\end{conclusion}
		
		\medskip
		\objectif{Recherchons la limite de $f$ en $+\infty$}.
		
		Remarquons la factorisation: $f(x)= x \left( 3+ \frac{1}{x}-\ln(x) \right)$.
		
		\begin{enumerate}[*]
			\item Clairement, par somme, $\lim_{x \to +\infty} 3+\frac{1}{x}=3$.
			
			\item Toujours par sommation, on en déduit: $\lim_{x \to +\infty} 3+\frac{1}{x} -\ln(x)=-\infty$.
			
			\item Puis, par produit: $\lim_{x \to + \infty} x \left( 3+\frac{1}{x} -\ln(x) \right) =-\infty$.
			
		\end{enumerate}
		
		\begin{conclusion}
			
			$\displaystyle \lim_{x \to + \infty} f(x)=-\infty$.
			
		\end{conclusion}
		
	\end{correction}
	
	\item 
	
	\begin{enumerate}
		\item 
		
		\begin{correction}
			
			\objectif{Calculons $f'$.}
			
			\begin{enumerate}[*]
				\item $f$ est une somme de produits de fonctions toutes dérivables sur $\mathbb{R}_+^*$ donc $f$ est dérivables sur $\mathbb{R}_+^*$.
				
				\item Notons $g(x)=x\ln(x)$. $g=uv$ où $u(x)=x$ et $v(x)= \ln(x)$, donc $g'=u'v+uv'$.
				
				Or $u'(x)=1$ et $v'(x)=\frac{1}{x}$ donc
				
				\begin{align*}
					g'(x) &= 1 \times \ln(x) + x \times \frac{1}{x}\\
					&= \ln(x) +1
				\end{align*}
				
				\item Nous en déduisons que, pour tout $x \in\mathbb{R}_=^*$:
				
				\begin{align*}
					f'(x) &= 3+0-2\left( \ln(x) +1 \right)\\
					&= 3-2\ln(x) -2
				\end{align*}
				
			\end{enumerate}
			
			Finalement
			
			\begin{conclusion}
				
				pour tout $x \in \mathbb{R}_+^*$, $f'(x)=1-2 \ln(x)$.
				
			\end{conclusion}
			
		\end{correction}
		
		
		\item 
		
		\begin{correction}
			
			\objectif{Étudions le signe de $f'$.}
			
			Soit $x \in \mathbb{R}_+^*$.
			
			\begin{align*}
				f'(x)>0 &\Leftrightarrow 1-2\ln(x)>0\\
				&\Leftrightarrow 1-2\ln(x) {\color{orange}+2\ln(x)} > 0 {\color{orange}+2 \ln(x)}\\
				&\Leftrightarrow 1> 2\ln(x)\\
				&\Leftrightarrow \frac{1}{\color{orange}2} > \frac{2\ln(x)}{\color{orange}2},\ \text{car } 2>0
				\intertext{La fonction exponetielle étant strictement croissante et réalisant une bijection de $\mathbb{R}_+^*$ sur $\mathbb{R}$:}
				f'(x)>0 &\Leftrightarrow \mathrm{e}^{\frac{1}{2}} > \exp\left(\ln(x) \right)\\
				&\Leftrightarrow \mathrm{e}^{\frac{1}{2}} > x
			\end{align*}
			
			De même: $f'x)=0 \Leftrightarrow x=\mathrm{e}$.
			
			Nous en déduisons
			
			\begin{conclusion}
				
				\begin{tikzpicture}
				\tkzTabInit[lgt=1.6 , espcl=1.6, deltacl=0.5]{$x$ /0.8, $f'$ /0.8}
				{$0$ ,$\mathrm{e}^{\frac{1}{2}}$, $+\infty$}
				\tkzTabLine{d,+,z,-,}%
				\end{tikzpicture}
				
			\end{conclusion}
			
			\medskip
			\objectif{Donnons le tableau de variation de $f$.}
			
			En utilisant les résultats précédemment établis et le fait que
			
			\begin{align*}
				f\left(\mathrm{e}^{\frac{1}{2}} \right) &= 3 \mathrm{e}^{\frac{1}{2}} +1 -2\mathrm{e}^{\frac{1}{2}} \ln\left( \mathrm{e}^{\frac{1}{2}} \right)\\
				&= 3 \mathrm{e} +1 -2\mathrm{e}^{\frac{1}{2}} \times \frac{1}{2}\\
				&= 1+ 2\mathrm{e}^{\frac{1}{2}}
			\end{align*}
			
			\begin{conclusion}
				
				\begin{tikzpicture}
				\tkzTabInit[lgt=1.6 , espcl=1.6, deltacl=0.5]{$x$ /0.8, $f$ /1.6}
				{$0$ ,$\mathrm{e}^{\frac{1}{2}}$, $+\infty$}
				\tkzTabVar {D-/ $1$, + / $1+2\mathrm{e}^{\frac{1}{2}}$ , - / $-\infty$ / }
				\end{tikzpicture}
				
			\end{conclusion}
			
		\end{correction}
		
	\end{enumerate}
	
	\item 
	
	\begin{enumerate}
		
		\item 
		
		\begin{correction}
			
			\objectif{Démontrons que $f(x)=0$ admet une unique solution.}
			
			\begin{enumerate}[*]
				\item D'après le tableau de variation, $f$ admet sur $\left]0; \mathrm{e}^{\frac{1}{2}} \right]$ un minorant égale à $1$.
				
				Donc, si l'équation $f(x)=0$ admet des solutions ce ne peut être que dans $\left[ \mathrm{e}^{\frac{1}{2}}, +\infty\right[$.
				
				\item $f$ est continue et strictement décroissante sur $\left[ \mathrm{e}^{\frac{1}{2}}, +\infty\right[$, donc $f$ réalise une bijection de $\left[ \mathrm{e}^{\frac{1}{2}}, +\infty\right[$ sur 
				
				\begin{align*}
					f\left( \left[ \mathrm{e}^{\frac{1}{2}}, +\infty\right[ \right) &= \left]  \lim_{x \to +\infty} f(x),  f\left( \mathrm{e}^{\frac{1}{2}} \right) \right] \\
					&= \left]-\infty , 1+2 \mathrm{e}^{\frac{1}{2}} \right]
				\end{align*}
				
				Comme $0 \in \left]-\infty , 1+2 \mathrm{e}^{\frac{1}{2}} \right]$, nous en déduisons que l'équation $f(x)=0$ admet une unique solution dans $\left[ \mathrm{e}^{\frac{1}{2}}, + \infty \right[$.
				
			\end{enumerate}
			
			\begin{conclusion}
				
				$f(x)=0$ admet une unique solution dans $\mathbb{R}_+^*$.
				
			\end{conclusion}
			
		\end{correction}
		
		\item 
		
		\begin{correction}
			
			En tenant compte des remarques faites à la question précédente:
			
			\begin{conclusion}
				
				\begin{tikzpicture}
				\tkzTabInit[lgt=1.6 , espcl=1.6, deltacl=0.5]{$x$ /0.8, $f$ /0.8}
				{$0$ ,$\alpha$, $+\infty$}
				\tkzTabLine{d,+,z,-,}%
				\end{tikzpicture}
				
			\end{conclusion}
			
		\end{correction}
				
	\end{enumerate}
	
	\item 
	
	\begin{correction}
		
		Puisque $F$ est une primitive de $f$, $f$ est la fonction dérivée de $F$. Compte du tableau de signe obtenu à la question précédente nous pouvons affirmer
		
		\begin{conclusion}
			
			$F$ est strictement décroissante sur $\left[ \mathrm{e} ^{\frac{1}{2}}; + \infty \right[$.
			
		\end{conclusion}
		
	\end{correction}
	
	\item 
	
	\begin{enumerate}
		\item 
		
		\begin{correction}
			
			\objectif{Étudions la convexité de $f$.}
			
			$f'$ est dérivable sur $\mathbb{R}_=^*$ et, pour tout $x \in \mathbb{R}_+^*$:
			
			\begin{align*}
				f''(x) &= 0-2 \frac{1}{x}\\
				&= -\frac{2}{x}
			\end{align*}
			
			Puisque $f''<0$
			
			\begin{conclusion}
				
				$f$ est concave sur $\mathbb{R}_+^*$.
				
			\end{conclusion}
			
			\medskip
			Dire que $f$ est concave équivaut à dire que
			
			\begin{conclusion}
				
				$\mathscr{C}_f$ est au-dessous de toutes ses tangentes.
				
			\end{conclusion}
			
		\end{correction}
		
		\item 
		
		\begin{correction}
			
			\objectif{Déterminons une équation $T$.}
			
			La tangente cherchée à pour équation \[ T:\ y=f'(1) \times (x-1) + f(1). \]
			
			Or $f'(1)=1$ et $f(1)=4$ donc 
			
			\begin{conclusion} 
				
				$T:\ y=x +4$.
				
			\end{conclusion}
			
		\end{correction}
		
		\item 
		
		\begin{correction}
			
			Puisque $\mathscr{C}_f$ est au-dessous de toutes ses tangentes en particulier $\mathscr{C}_f$ est au-dessous de $T$. Autrement dit, pour tout $x \in \mathbb{R}_+^*$:
			\begin{align*}
				f(x) &\leqslant x+4\\
				\intertext{ce qui équivaut successivement à:}
				3x+1 -2 x\ln(x) &\leqslant x+4\\
				-2 x\ln(x) &\leqslant -2x+3\\
				\ln(x) &\geqslant \frac{-2x+4}{-2x} \ \text{car }-2x<0\\
				\ln(x) &\geqslant 1-\frac{3}{2} \frac{1}{x}
			\end{align*}
			Nous en déduisons
			
			\begin{conclusion}
				
				$\ln(x) \geqslant 1-\frac{1}{x}$ pour tout $x \in \mathbb{R}_+^*$.
				
			\end{conclusion}
			
		\end{correction}
		
	\end{enumerate}
	
\end{enumerate}

\subsection{Exercice 3. \hfill 5 points}

\subsubsection{Partie A.}

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

\subsubsection{Partie B.}

\begin{enumerate}
	\item 
	
	\begin{correction}
		
		Soit, pour tout $n \in \mathbb{N}$, $\mathscr{P}(n)$: \og $n \leqslant u_n \leqslant n+3$ \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=3$ donc $0\leqslant u_0 \leqslant 0+3$.
			
			Ainsi $\mathscr{P}(0)$ est vraie.
			
			\item Soit $n \in \mathbb{N}$. Supposons $\mathscr{P}(n)$ vraie et démontrons qu'alors $\mathscr{P}(n+1)$ est vraie.
			
			Par hypothèse de récurrence:
			
			\begin{align*}
				n &\leqslant u_n \leqslant n+3\\
				\intertext{Puisque $\frac{1}{2}>0$:}
				\frac{1}{2}n &\leqslant \frac{1}{2} u_n  \leqslant \frac{1}{2}(n+3)\\
				\intertext{d'où}
				\frac{1}{2}n+\frac{1}{2}n+ &\leqslant \frac{1}{2} u_n + \frac{1}{2}n +1 \leqslant \frac{1}{2} (n+3) + \frac{1}{2} n + 1\\
				n &\leqslant u_{n+1} \leqslant n+ \frac{3}{2}+1\\
				n &\leqslant u_{n+1} \leqslant n+ 2+1\\
			\end{align*}
			
			Ainsi $\mathscr{P}(n+1)$ est vraie.
			
			\item Nous avons démontré par récurrence que 
			
		\end{enumerate}
		
		\begin{conclusion}
			
			$\forall n\in \mathbb{N},\ n\leqslant u_n \leqslant n+3$.
			
		\end{conclusion}
		
	\end{correction}
	
	\item 
	
	\begin{correction}
		
		\objectif{Étudions la limite de $(u_n)$.}
		
		Puisque $n \leqslant u_n$ pour tout $n$ entier naturel et $\lim_{n \to +\infty} n= +\infty$ donc par comparaison
		
		\begin{conclusion}
			
			$\lim_{n \to + \infty} u_n =+\infty$.
			
		\end{conclusion}
		
	\end{correction}
	
	\item 
	
	\begin{correction}
		
		\objectif{Étudions la limite de $\left( \frac{u_n}{n} \right)$.}
		
		D'après la question B.1, pour tout $n \in \mathbb{N}^*$:
		
		\begin{align*}
			1 &\leqslant \frac{u_n}{n} \leqslant 1+ \frac{3}{n}
		\end{align*}
		
		Puisque $\lim_{n \to +\infty} 1= \lim_{n\to + \infty} 1+ \frac{3}{n}=1$, d'après le théorème des gendarmes:
		
		\begin{conclusion}
			
			$\displaystyle \lim_{n \to + \infty} \frac{u_n}{n}=1$.
			
		\end{conclusion}
			
	\end{correction}
	
\end{enumerate}

\subsection{Exercice 4. \hfill 5 points}

\begin{enumerate}
	\item 
	
	\begin{correction}
		
		\begin{conclusion}
			
			$F(1;1;1)$ et $C(0;1;0)$.
			
		\end{conclusion}
		
	\end{correction}
	
	\item 
	
	\begin{correction}
		
		\objectif{Calculons les coordonnées de $M$.}
		
		Puisque $M$ est le centre de $BCGF$, $M$ est le milieu de $[FC]$.
		
		Par conséquent:
		
		\begin{align*}
			x_M &= \frac{x_F+x_C}{2}\\
			&= \frac{1+0}{2}\\
			&= \frac{1}{2}
		\end{align*}
		
		De même: $y_M= 1$ et $z_M=\frac{1}{2}$.
		
		\begin{conclusion}
			
			$M\left( \frac{1}{2} ; 1 \frac{1}{2} \right)$.
			
		\end{conclusion}
		
		\medskip
		En raisonnant de même:
		
		\begin{conclusion}
			
			$N\left( 1; \frac{1}{2}; \frac{1}{2}\right)$
		\end{conclusion}
		
	\end{correction}
	
	\item 
	
	\begin{enumerate}
		\item 
		
		\begin{correction}
			
			$H$, $F$ et $C$ sont distincts deux à deux et non alignés donc $\left( \overrightarrow{HF}, \overrightarrow{FC} \right)$ est une base de la direction de $(HFC)$.
			
			Ainsi, pour montrer que $\overrightarrow{AG}$ est normal à $(HFC)$ il faut et il suffit de montrer que $\overrightarrow{AG}$ est orthogonal à $\overrightarrow{HF}$ et $\overrightarrow{HC}$.
			
			\medskip
			\objectif{Démontrons que $\overrightarrow{AG} \cdot \overrightarrow{HF} = \overrightarrow{AG} \cdot \overrightarrow{HC}=0$.}
			
			\begin{enumerate}[*]
				\item Clairement $H(1;0;0)$.
				
				\item $\overrightarrow{HF} \begin{pmatrix} x_F-x_H \\ y_F-y_H \\ z_F-z_H \end{pmatrix}$, autrement dit $\overrightarrow{HF} \begin{pmatrix}	1 -1 \\ 1-0  \\ 1 -0 \end{pmatrix}$, ou encore $\overrightarrow{HF} \begin{pmatrix} 0 \\ 1 \\ 1 \end{pmatrix}$.
				
				\item De même $\overrightarrow{AG} \begin{pmatrix} 1 \\ 1 \\ -1 \end{pmatrix}$ et $\overrightarrow{HC} \begin{pmatrix} -1 \\ 1 \\ 0 \end{pmatrix}$.
				
				\item 				
				\begin{align*}
					\overrightarrow{AG} \cdot \overrightarrow{HF} &= x_{\overrightarrow{AG}} \times x _{\overrightarrow{HF}} + y_{\overrightarrow{AG}} \times y_{\overrightarrow{HF}}+ z_{\overrightarrow{AG}} \times z_{\overrightarrow{HF}}\\
					&= 1 \times(-1) + 1 \times 1 + -1 \times 0\\
					&= 0
				\end{align*}
				
				De même: $\overrightarrow{AG} \cdot \overrightarrow{HC}=0$.
				
			\end{enumerate}
			
			\begin{conclusion}
				
				$\overrightarrow{AG}$ est normal à $(HFC)$.
				
			\end{conclusion}
			
		\end{correction}
		
		\item 
		
		\begin{correction}
			
			\objectif{Déterminons une équation cartésienne de $(HFC)$.}
			
			Soit $M(x,y,z)$ un point du plan.
			
			$M \in (HFC)$ si et seulement si $\overrightarrow{HM}$ est orthogonal à $\overrightarrow{AG}$.
			
			Or 
			
			\begin{align*}
				\overrightarrow{HM} \cdot \overrightarrow{AG} &= 0 \\
				\intertext{équivaut successivement à:}
				(x-1)\times 1+(y-0) \times 1+(z-0) \times (-1) &= 0\\
				x+y-z-1 &=0
			\end{align*}
			
			donc
			
			\begin{conclusion}
				
				$(HFC):\ x+y-z-1=0$.
				
			\end{conclusion}
			
		\end{correction}
		
	\end{enumerate}
	
	\item 
	
	\begin{correction}
		
		\objectif{Déterminons une représentation paramétrique de $(AG)$.}
		
		$M \in (AG)$ si et seulement si il existe $t \in \mathbb{R}$ tel que $\overrightarrow{AM} = t \overrightarrow{AG}$.
		
		Or $\overrightarrow{AM} = t \overrightarrow{AG}$ équivaut à \[ \begin{pmatrix} x-x_A \\ y-y_A \\ z-z_A \end{pmatrix}= \begin{pmatrix} t \times 1 \\ t \times 1 \\ t \times (-1) \end{pmatrix} \]
		
		Autrement dit \[ \left\{ \begin{array}{l} x-0 =t \\ y-0 =t \\ z-1 =-t \end{array} \right. \]
		
		Finalement
		
		\begin{conclusion}
			
			$(AG):\ \left\{ \begin{array}{l} x=t \\ y=t \\ z=-t+1 \end{array} \right.,\ t\in\mathbb{R}$.
			
		\end{conclusion}
		
	\end{correction}
	
	\item 
	
	\begin{correction}
		
		\objectif{Démontrons que $R$ est le projeté orthogonal de $G$ sur $(HFC)$.}
		
		$R$ est le projeté orthogonal de $G$ sur $(HFC)$ si et seulement si $\overrightarrow{RG}$ est orthogonal aux deux vecteurs de la base $\left( \overrightarrow{HF}, \overrightarrow{FC} \right)$ de la direction de $(HFC)$.
		
		On vérifie aisément: $\overrightarrow{RG}\begin{pmatrix} 1/3 \\ 1/3 \\ -1/3 \end{pmatrix}$ puis: $\overrightarrow{RG} \cdot \overrightarrow{HF} = \overrightarrow{RG} \cdot \overrightarrow{FC} =0$.
		
		Enfin
		
		\begin{conclusion}
			
			$R$ est le projeté orthogonal de $G$ sur $(HFC)$.
			
		\end{conclusion}
		
	\end{correction}
	
	\item 
	
	\begin{correction}
		
		\objectif{Démontrons  l'existence et l'unicité du point $K$.}
		
		Nous allons raisonner par analyse-synthèse.
		
		\begin{enumerate}[*]
			\item {\color{orange}Analyse.} Supposons qu'il existe un point $K$ de $(FG)$ tel que $KMN$ soit rectangle en $K$.
			
			\medskip
			Puisque $K \in (FG)$ il existe $t_K\in\mathbb{R}$ tel que $K(1;1; t_K)$.
			
			Donc $\overrightarrow{MK} \begin{pmatrix} 1/2 \\ 0 \\ t_K-1/2 \end{pmatrix}$ et $\overrightarrow{NK} \begin{pmatrix} 0 \\ 1/2 \\ t_K-1/2 \end{pmatrix}$.
			
			\medskip
			Puisque $KMN$ est rectangle en $K$ et puisque le repère est orthonormé, nécessairement: $\overrightarrow{MK} \cdot \overrightarrow{NK}=0$.
			
			Cette dernière égalité équivaut successivement à
			
			\begin{align*}
				\frac{1}{2} \times 0 + 0 \times \frac{1}{2} +\left( t_K -\frac{1}{2} \right)^2 &=0 \\
				t_K-\frac{1}{2} &= 0\\
				t_K &= \frac{1}{2} 
			\end{align*}
			
			{\color{orange}À ce stade du raisonnement nous avons démontré que si un point $K$ existe ce ne peut être que $K\left( 1;1; \frac{1}{2} \right)$. Il nous reste à vérifier que ce point $K$ convient effectivement.}
			
			\item {\color{orange}Synthèse.}
			
			Soit $K\left( 1;1. \frac{1}{2} \right)$.
			
			On vérifie immédiatement que $K \in (GF)$ et $\overrightarrow{MK} \cdot \overrightarrow{NK}=0$ autrement dit $KMN$ est rectangle en $K$.
			
		\end{enumerate}
		
		\begin{conclusion}
			
			Il existe une unique point $K \in (FG)$ tel que $KMN$ soit rectangle en $K$.
			
		\end{conclusion}
		
	\end{correction}
	
	\item 
	
	\begin{correction}
		
		$\overrightarrow{KF} \cdot \overrightarrow{MK}= \overrightarrow{KF}\cdot \overrightarrow{NK}=0$ et $KMN$ est rectangle en $K$, donc $[FK]$ est une hauteur du tétraèdre $FNKM$.
		
		Puisque le repère est orthonormé, 
		\begin{align*}
			FK &= \| \overrightarrow{FK} \| \\
			&= \sqrt{ (x_K-x_F)^2+(y_K-y_F)^2+(z_K-z_F)^2}\\
			&= \sqrt{(1-1)^2+(1-1)^2+\left( \frac{1}{2}-1 \right)^2}\\
			&= \frac{1}{2}
		\end{align*}
		
		De même: $MK=NK= \frac{1}{2}$.
		
		L'aire de $KMN$ est donc: \[ \mathscr{A} (KMN)= \frac{1}{2} \times \frac{1}{2} \times \frac{1}{2}= \frac{1}{8}, \] et donc le volume de $FNKM$ est: \[ \mathscr{V}(FNKM)= \frac{1}{3} \times \frac{1}{2} \times \frac{1}{8}=\frac{1}{48}.\]
		
		Enfin, le cube ayant un volume de $1$,
		
		\begin{conclusion}
			
			le volume du tétraèdre représente une fraction de $\frac{1}{48}$.
			
		\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}