 % Usage : 
\begin{DeuxCol}{.2}{.8}
{ blabla }
& 
blo 
\end{DeuxCol}
\begin{DeuxColSep}{.2}{.8}
 blabla 
& 
blo 
\end{DeuxColSep}
 % Usage : \begin{HauTab}{1.4} \end{HauTab}

	$$\Delta^n = \underbrace{\Delta\circ \Delta \circ \dots \circ \Delta}_{n \text{ fois}}$$

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% récurrence %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Montrons par récurrence que la propriété:
\[ \cH_n: \quad  \]
\noindent est vraie pour tout $n \geq 0$.
\begin{itemiz}
\item $\recz$: est vraie par hypothèse.
\item $\rec{n}{n+1}$: Supposons $\cH_n$ vraie.
\begin{align*}
\end{align*}
Donc $\cH_{n+1}$ est vraie.
\item \underline{Conclusion} : $\boxed{\forall n \geq 0    \quad   }$
\end{itemiz}

%%%%%%%%%%%%%%%%%%%%%% Produit scalaire %%%%%%%%%%%%%%%%%%%%%%%
\item Montrons que $\ps . .$ est un produit scalaire.
\begin{itemize}
\item \underline{Symétrique} : Pour tout $(P,Q)\in E^2$,
\[\ps P Q =  \int_{-1}^1 P(t)Q(t) \dt
=  \int_{-1}^1 Q(t)P(t) \dt
= \ps Q P\]
Donc $\ps . . $ est symétrique.
\item \underline{Bilinéaire} : 
Soit $Q\in E$ fixé. Pour tout $(P_1,P_2)\in E^2$ et tout $\lambda\in \R$,
par linéarité de l'intégrale,
\[\ps {\lambda P_1+P_2}Q 
=  \int_{-1}^1 \Big(\lambda P_1(t)+ P_2(t)\Big)Q(t) \dt
= \lambda \ps{P_1} Q + \ps{P_2}Q
\]
Donc $\ps . Q$ est linéaire. Par symétrie, $\ps . . $ est bilinéaire.
\item \underline{Positive} : Pour tout $P\in E$, 
par positivité de l'intégrale,
\[\ps P P 
=  \int_{-1}^1 \underbrace{(P(t))^2}_{\geq 0} \dt \geq 0\]
Donc $\ps . . $ est positive.
\item \underline{Définie positive} : Soit $P\in E$ tel que
\[\ps P P 
=  \int_{-1}^1 (P(t))^2 \dt =0\]
Ainsi, $t\mapsto  (P(t))^2$ est une fonction continue, positive et
d'intégrale nulle sur l'intervalle $[-1,1]$, donc, d'après le théorème du
cours, elle est nulle sur cet intervalle :
\[\forall t\in [-1,1],  \qquad (P(t))^2 = 0\]
Donc $P$ a un infinité de racines : tous les $t\in [-1,1]$.

Donc $P=0$.

Ainsi, $\ps . . $ est définie positive.
\end{itemize}
Conclusion : 
\begin{cfb}{
$\ps . . $ est une forme bilinéaire, symétrique, définie positive donc
c'est un produit scalaire
}\end{cfb}


%%%%%%%%%%%%%%%%%%%%%% Matrice d'une application linéaire %%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% blkarray %%%%%%%%%%%%%%%%%%%%%%%%%%%%%

{M = \begin{blockarray}{ccc}
 \phi(1) & \phi(X) & \\
\begin{block}{(cc)c}
 0 & 0 & 1\\
 0 & 2 & X \\
\end{block}
\end{blockarray}}

\[
{A = \begin{blockarray}{cccccc}
 f(e_1) & f(e_2) & f(e_3) & \dots & f(e_n) & \\
\begin{block}{(ccccc)c}
1     & 1    & 1    &\cdots& 1    & e_1\\
1     & 1    & 0    &\cdots& 0    & e_2\\
1     & 0    & 1    &\ddots&\vdots& \vdots \\
\vdots&\vdots&\ddots&\ddots& 0    & \vdots \\
1     & 0    &\cdots& 0    & 1    & e_n\\
\end{block}
\end{blockarray}}
\]

\[{ \begin{blockarray}{cccccccc}
&&&& \makebox[0pt]{$n-k+1$}&&&\\
&&&& \downarrow &&&\\
\begin{block}{c(cccccc)c}
      &  &        &      & 1 &&(0)&\\
 &       &  &      &   & \ddots&\\
      &  &        &  (0) &   & & 1 &\leftarrow k\\
k+1\to&	1 &        &      &&   &\\
  &       & \ddots &      & &        &\\
  &(0)   &        & 1 &   &   &\\
\end{block}
&&&\uparrow &&&\\
&&&\makebox[0pt]{$n-k$} &&&\\
\end{blockarray}}
\]

%%%%%%%%%%%%%%%%%%%%%% recherche de ker f %%%%%%%%%%%%%%%%%%%%%%%


\rmqbla{Résolution de système $3\times 3$ : à savoir faire,
        impérativement.}

