\documentclass[a4paper,10pt]{article}
\usepackage{fontspec}
\usepackage{CmathLuaTeX}
\begin{document}
$\Cmath{sin{π/4}=45}$ 
$\Cmath{(x+2)/x}$
\[\Cmath{(x+2)/x}\]
${\renewcommand{\arraystretch}{1.5}
\newcolumntype{C}[1]{S{>{\centering \arraybackslash}m{#1}}}
\setlength{\cellspacetoplimit}{4pt}
\setlength{\cellspacebottomlimit}{4pt}
\begin{tabular}{|C{1.5cm}|*{5}{C{1cm}|}}
\hline $x$ & $\displaystyle -2$ &$\displaystyle -1$ &$\displaystyle 0$ &$\displaystyle 1$ &$\displaystyle 2$ \\
\hline $\displaystyle x^{2}$ & $\displaystyle 4$ &$\displaystyle 1$ &$\displaystyle 0$ &$\displaystyle 1$ &$\displaystyle 4$ \\
\hline
\end{tabular}}$ % Traduction CmathLuaTeX de : TVal([-2,-1,0,1,2],x^2)


${\renewcommand{\arraystretch}{1.5}
\newcolumntype{C}[1]{S{>{\centering \arraybackslash}m{#1}}}
\setlength{\cellspacetoplimit}{4pt}
\setlength{\cellspacebottomlimit}{4pt}
\begin{tabular}{|C{1.5cm}|*{4}{C{1cm}|}}
\hline $x$ & $\displaystyle -3$ &$\displaystyle -1$ &$\displaystyle \frac{3}{2}$ &$\displaystyle \frac{7}{3}$ \\
\hline $f(x)$ & $\displaystyle {}$ &$\displaystyle {}$ &$\displaystyle {}$ &$\displaystyle {}$ \\
\hline
\end{tabular}}$ % Traduction CmathLuaTeX de : TVal([-3,-1,3/2,7/3],f(x)="")

$\begin{tikzpicture}
\tkzTabInit[lgt=2,espcl=2,deltacl=0.5]
{$t$ / 1,$t-3$ / 1,$t+2$ / 1,$P(t)$ / 1}
{$-\infty $,$-2$,$3$,$+\infty $}
\tkzTabLine { ,-,t,-,z,+, }
\tkzTabLine { ,-,z,+,t,+, }
\tkzTabLine { ,+,z,-,z,+, }
\end{tikzpicture}
$ % Traduction CmathLuaTeX de : TSig([-infinity,+infinity],P(t)=(t-3)(t+2))

$\begin{tikzpicture}
\tkzTabInit[lgt=2,espcl=2,deltacl=0.5]
{$t$ / 1,$f'(t)$ / 1,$f$ / 2}
{$-\infty $,$-1$,$0$,$1$,$+\infty $}
\tkzTabLine { ,+,d,+,z,-,d,-, }
\tkzTabVar {- / $1$,+D- / $+\infty $ / $-\infty $,+ / $0$,-D+ / $-\infty $ / $+\infty $,- / $1$}
\end{tikzpicture}
$ % Traduction CmathLuaTeX de : TVar([-infinity,+infinity],f(t)=t^2/(t^2-1))

$\begin{tikzpicture}
\tkzTabInit[lgt=2,espcl=2,deltacl=0.5]
{$x$ / 1,$f'(x)$ / 1,$f$ / 2}
{$0$,$1$,$e^{1}$,$+\infty $}
\tkzTabLine {d,+,t,+,t,+, }
\tkzTabVar {D- / $-\infty $,R,R,+ / $+\infty $}
\tkzTabIma{1}{4}{2}{$0$}
\tkzTabIma{1}{4}{3}{$1$}
\end{tikzpicture}
$ % Traduction CmathLuaTeX de : TVar([0,1,e,+infinity],f(x)=ln(x))

$\begin{tikzpicture}
\tkzTabInit[lgt=2,espcl=2,deltacl=0.5]
{$t$ / 1,$x'(t)$ / 1,$x$ / 2,$y$ / 2,$y'(t)$ / 1}
{$-\infty $,$-1$,$0$,$1$,$\frac{4}{3}$,$2$,$+\infty $}
\tkzTabLine { ,-,\frac{-7}{36},-,z,+,d,+,z,-,d,-, }
\tkzTabVar {+ / $1$,R,- / $0$,+D- / $+\infty $ / $-\infty $,+ / $-8$,-D+ / $-\infty $ / $+\infty $,- / $1$}
\tkzTabIma{1}{3}{2}{$\frac{1}{6}$}
\tkzTabVar {+ / $+\infty $,-D+ / $-\infty $ / $+\infty $,- / $0$,R,R,R,+ / $+\infty $}
\tkzTabIma{3}{7}{4}{$\frac{3}{2}$}
\tkzTabIma{3}{7}{5}{$\frac{160}{63}$}
\tkzTabIma{3}{7}{6}{$\frac{16}{3}$}
\tkzTabLine { ,-,d,-,z,+,\frac{11}{4},+,\frac{512}{147},+,\frac{44}{9},+, }
\end{tikzpicture}
$ % Traduction CmathLuaTeX de : TVarP([-infinity,+infinity],x(t)=t^2/(t+1)(t-2),y(t)=t^2*(t+2)/(t+1))

$\begin{tikzpicture}
\tkzTabInit[lgt=2,espcl=2,deltacl=0.5]
{$t$ / 1,$x'(t)$ / 1,$x$ / 2,$y$ / 2,$y'(t)$ / 1}
{$-\infty $,$-4$,$-1$,$0$,$2$,$+\infty $}
\tkzTabLine { ,-,z,+,d,+,z,-,d,-, }
\tkzTabVar {+ / $1$,- / $\frac{8}{9}$,+D- / $+\infty $ / $-\infty $,+ / $0$,-D+ / $-\infty $ / $+\infty $,- / $1$}
\tkzTabVar {+ / $+\infty $,R,-D+ / $-\infty $ / $+\infty $,- / $0$,R,+ / $+\infty $}
\tkzTabIma{1}{3}{2}{$\frac{32}{3}$}
\tkzTabIma{4}{6}{5}{$\frac{16}{3}$}
\tkzTabLine { ,-,\frac{-64}{9},-,d,-,z,+,\frac{44}{9},+, }
\end{tikzpicture}
$ % Traduction CmathLuaTeX de : TVarP([-infinity,+infinity],x(t)=t^2/(t+1)(t-2),y(t)=t^2*(t+2)/(t+1))

$\left\{
\begin{alignedat}{4}
2 x & ~+~ &  y & ~+~ & 3 z & ~=~ & 1 \\
 x &  & & ~-~ &  z & ~=~ & 0 \\
 & \phantom{~+~}&3 y & ~+~ &  z & ~=~ & 2 \\
\end{alignedat}
\right.
$ % Traduction CmathLuaTeX de : sysl([2x+y+3z=1,x-z=0,z+3y=2],[x,y,z])

Par la méthode du pivot de Gauss, on résout le système :
\[\left\{
\begin{alignedat}{4}
2 x & ~+~ & 2 y & ~+~ &  z & ~=~ & 1 \\
- x & ~+~ &  y & ~+~ &  z & ~=~ & 2 \\
3 x & ~-~ &  y & ~+~ &  z & ~=~ & 0 \\
\end{alignedat}
\right.
\]
On élimine la variable $x$ à partir de la ligne 2 :

\[\left\{
\begin{alignedat}{5}
2 x & ~+~ & 2 y & ~+~ &  z & ~=~ & 1 &  \\
 & \phantom{~+~}&4 y & ~+~ & 3 z & ~=~ & 5 & \qquad L_2 \longleftarrow 2 L_2+ L_1 \\
 & \phantom{~+~}&-8 y & ~-~ &  z & ~=~ & -3 & \qquad L_3 \longleftarrow 2 L_3-3 L_1 \\
\end{alignedat}
\right.
\]
On élimine la variable $y$ à partir de la ligne 3 :

\[\left\{
\begin{alignedat}{5}
2 x & ~+~ & 2 y & ~+~ &  z & ~=~ & 1 &  \\
 & \phantom{~+~}&4 y & ~+~ & 3 z & ~=~ & 5 &  \\
 &  & & \phantom{~+~}&5 z & ~=~ & 7 & \qquad L_3 \longleftarrow  L_3+2 L_2 \\
\end{alignedat}
\right.
\]
On obtient alors :
\[\left\{
\begin{alignedat}{2}
x && ~=~ & \frac{-2}{5}\\ 
y && ~=~ & \frac{1}{5}\\ 
z && ~=~ & \frac{7}{5}\\ 
\end{alignedat}
\right.\]
La solution de ce système est : $\left(\frac{-2}{5}\mathpunct{,}\frac{1}{5}\mathpunct{,}\frac{7}{5}\right)$. % Traduction CmathLuaTeX de : GaussSysl([2x+2y+z=1,-x+y+z=2,3x-y+z=0],[x,y,z])

Par la méthode du pivot de Gauss, on résout le système :
\[\left\{
\begin{alignedat}{3}
a x & ~+~ &  y & ~=~ & 0 \\
 x & ~-~ &  y & ~=~ & 0 \\
\end{alignedat}
\right.
\]
On échange la ligne 1 avec la ligne 2 pour obtenir un pivot toujours non nul :
\[\left\{
\begin{alignedat}{3}
 x & ~-~ &  y & ~=~ & 0 \\
a x & ~+~ &  y & ~=~ & 0 \\
\end{alignedat}
\right.
\]
On élimine la variable $x$ à partir de la ligne 2 :

\[\left\{
\begin{alignedat}{4}
 x & ~-~ &  y & ~=~ & 0 &  \\
 & \phantom{~+~}&\left(a+1\right) y & ~=~ & 0 & \qquad L_2 \longleftarrow  L_2-a L_1 \\
\end{alignedat}
\right.
\]
Le pivot $a+1$ peut s'annuler. On raisonne donc par disjonction des cas.
\begin{itemize}
\item
Si $a=-1$, alors on est amené à résoudre le système :
\[\left\{
\begin{alignedat}{4}
 x & ~-~ &  y & ~=~ & 0 &  \\
 & \phantom{~+~}& 0y & ~=~ & 0 &  \\
\end{alignedat}
\right.
\]
On obtient alors :
\[\left\{
\begin{alignedat}{2}
x && ~=~ & y\\ 
y && ~=~ & y\\ 
\end{alignedat}
\right.\]
L'ensemble des solutions de ce système est : $\left\{\left(y\mathpunct{,}y\right)\mathpunct{,}y\in\mathbb{R}\right\}$.
\item
Si $a\neq -1$, alors le pivot est non nul et on continue la résolution.

On obtient alors :
\[\left\{
\begin{alignedat}{2}
x && ~=~ & 0\\ 
y && ~=~ & 0\\ 
\end{alignedat}
\right.\]
La solution de ce système est : $\left(0\mathpunct{,}0\right)$.
\end{itemize}
 % Traduction CmathLuaTeX de : GaussSysl([a*x+y=0,x-y=0],[x,y])

Par la méthode du pivot de Gauss, on calcule le rang de la matrice :
\[
\begin{blockarray}{(*{3}{c})l}
1 & 0 & 2 &  \\
2 & 0 & 4 &  \\
0 & 2 & 2 &  \\
\end{blockarray}
\]
On annule les coefficients sous le pivot de la colonne 1. On obtient la matrice de même rang :
\[
\begin{blockarray}{(*{3}{c})l}
1 & 0 & 2 &   \\
0 & 0 & 0 & L_2 \longleftarrow  L_2-2 L_1 \\
0 & 2 & 2 &   \\
\end{blockarray}
\]
On échange la ligne 2 avec la ligne 3 pour obtenir un pivot non nul :
\[
\begin{blockarray}{(*{3}{c})l}
1 & 0 & 2 &  \\
0 & 2 & 2 &  \\
0 & 0 & 0 &  \\
\end{blockarray}
\]
Le rang de cette matrice vaut 2.
 % Traduction CmathLuaTeX de : GaussRang([[1,0,2],[2,0,4],[0,2,2]])

Par la méthode de Gauss-Jordan, on calcule l'inverse de la matrice :
\[
\begin{blockarray}{(*{3}{c})l}
-2 & 1 & 0 &  \\
-1 & 2 & -1 &  \\
0 & -1 & 2 &  \\
\end{blockarray}
\]
Sur la matrice
\[
\begin{blockarray}{(*{3}{c}|*{3}{c})l}
-2 & 1 & 0 & 1 & 0 & 0 &  \\
-1 & 2 & -1 & 0 & 1 & 0 &  \\
0 & -1 & 2 & 0 & 0 & 1 &  \\
\end{blockarray}
\]
on effectue les opérations élémentaires suivantes :\\
\[
\begin{blockarray}{(*{3}{c}|*{3}{c})l}
-2 & 1 & 0 & 1 & 0 & 0 &   \\
0 & -3 & 2 & 1 & -2 & 0 & L_2 \longleftarrow -2 L_2+ L_1 \\
0 & -1 & 2 & 0 & 0 & 1 &   \\
\end{blockarray}
\]
\[
\begin{blockarray}{(*{3}{c}|*{3}{c})l}
-2 & 1 & 0 & 1 & 0 & 0 &   \\
0 & -3 & 2 & 1 & -2 & 0 &   \\
0 & 0 & -4 & 1 & -2 & -3 & L_3 \longleftarrow -3 L_3+ L_2 \\
\end{blockarray}
\]
\[
\begin{blockarray}{(*{3}{c}|*{3}{c})l}
-2 & 1 & 0 & 1 & 0 & 0 &   \\
0 & 6 & 0 & -3 & 6 & 3 & L_2 \longleftarrow -2 L_2- L_3 \\
0 & 0 & -4 & 1 & -2 & -3 &   \\
\end{blockarray}
\]
\[
\begin{blockarray}{(*{3}{c}|*{3}{c})l}
-12 & 0 & 0 & 9 & -6 & -3 & L_1 \longleftarrow 6 L_1- L_2 \\
0 & 6 & 0 & -3 & 6 & 3 &   \\
0 & 0 & -4 & 1 & -2 & -3 &   \\
\end{blockarray}
\]
La matrice inverse est donc \[
\begin{blockarray}{(*{3}{c})l}
\frac{-3}{4} & \frac{1}{2} & \frac{1}{4} &  \\
\frac{-1}{2} & 1 & \frac{1}{2} &  \\
\frac{-1}{4} & \frac{1}{2} & \frac{3}{4} &  \\
\end{blockarray}
\]

 % Traduction CmathLuaTeX de : GaussInv([[-2,1,0],[-1,2,-1],[0,-1,2]])

\begin{tikzpicture}
\usetikzlibrary{arrows}
\usetikzlibrary{automata}
\Cmath{tikzWindow(xmin=-5,xmax=5,ymin=-5,ymax=5,x1cm=1.5,y1cm=1.5)}
\Cmath{tikzGrid([line width=0.4pt,color=gray!50,dashed])}
\Cmath{tikzAxeX([line width=0.6pt],-{Stealth[round]}],step=1)}
\Cmath{tikzAxeY([line width=0.6pt],-{Stealth[round]}],step=1,zero=false)}
\Cmath{codeLua(f=function(x) return 1/x end)}
\Cmath{tikzPlot([color=blue,smooth,line width=0.7],variable=x,function=f(x),samples=100,domain=-5:5)}
\Cmath{tikzPoint(pointColor=blue,variable=-1,function=f,label=A,position=below left)}
\Cmath{tikzPoint(pointColor=blue,variable=1,function=f,label=B,position=above right)}
\Cmath{tikzPoint(x=1,y=4,label=scr(H),size=0)}
\end{tikzpicture}

$\Cmath{TVal([-2,-1,0,1,2],x^2)}$

$\begin{tikzpicture}
\tkzTabInit[lgt=2,espcl=2,deltacl=0.5]
{$t$ / 1,$f'(t)$ / 1,$f$ / 2}
{$-\infty $,$-1$,$0$,$1$,$+\infty $}
\tkzTabLine { ,+,d,+,z,-,d,-, }
\tkzTabVar {- / $1$,+D- / $+\infty $ / $-\infty $,+ / $0$,-D+ / $-\infty $ / $+\infty $,- / $1$}
\end{tikzpicture}
$ % Traduction CmathLuaTeX de : TVar([-infinity,+infinity],f(t)=t^2/(t^2-1))

$\Cmath{TVar([4,10],f(t)=sqrt(t))}$

\end{document}