\begin{DeuxColSep}{.5}{.3}
  {\begin{align*}
      X=\vcol{x\\y\\z} \in \ker f &\iff AX=0\\
      &\iff 
      \left\{\begin{aligned}
          x +y -z &=0\\
          x +y +z &=0\\
          x +y +z &=0
        \end{aligned}\right.
      &\begin{aligned}
        L_1 &\longleftarrow 1/2 L_1\\
        &\\
        &
      \end{aligned}\\
      %%% etc
    \end{align*}}
  & 
  {\begin{align*}
      &\iff 
      \left\{\begin{aligned}
          % réduit
        \end{aligned}\right.\\
      &\iff 
      \left\{\begin{aligned}
          x&=
          y&=
        \end{aligned}\right.\\
      &\iff X = \vcol{x\\y\\z} = \vcol{}
      &\iff X \in \Vect\vcol{}
    \end{align*}}
\end{DeuxColSep}
Conclusion :
\[\boxed{\ker f = \Vect\vcol{2\\-1\\1}}\]


%%%%%%%%%%%%%%%%%%%%%% Continuité/Dérivation sous $\int$ %%%%%%%%%%%%%%%%%%%%%%%

Soit $A>0$. Montrons que $f$ est continue sur $[-A,A]$.
Soit $I=$, $D=$ et $h(x,t) = e^{-2t}\sqrt{1+x^2e^{2t}}$ définie sur $D\times I$.
\begin{itemiz}
\item $\forall t \in I$, la fonction $x \mapsto
h(x,t)  $ est continue sur $D$.
\item $\forall x \in D$, la fonction $t \mapsto
h(x,t)
$ est continue par morceaux sur $I$.
\item La fonction $\phi : I \to \R_+$ définie ci-dessus par 
$\phi(t) =\frac1{e^{2at}-1} $ est {\bf intégrable sur $I$} 
% \item Soit $\phi : I \to \R_+$ définie par $\phi(t) =
% e^{-2t}\sqrt{1+A^2e^{2t}}=h(A,t)
%   $. La fonction $\phi$ est {\bf intégrable sur $I$} (1))
et 
\[\forall (x,t) \in D\times I, \qquad 
|h(x,t)|
=\left| e^{-2t}\sqrt{1+x^2e^{2t}} \right|
\leq e^{-2t}\sqrt{1+A^2e^{2t}}
= \phi(t) \]
\end{itemiz}
Donc, d'après le théorème de continuité sous le signe somme,
$f$ est définie et continue sur $D$.

Or ce résultat est vrai pour tout $A>0$, donc 
\begin{cfb}{$f$ est continue sur $\bigcup_{A>0}[-A,A]=\R$}\end{cfb}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% ATTENTION A LA FORMULATION DANS LE PROGRAMME !! %%%

\item On fixe un réel $x_0>0$. Appliquons le théorème de continuité des
  intégrales dépendant d'un paramètre sur l'intervalle $[x_0,+\infty[$.

\begin{itemiz}
\item Pour tout $t \in [0,+\infty[$, la fonction $x \mapsto f(t) e^{-xt}$ est
  continue sur  $[x_0,+\infty[$ car exponentielle l'est.
\item Pour tout $x \in [x_0,+\infty[$, la fonction $t \mapsto f(t) e^{-xt}$
  est continue par morceaux sur $[0,+\infty[$ d'après 3)a). 
\item La fonction $\phi(t) = |f(t)| e^{-x_0t}$ est intégrable sur $[0,+\infty[$
  d'après 3)a) et
\[ \forall (x,t) \in [x_0,+\infty[\times [0,+\infty[ \qquad |f(t) e^{-xt}|\leq
\phi(t) \]
\end{itemiz}
\rmqbla{(Il est {\bf fondamental} que $\phi$ ne dépende pas de $x$. C'est le
  c\oe ur du théorème. De plus, la majoration doit être vraie « pour tout $t$
  dans le domaine d'intégration », et pas --- par exemple --- juste pour $t
  \geq A$)}

Donc, d'après le théorème de continuité sous le signe somme, 

\begin{center}
\fbox{la fonction $\mcL(f)$ est définie et continue sur $[x_0,+\infty[$.}
\end{center}

Soit $x \in ]0,+\infty[$ fixé. Posons $x_0=x/2$, alors $\mcL(f)$ est continue
sur $[x_0,+\infty[=[x/2,+\infty[$ qui contient $x$, donc 
$\mcL(f)$ est continue en $x$. Ainsi $\mcL(f)$ est continue en $x$ pour tout
$x>0$, \cad{}
\begin{center}
 \fbox{$\mcL(f)$ est
  continue sur $]0,+\infty[$.}
\end{center}



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Soit $a>0$. Montrons que $F$ est $\cC^1$ sur $[a,+\infty[$. Posons
$D=[a,+\infty[$, $I=]0,+\infty[$ et
\[\forall (x,t) \in [a,+\infty[\times ]0,+\infty[,
\qquad h(x,t) = \frac{\sin (t)}t e^{-xt}\]

\underline{Théorème de dérivation} :
\begin{itemiz}
\item $\forall t \in I$, la fonction $x \mapsto
h(x,t)
$ est de classe $\cC^1$ sur $D$;
\item $\forall x \in D$, \begin{tabular}[t]{l}
la fonction $t \mapsto
  h(x,t)$ est intégrable sur $I$ (d'après 1));\\
la fonction $t \mapsto
\frac{\partial h}{\partial x}(x,t) = 
\frac x {\sqrt{1+x^2e^{2t}}}
$ est continue donc 
 continue par morceaux sur $I$.
\end{tabular}
\item Soit $\phi : I \to \R_+$ définie par $\phi(t) =
...
$. La fonction $\phi$ est {\bf intégrable sur $I$} 
d'après ci-dessus
et, toujours d'après ci-dessus
\[\forall (x,t) \in D\times I, \qquad 
\left| \frac{\partial h}{\partial x}(x,t)
\right|
=\abs{...
}
\leq
\frac A {\sqrt{1+A^2e^{2t}}} 
= \phi(t) \]

\end{itemiz}
Donc, d'après le théorème de dérivation sous le signe somme (ou théorème de
Leibniz), il vient
 \begin{cfb}{$f$ est $\cC^1$ sur $[-A,A]$ et $f'(x) = \int_{0}^{+\infty}
 \frac x {\sqrt{1+x^2e^{2t}}}\dt$.}\end{cfb}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%% Exercices

\def\NomChapitre{Algèbre Linéaire}
\def\Type{Exercices}

\LeTitre{\Type}{\NomChapitre}

%%% /Exercices

%%% TODO TODO TODO
%%%%% Faire une rédaction type de la recherche de SEP %%%%%

\begin{nunumerate}{.8}{1}{1.3} 
  \itemnu bla_\thenunumi &
  \itemnu blo \\
  \itemnu bla &
  \itemnu blo \\
\multicolumn{2}{l}{\itemnu $\left| \frac{z-3+i}{z-5-i} \right|=1 $ (attention)}
\end{nunumerate}

\begin{nunumerate}{1}{2}{1} 
\itemnu &
\end{nunumerate}

$\left\{ \begin{array}{rcl}
a+b+c &=& j\\
a+b+c &=& j\\
a+b+c &=& j\\
\end{array}\right.$



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% python %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{center}
\begin{minipage}{.8\linewidth}
\begin{lstlisting}
def mystere(nom_fichier):
    with open(nom_fichier, 'r') as fichier_python:
        resultat = fichier_python.read()
    return resultat
\end{lstlisting}
\end{minipage}
\end{center}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% includegraphics %%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{figure}[!htb]
  \centering
\includegraphics[angle=-90,scale=.4]{controle4B-fig3}
\caption{bla !}
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TIKZ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Tab Variations
\begin{center}
\begin{tikzpicture}
\tkzTabInit[lgt=1.2]
 {$x$       /.8,
  $f'(x)$   /.8,
  $f$    /2}
 {$-\infty$,$0$,$+\infty$}
  \tkzTabLine{,+,d,-,}
\tkzTabVar{-/$1$  ,  +D+/$+\infty$/$+\infty$ , -/$1$}  
\end{tikzpicture}
\end{center}
%%% Calcul de norme infinie
\begin{center}
\begin{tikzpicture}[baseline=(current bounding box.center)]
\tkzTabInit[lgt=1.2]
 {$x$       /.8,
  $f'_n(x)$   /.8,
  $f_n$    /2}
 {$1$, $a$,$+\infty$}
  \tkzTabLine{,,-,,}
\tkzTabVar{+/$\frac1{n}$,R/  , -/$0$}
\tkzTabIma{3}{1}{2}{$\frac1{n^a}$}
\end{tikzpicture}
\qquad Donc
$\normei{f_n} = \frac1{n^a}$.
\end{center}

%%% Avec DeuxCol
\begin{DeuxCol}{.4}{.6} 
\begin{itemiz}
\item $f_0(0)=0$
\item $f_0\big(\frac\pi3\big)= \frac{\sqrt3}3$
\item $f_0(\pi)=0$
\end{itemiz}
&
\begin{tikzpicture}[baseline=(current bounding box.center)]
\tkzTabInit[lgt=1.2]
 {$x$       /.8,
  $f_0'(x)$   /.8,
  $f_0$    /2}
 {$0$, $\frac\pi3$,$\pi$}
  \tkzTabLine{,+,z,-,}
\tkzTabVar{-/$0$  ,+/$\frac{\sqrt3}3$ , -/$0$}  
\end{tikzpicture}
\end{DeuxCol}


\begin{center}
\begin{tikzpicture}[baseline=(current bounding box.north)]
\tkzTabInit[lgt=1.9]
 {$x$       /.8,
  $g'(x)$   /.8,
  $g$    /2,
  signe de $g(x)$ /1.2}
 {$-\infty$,$0$,$+\infty$}
  \tkzTabLine{,-,z,+,}
\tkzTabVar{+/$1$  , -/$0$ , +/$+\infty$}  
  \tkzTabLine{,+,z,+,}
\end{tikzpicture}
\end{center}
%%% Tab Variations : Courbe
\begin{DeuxCol}{.4}{.6} 
\begin{itemiz}
\item 
$\begin{array}[t]{rl}
x(t_0) &= \frac{1-(\sqrt 5-2)}{1+\sqrt 5 -2}\\
&=\frac{(3-\sqrt 5)(1+\sqrt 5)}{5-1}\\
&=-\frac12 + \frac{\sqrt 5}2\\
\end{array}$
\item $y(t_0)=t_0x(t_0)$
\end{itemiz}
&\vspace{-.7cm}
\begin{tikzpicture}[baseline=(current bounding box.north)]
\tkzTabInit[lgt=1.9]
 {$t$       /.8,
  $x'(t)$   /.8,
  $x$    /2,
  $y'(t)$   /.8,
  $y$    /2}
 {$0$,$t_0$,$+\infty$}
  \tkzTabLine{z,-,,-,}
\tkzTabVar{+/$1$  ,  R/   , -/$-1$}  
  \tkzTabLine{,+,z,-,}
\tkzTabVar{-/$0$  , +/$y(t_0)$  , -/$-1$}  
\end{tikzpicture}
\end{DeuxCol}

%% Tableaux de signes et de variations imbriqués (Bernoulli)
\begin{tikzpicture}
\tkzTabInit[lgt=3,espcl=3]
{$x$                        / 1 , 
 $(-1)^nB_{2n}$              / 2.5, 
 signe de $(-1)^nB_{2n}(x)$  / 1.5,
 $(-1)^nB_{2n+1}$             / 2.5, 
 signe de $(-1)^nB_{2n+1}(x)$ / 1.5}
{$0$, $\alpha_n$, $\frac12$ , $\beta_n$, $1$}%
\tkzTabVar{-/ $(-1)^nB_{2n}(0)<0$\hspace{-1.5cm}~,R/ ,+ / $(-1)^nB_{2n}(\frac12)>0 $, R/ ,- / $(-1)^nB_{2n}(1)<0$\hspace{2cm} }%
\tkzTabIma[draw]{1}{3}{2}{$0$}%{debut}{fin}{position} de/sur la fleche concernée
\tkzTabIma{3}{5}{4}{$0$}
\tkzTabLine{,-,z,,+,,z,-,}%
\tkzTabVar{+/ $0$, - / $(-1)^nB_{2n+1}(\alpha_n)$,R /, +/ $(-1)^nB_{2n+1}(\beta_n)$, - / $0$ }%
\tkzTabIma[]{2}{4}{3}{$0$}
\tkzTabLine{,,-,,z,,+,,}%
\end{tikzpicture}\label{DL2cTabHn}



%%%%% INTÉGRALE %%%%% (formule encadrée)
\shorthandoff{:}
\begin{tikzpicture}[>=stealth,scale=2,baseline=(current bounding box.north)]
% bornes
\def\xmin{-1}
\def\xmax{4}
\def\ymin{-0}
\def\ymax{3}

\def\xun{1.32}
\def\xdeux{3.8}
%%% fonction controle calculatrice
%\def\fonction{x^3+2x^2-7x-1}
%%% degre 5 paire a param + decalage
\def\blabla{-.1}
\def\tifonction{1+(\blabla)*(\x-1.8)^4-(8*\blabla)*(\x-1.8)^2}
%%% sinus (approx)
%\def\tifonction{1.5+0.8*\x-\x^3/6+\x^5/(120)}


% courbe
\filldraw[fill=black!20,dashed,smooth,domain=\xun:\xdeux] (\xun,0)
-- plot (\x,{\tifonction}) -- (\xdeux,0) -- cycle;
% Axes & co.
 \draw[step=1cm,dotted] (\xmin,\ymin) grid (\xmax,\ymax);
% \filldraw [gray] (0,0) circle (.1cm) node[below left, black] {$O$};
 \draw[->,thick] (\xmin.2,0) -- node[at end,below] {$x$} (\xmax.8,0);
 \draw[->,thick] (0,\ymin.3) -- node[at end,left] {$f(x)$} (0,\ymax.8);
%\foreach \x in {\xmin,...,-1,1,2,...,\xmax}
% \draw[xshift=\x cm] (0pt,1pt) -- (0pt,-1pt) node[below] {$\x$};
   % valeurs spe
 \draw[xshift=\xun cm] (0pt,2pt) -- (0pt,-2pt) node[below] {$a$};
 \draw[xshift=\xdeux cm] (0pt,2pt) -- (0pt,-2pt) node[below] {$b$};
 % Z\'ero
 \draw[xshift=0 cm] (0pt,1pt) -- (0pt,-1pt) node[below left] {$O$};
%\foreach \y in {\ymin,...,-1,1,2,...,\ymax}
%  \draw[yshift=\y cm] (1pt,0pt) -- (-1pt,0pt) node[left] {$\y$};
\clip (\xmin.2,\ymin.3) rectangle (\xmax.5,\ymax.5);
% suite dessin
\draw[very thick,smooth,domain=\xmin.2:\xmax.3] plot (\x,{\tifonction});
%\draw ({(\xun+\xdeux)/2},1) node[shape=circle,draw,fill=white] {$\int_a^b f(x) dx$};
\draw ({(\xun+\xdeux)/2},.5) node[rounded corners,draw,fill=white] {$\int_a^b f(x) dx$};
\end{tikzpicture}
\shorthandon{:}
%%%%% /INTÉGRALE %%%%%

%%%%%%%%%% Avec des rectangle et une boucle %%%%%%%%%%
%%%%% INTÉGRALE %%%%%
\shorthandoff{:}
\begin{tikzpicture}[>=stealth,scale=.8,baseline=(current bounding box.north)]
\path[use as bounding box] (-1,0) rectangle (5,4);
% bornes
\def\xmin{-0}
\def\xmax{6}
\def\ymin{-0}
\def\ymax{3}

\def\xun{1.32}
\def\xdeux{5.8}
%%% fonction controle calculatrice
%\def\fonction{x^3+2x^2-7x-1}
%%% degre 5 paire a param + decalage
\def\blabla{-.1}
%\def\tifonction{1+(\blabla)*(\x-1)^4-(8*\blabla)*(\x-1)^2}
%%% 
\def\tifonction{.5+0.08*((\x)-\xun)^2}
% courbe
\filldraw[fill=black!10,dashed,smooth,domain=\xun:\xdeux] (\xun,0)
-- plot (\x,{\tifonction}) -- (\xdeux,0) -- cycle;

%%% Rectangles %%%
\def\pas{32}
\def\finenumi{31}
%%% Rectangles ROUGES %%%
\foreach \y in {1,2,...,\pas}
  \def\x{\xun+\y*(\xdeux-\xun)/\pas} 
  \draw[red,fill=red!10] ({\x},0) rectangle +({(\xun-\xdeux)/\pas},{\tifonction});
%%% /Rectangles ROUGES %%%
%%% Rectangles NOIRS %%%
\foreach \y in {0,1,...,\finenumi}
  \def\x{\xun+\y*(\xdeux-\xun)/\pas} 
  \draw[fill=black!20] ({\x},0) rectangle +({(\xdeux-\xun)/\pas},{\tifonction});
%%% /Rectangles NOIRS %%%
% Axes & co.
 \draw[step=1cm,dotted] (\xmin,\ymin) grid (\xmax,\ymax);
% \filldraw [gray] (0,0) circle (.1cm) node[below left, black] {$O$};
 \draw[->,thick] (\xmin.2,0) -- node[at end,below] {$x$} (\xmax.8,0);
 \draw[->,thick] (0,\ymin.3) -- node[at end,left] {$f(x)$} (0,\ymax.8);
%\foreach \x in {\xmin,...,-1,1,2,...,\xmax}
% \draw[xshift=\x cm] (0pt,1pt) -- (0pt,-1pt) node[below] {$\x$};
   % valeurs spe
 \draw[xshift=\xun cm] (0pt,2pt) -- (0pt,-2pt) node[below] {$a$};
 \draw[xshift=\xdeux cm] (0pt,2pt) -- (0pt,-2pt) node[below] {$b$};
 % Z\'ero
 \draw[xshift=0 cm] (0pt,1pt) -- (0pt,-1pt) node[below left] {$O$};
%\foreach \y in {\ymin,...,-1,1,2,...,\ymax}
%  \draw[yshift=\y cm] (1pt,0pt) -- (-1pt,0pt) node[left] {$\y$};
\clip (\xmin.2,\ymin.3) rectangle (\xmax.5,\ymax.5);
% suite dessin
\draw[very thick,smooth,domain=\xmin.2:\xun] plot (\x,.5);
\draw[very thick,smooth,domain=\xun:\xmax.3] plot (\x,{\tifonction});
\end{tikzpicture}
\shorthandon{:}
%%%%% /INTÉGRALE %%%%%

%%%%%%%%%%% Tracé de mini courbe : cv simple et intégration %%%%%%%%%%%%%%
\begin{center}
\shorthandoff{:}
\begin{tikzpicture}[>=stealth,scale=1.1,baseline=(current bounding box.north)]
% boîte
\def\xmin{-0}
\def\xmax{2}
\def\xzero{.4}
\def\ymin{-0}
\def\ymax{2}
%\path[use as bounding box] (\xmin,\ymin.8) rectangle (\xmax.5,\ymax);
% Axes
 \draw[->,thick] (\xmin.2,0) -- node[at end,below] {$x$} (\xmax.8,0);
 \draw[->,thick] (0,\ymin.3) -- node[at end,left] {$f(x)$} (0,\ymax.8);
 % Valeurs axes : 0, x=1/n, x=1, y = 1
\draw[xshift=0 cm] (0pt,2pt) -- (0pt,-2pt) node[below left] {$O$};
\draw[xshift=\xzero cm] (0pt,2pt) -- (0pt,-2pt) node[below ] {$1/n$};
\draw[xshift=\xmax cm] (0pt,2pt) -- (0pt,-2pt) node[below ] {$1$};
\draw[yshift=1 cm] (2pt,0pt) -- (-2pt,0pt) node[left] {$1$};
% Courbe
\draw[very thick] (0,0) -- (\xzero,1) -- node[above right] {$\cC_{f_n}$} (.8,0) -- (\xmax,0);
\node at (1.5,-1.1) {$ \int_{[0,1]}f_n = 1/n \to 0$};
\end{tikzpicture}\qquad
\begin{tikzpicture}[>=stealth,scale=1.1,baseline=(current bounding box.north)]
% boîte
\def\xmin{-0}
\def\xmax{2}
\def\xzero{.4}
\def\ymin{-0}
\def\ymax{2}
%\path[use as bounding box] (\xmin,\ymin.8) rectangle (\xmax.5,\ymax);
% Axes
 \draw[->,thick] (\xmin.2,0) -- node[at end,below] {$x$} (\xmax.8,0);
 \draw[->,thick] (0,\ymin.3) -- node[at end,left] {$f(x)$} (0,\ymax.8);
 % Valeurs axes : 0, x=1/n, x=1, y = n
\draw[xshift=0 cm] (0pt,2pt) -- (0pt,-2pt) node[below left] {$O$};
\draw[xshift=\xzero cm] (0pt,2pt) -- (0pt,-2pt) node[below ] {$1/n$};
\draw[xshift=\xmax cm] (0pt,2pt) -- (0pt,-2pt) node[below ] {$1$};
\draw[yshift=\ymax cm] (2pt,0pt) -- (-2pt,0pt) node[left] {$n$};
% Courbe
\draw[very thick] (0,0) -- (\xzero,\ymax) -- node[above right] {$\cC_{f_n}$} (.8,0) -- (\xmax,0);
\node at (1.5,-1.1) {$ \int_{[0,1]}f_n = 1 \to 1$};
\end{tikzpicture}\qquad
\begin{tikzpicture}[>=stealth,scale=1.1,baseline=(current bounding box.north)]
% boîte
\def\xmin{-0}
\def\xmax{2}
\def\xzero{.4}
\def\ymin{-0}
\def\ymax{2}
%\path[use as bounding box] (\xmin,\ymin.8) rectangle (\xmax.5,\ymax);
% Axes
 \draw[->,thick] (\xmin.2,0) -- node[at end,below] {$x$} (\xmax.8,0);
 \draw[->,thick] (0,\ymin.3) -- node[at end,left] {$f(x)$} (0,\ymax.8);
 % Valeurs axes : 0, x=1/n, x=1, y = n^2
\draw[xshift=0 cm] (0pt,2pt) -- (0pt,-2pt) node[below left] {$O$};
\draw[xshift=\xzero cm] (0pt,2pt) -- (0pt,-2pt) node[below ] {$1/n$};
\draw[xshift=\xmax cm] (0pt,2pt) -- (0pt,-2pt) node[below ] {$1$};
\draw[yshift=\ymax.5 cm] (2pt,0pt) -- (-2pt,0pt) node[left] {$n^2$};
% Courbe
\draw[very thick] (0,0) -- (\xzero,\ymax.5) -- node[above right] {$\cC_{f_n}$} (.8,0) -- (\xmax,0);
\node at (1.5,-1.1) {$ \int_{[0,1]}f_n = n \to +\infty$};
\end{tikzpicture}
\shorthandon{:}
\end{center}

%%%%%%%%%%%%%%%%%%%%%%%%%% Tracé de courbe %%%%%%%%%%%%%%%%%%%%%%%%%%
\shorthandoff{:}
\begin{center}
\begin{tikzpicture}[>=stealth,scale=1.2,baseline=(current bounding box.north)]
% bornes
\def\xmin{-5}
\def\xmax{4}
\def\ymin{-0}
\def\ymax{5}
\path[use as bounding box] (\xmin,\ymin.8) rectangle (\xmax.5,\ymax);

\def\asun{0-(\x)}
\def\tgteun{1-.5*(\x)}
\def\xmint{-1}
\def\xmaxt{1}
%\def\tifonction{1+(\blabla)*(\x-1)^4-(8*\blabla)*(\x-1)^2}
%%% 
\def\tifonction{(\x)/(exp(\x)-1)}

% Axes & co.
 \draw[step=1cm,dotted] (\xmin,\ymin) grid (\xmax,\ymax);
% \filldraw [gray] (0,0) circle (.1cm) node[below left, black] {$O$};
 \draw[->,thick] (\xmin.2,0) -- node[at end,below] {$x$} (\xmax.8,0);
 \draw[->,thick] (0,\ymin.3) -- node[at end,left] {$f(x)$} (0,\ymax.8);
\foreach \x in {\xmin,...,-1,1,2,...,\xmax}
\draw[xshift=\x cm] (0pt,2pt) -- (0pt,-2pt) node[below] {$\x$};
 % Z\'ero
 \draw[xshift=0 cm] (0pt,2pt) -- (0pt,-2pt) node[below left] {$O$};
\foreach \y in {1,2,...,\ymax}
 \draw[yshift=\y cm] (2pt,0pt) -- (-2pt,0pt) node[left] {};
 \draw[yshift= .8 cm] (0pt,0pt) -- ( 0pt,0pt) node[left] {$1$};
\clip (\xmin.2,\ymin.3) rectangle (\xmax.5,\ymax.5);
% Courbe :
\draw[very thick,smooth,domain=\xmin.3:\xmax.3] plot (\x,{\tifonction});
% Asymptotes :
\draw[dashed,thick,domain=\xmin.3:\xmax.3] plot (\x,{\asun});
\draw[<->,thick,domain=\xmint.3:\xmaxt.3] plot (\x,{\tgteun});
\end{tikzpicture}
\end{center}
\shorthandon{:}

%%%%%% Graphes dans [0,1]\times[0,1]
\shorthandoff{:}
\begin{center}
\begin{tikzpicture}[>=stealth,scale=4.2,baseline=(current bounding box.north)]
% bornes
\def\xmin{-0}
\def\xmax{1}
\def\ymin{-0}
\def\ymax{1}
\path[use as bounding box] (\xmin,\ymin.5) rectangle (\xmax.5,\ymax.3);
% Autres
\def\asun{0-(\x)}
\def\tgteun{1-.5*(\x)}
\def\xmint{0}
\def\xmaxt{1}
%%% 
\def\tifonction{(\x^(\enne))/(sqrt(1+\x))}
% Axes & co.
 \draw[step=.25cm,dotted] (\xmin,\ymin) grid (\xmax,\ymax);
 \draw[->,thick] (\xmin.1,0) -- node[at end,below] {$x$} (\xmax.2,0);
 \draw[->,thick] (0,\ymin.1) -- node[at end,left] {$f(x)$} (0,\ymax.2);
% Axe des x
\def\valeurx{1}
\def\latexx{1}
\draw[xshift=\valeurx cm] (0pt,0pt) -- (0pt,-1pt) node[below] {$\latexx$};
% Axe des y
\def\valeury{1}
\def\latexy{1}
\draw[yshift=\valeury cm] (0,0pt) -- (-1pt,0pt) node[left] {$\latexy$};
\def\valeury{.707106781}
\def\latexy{\frac1{\sqrt 2}}
\draw[yshift=\valeury cm] (0,0pt) -- (-1pt,0pt) node[left] {$\latexy$};
 % Z\'ero
 \draw[xshift=0 cm] (0pt,2pt) -- (0pt,-2pt) node[below left] {$O$};
\clip (\xmin.2,\ymin.3) rectangle (\xmax.5,\ymax.5);
% Courbe :
\foreach \enne in {0, 1, 2} 
  \draw[very thick,smooth,domain=\xmin:\xmax] plot (\x,{\tifonction});
% tangentes :
\draw[<->,very thick] (-.15,{1+.15/2}) -- (.15,{1-.15/2});
\draw[<->,very thick] (-.15,-.15) -- (.15,.15);
\draw[<->,very thick] (-.2,0) -- (.2,0);
\end{tikzpicture}
\end{center}
\shorthandon{:}

%%%%%%%%%% Tracé de fonction (simple)

\begin{center}
\shorthandoff{:}
\begin{tikzpicture}[>=stealth,scale=1.1,baseline=(current bounding box.north)]
% boîte
\def\xmin{-3}
\def\xmax{3}
\def\xmaxf{2}
\def\xzero{1}
\def\ymin{-0}
\def\ymax{5}
%\path[use as bounding box] (\xmin,\ymin.8) rectangle (\xmax.5,\ymax);
\def\trafonction{1/((\x)-\xploum)}
\def\trafonctionneg{1/((\x)-\xploum+1)}
% Axes
 \draw[->,thick] (\xmin.2,0) -- node[at end,below] {$x$} (\xmax.8,0);
 \draw[->,thick] (0,\ymin.3) -- node[at end,left] {$f(x)$} (0,\ymax.8);
 % Valeurs axes : 0, x=1/n, x=1, y = n^2
\draw[xshift=0 cm] (0pt,2pt) -- (0pt,-2pt) node[below left] {$O$};
\foreach \x in {\xmin,...,-1,1,2,...,\xmax}
\draw[xshift=\x cm] (0pt,2pt) -- (0pt,-2pt) node[below] {$\x$};
\draw[yshift=1 cm] (2pt,0pt) -- (-2pt,0pt) node[left] {$1$};
% Courbe
\clip (\xmin.2,\ymin.3) rectangle (\xmax.5,\ymax.5);
\foreach \xploum in {0,...,\xmaxf}
\draw[very thick,smooth,domain=\xploum.1:\xploum.999] plot (\x,{\trafonction});
\draw[very thick,smooth,domain=-2.9:-2.001] plot (\x,{1/((\x)+3)});
\draw[very thick,smooth,domain=-1.9:-1.001] plot (\x,{1/((\x)+2)});
\draw[very thick,smooth,domain=-0.9:-0.001] plot (\x,{1/((\x)+1)});
%\draw[very thick,smooth,domain=\xmin:\xmax] plot(\x,{(sin(\x r))});
\end{tikzpicture}
\shorthandon{:}
\end{center}

%%%%%%%%%% Tracé de courbe paramétrée.
\begin{center}
\shorthandoff{:}
\begin{tikzpicture}[>=stealth,scale=.8,baseline=(current bounding box.north)]
% boîte
\def\xmin{-3}
\def\xmax{3}
\def\ymin{-4}
\def\ymax{4}
%\path[use as bounding box] (\xmin,\ymin.8) rectangle (\xmax.5,\ymax);
\def\trafonctionx{3*cos(\t r)-cos(3*\t r)}
\def\trafonctiony{3*sin(\t r)-sin(3*\t r)}
\def\tmin{0}
\def\tmax{6.282}
% Nom des courbes
\node at (2.8,3) {$\Gamma$};
\node at (1.9,1.5) {$\Gamma'$};
% Axes
 \draw[->,thick] (\xmin.2,0) -- node[at end,below] {$x$} (\xmax.8,0);
 \draw[->,thick] (0,\ymin.3) -- node[at end,left] {$y$} (0,\ymax.8);
 % Valeurs axes : 0, x=1/n, x=1, y = n^2
\draw[xshift=0 cm] (0pt,2pt) -- (0pt,-2pt) node[below left] {$O$};
\foreach \x in {\xmin,...,-1,1,2,...,\xmax}
\draw[xshift=\x cm] (0pt,2pt) -- (0pt,-2pt) node[below] {$\x$};
\foreach \y in {\ymin,...,-1,1,2,...,\ymax}
\draw[yshift=\y cm] (2pt,0pt) -- (-2pt,0pt) node[left] {$\y$};
% Courbe
\clip (\xmin.2,\ymin.3) rectangle (\xmax.5,\ymax.5);
\draw[very thick,smooth,domain=\tmin:\tmax,samples=60,variable=\t] plot ({\trafonctionx},{\trafonctiony});
\end{tikzpicture}
\shorthandon{:}
\end{center}
%%%%%%%%%% Tracé de courbe polaire.
\begin{center}
\shorthandoff{:}
\begin{tikzpicture}[>=stealth,scale=1.8,baseline=(current bounding box.north)]
% boîte
\def\xmin{-2}
\def\xmax{2}
\def\ymin{-2}
\def\ymax{2}
%\path[use as bounding box] (\xmin,\ymin.8) rectangle (\xmax.5,\ymax);
\def\trafonctionrho{-1+cos(3*\t r)}
\def\trafonctionx{(\trafonctionrho)*cos(\t r)}
\def\trafonctiony{(\trafonctionrho)*sin(\t r)}
\pgfmathsetmacro{\tmin}{0}
\pgfmathsetmacro{\tmaxdeux}{pi/3}
\pgfmathsetmacro{\tmax}{ 2*pi }
% Nom des courbes
\node at (1.3,1) {$\Gamma $};
% Axes
 \draw[->,thick] ({\xmin-.2},0) -- node[at end,below] {$x$} ({\xmax+.8},0);
 \draw[->,thick] (0,{\ymin-.3}) -- node[at end,left] {$y$} (0,{\ymax+.8});
 % Valeurs axes : 0, x=1/n, x=1, y = n^2
\draw[xshift=0 cm] (0pt,2pt) -- (0pt,-2pt) node[below left] {$O$};
\foreach \x in {\xmin,...,-1,1,2,...,\xmax}
\draw[xshift=\x cm] (0pt,2pt) -- (0pt,-2pt) node[below] {$\x$};
\foreach \y in {\ymin,...,-1,1,2,...,\ymax}
\draw[yshift=\y cm] (2pt,0pt) -- (-2pt,0pt) node[left] {$\y$};
% Courbe
\clip (\xmin,\ymin) rectangle (\xmax,\ymax);
\draw[thick,smooth,domain=\tmin:\tmax,samples=60,variable=\t,gray] plot ({\trafonctionx},{\trafonctiony});
\draw[very thick,smooth,domain=\tmin:\tmaxdeux,samples=60,variable=\t] plot ({\trafonctionx},{\trafonctiony});
 \draw (-1.5,2.598076211) -- (1.5,-2.598076211);
 \draw (-1.5,-2.598076211) -- (1.5,2.598076211);
 \draw[<->,domain=-1.55:-1.93,samples=60,variable=\y] plot ({-1.732050808*\y-4},{\y});
\end{tikzpicture}
\shorthandon{:}
\end{center}
%%%%%%%%%% Tracé d'hyperbole x^2/a^2 - y^2/b^2 = 1, avec changement de repère.
\underline{Tracé} :
\begin{center}
\shorthandoff{:}
\begin{tikzpicture}[>=stealth,scale=1.2,baseline=(current bounding box.north)]
% boîte
\def\xmin{-5}
\def\xmax{9}
\def\ymin{-1}
\def\ymax{7}
%\path[use as bounding box] (\xmin,\ymin.8) rectangle (\xmax.5,\ymax);
\def\aaa{1.154700538}  %coef a
\def\bbb{0.755928946}  %coef b
\def\rcq{0.447213595}  %sqrt 5
\def\fctx{\aaa*cosh(\t)}
\def\fcty{\bbb*sinh(\t)}
% selon x et y \Omega + P\vcol{x_2(t) + y_2(t)}, réutilisé partout.
\def\trafonctionx{2+(\rcq)*(2*(\fctx) -(\fcty))} 
\def\trafonctiony{3+(\rcq)*((\fctx) +2*(\fcty))} %
\def\tmin{-2.5}
\def\tmax{2.5}
% Nom des courbes
\node at (9, 3) {$\Gamma$};
% Axes
 \draw[->,thick] (\xmin.2,0) -- node[at end,below] {$x$} (\xmax.8,0);
 \draw[->,thick] (0,\ymin.3) -- node[at end,right] {$y$} (0,\ymax.8);
 % Valeurs axes : 0, x=1/n, x=1, y = n^2
\draw[xshift=0 cm] (0pt,2pt) -- (0pt,-2pt) node[below left] {$O$};
\foreach \x in {1, 2}
\draw[xshift=\x cm] (0pt,2pt) -- (0pt,-2pt) node[below] {$\x$};
\draw[yshift=1 cm] (2pt,0pt) -- (-2pt,0pt) node[left] {$1$};
\draw[yshift=3 cm] (2pt,0pt) -- (-2pt,0pt) node[below left] {$3$};
% Repère $(\Omega, \cB')$
 %Axe des x''
\def\xxx{((\xmax - \xmin)/2+1)}
\def\yyy{0}
\def\ptA{({2+(\rcq)*(2*(\xxx) -(\yyy))},{3+(\rcq)*((\xxx) +2*(\yyy))})}
\def\ptB{({2+(\rcq)*(2*(-\xxx) -(-\yyy))},{3+(\rcq)*((-\xxx) +2*(-\yyy))})}
\draw[dashed, thick] \ptB -- node[sloped, at end,below] {$x''$} \ptA;
 %Axe des y''
\def\xxx{0}
\def\yyy{((\ymax - \ymin)/2+1)}
\def\ptA{({2+(\rcq)*(2*(\xxx) -(\yyy))},{3+(\rcq)*((\xxx) +2*(\yyy))})}
\def\ptB{({2+(\rcq)*(2*(-\xxx) -(-\yyy))},{3+(\rcq)*((-\xxx) +2*(-\yyy))})}
\draw[dashed, thick] \ptB -- node[sloped, rotate = 90, at end, left] {$y''$} \ptA;
 %vecteur e'_1
\def\xxx{1}
\def\yyy{0}
\def\ptA{({2+(\rcq)*(2*(\xxx) -(\yyy))},{3+(\rcq)*((\xxx) +2*(\yyy))})}
\def\ptB{(2,3)}
\draw[->, thick] \ptB -- node[sloped, near end,below] {$\vect e_1'$} \ptA;
 % asymptote enoncé
\def\xxxx{1}
\def\yyyy{0.654653671*\xxx}
\def\ptC{({2+(\rcq)*(2*(\xxxx) -(\yyyy))},{3+(\rcq)*((\xxxx) +2*(\yyyy))})}
\def\ptD{({2+(\rcq)*( -(\yyyy))},{3+(\rcq)*(2*(\yyyy))})}
\draw[dotted] \ptA -- \ptC -- \ptD node[left] {$b/a$};
\node at (-4, 7) {$b/a=\sqrt{3/7} \simeq 0{,}65$};
 %vecteur e'_2
\def\xxx{0}
\def\yyy{1}
\def\ptA{({2+(\rcq)*(2*(\xxx) -(\yyy))},{3+(\rcq)*((\xxx) +2*(\yyy))})}
\draw[->, thick] \ptB -- node[sloped, rotate = 90, at end, right] {$\vect e'_2$} \ptA;
% Points
 %Omega
\draw[dotted] (2,0) -- (2,3) node[below right] {$\Omega$} -- (0,3);
 %tangente 1
\def\xxx{\aaa}
\def\yyy{.5}
\def\ptA{({2+(\rcq)*(2*(\xxx) -(\yyy))},{3+(\rcq)*((\xxx) +2*(\yyy))})}
\def\ptB{({2+(\rcq)*(2*(\xxx) -(-\yyy))},{3+(\rcq)*((\xxx) +2*(-\yyy))})}
\draw[<->] \ptA -- node[sloped, rotate = 90, below right] {$a$} \ptB;
 %tangente 2
\def\xxx{-\aaa}
\def\yyy{.5}
\def\ptA{({2+(\rcq)*(2*(\xxx) -(\yyy))},{3+(\rcq)*((\xxx) +2*(\yyy))})}
\def\ptB{({2+(\rcq)*(2*(\xxx) -(-\yyy))},{3+(\rcq)*((\xxx) +2*(-\yyy))})}
\draw[<->] \ptA -- node[sloped, rotate = 90, below left] {$-a$} \ptB;
% Courbe
\clip (\xmin.2,\ymin.3) rectangle (\xmax.5,\ymax.5);
\draw[very thick,smooth,domain=\tmin:\tmax,samples=60,variable=\t] plot ({\trafonctionx},{\trafonctiony});
\def\fctx{-\aaa*cosh(\t)}
\def\trafonctionx{2+ \rcq *(2*(\fctx) -(\fcty))}
\def\trafonctiony{3+(\rcq)*((\fctx) +2*(\fcty))}
\draw[very thick,smooth,domain=\tmin:\tmax,samples=60,variable=\t] plot ({\trafonctionx},{\trafonctiony});
% Asymptotes
\def\xxx{(\xmax - \xmin)/2}
\def\yyy{0.654653671*\xxx}
\def\ptA{({2+(\rcq)*(2*(\xxx) -(\yyy))},{3+(\rcq)*((\xxx) +2*(\yyy))})}
\def\ptB{({2+(\rcq)*(2*(-\xxx) -(-\yyy))},{3+(\rcq)*((-\xxx) +2*(-\yyy))})}
\draw[dashed, thick] \ptB -- node[sloped, above, near end] {$y''=\frac b a x''$} \ptA ;
\def\xxx{(\xmax - \xmin)/2}
\def\yyy{-0.654653671*\xxx}
\def\ptA{({2+(\rcq)*(2*(\xxx) -(\yyy))},{3+(\rcq)*((\xxx) +2*(\yyy))})}
\def\ptB{({2+(\rcq)*(2*(-\xxx) -(-\yyy))},{3+(\rcq)*((-\xxx) +2*(-\yyy))})}
\draw[dashed, thick] \ptB -- node[sloped, below, pos=.9] {$y''=-\frac b a x''$} \ptA ;
\end{tikzpicture}
\shorthandon{:}
\end{center}
%%%% Définir un nombre dans tikz :
    \pgfmathsetmacro{\angle}{\i * pi / 2 }

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TOC %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\tableofcontents

%%%%%%%%%%%%%%%%%%%%%%% figures, sous figures, légendes %%%%%%%%%%%%%%%%%%%%%%%



\begin{figure}[!htb]
\def\scale{.5}
\centering
\begin{subfigure}[b]{.35\textwidth}
\centering


\caption{}
\end{subfigure}
\begin{subfigure}[b]{.35\textwidth}
\centering


\caption{}
\end{subfigure}

\begin{subfigure}[t]{.35\textwidth}
\centering


\caption{}
\end{subfigure}
\begin{subfigure}[t]{.35\textwidth}
\centering



\caption{Configuration finale}
\end{subfigure}
\caption{Pour $n$ palets, il suffit de savoir bouger $n-1$ palets vers le
  piquet central.}
\end{figure}
