summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/resolsysteme/doc/ResolSysteme-exemples-pyluatex.tex
blob: c6439a053cdcc988a51aa87b023bbdc89cf67cf5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
% !TeX TXS-program:compile = txs:///lualatex/[--shell-escape]

\documentclass[french,a4paper,10pt]{article}
\usepackage[margin=1.5cm]{geometry}
\usepackage[executable=python.exe]{pyluatex}
\usepackage[pyluatex]{ResolSysteme}
\usepackage{systeme}
\usepackage[most]{tcolorbox}
\sisetup{locale=FR,output-decimal-marker={,}}
\usepackage{babel}
\newtcblisting{ShowCodeTeX}[1][]{colback=white,colframe=red!75!black,listing options={style=tcblatex},#1}

\begin{document}

\part*{Version \og pyluatex \fg}

\section{Préambule, avec le package pyluatex}

\begin{ShowCodeTeX}[listing only]
\documentclass[french,a4paper,10pt]{article}
\usepackage[margin=1.5cm]{geometry}
\usepackage[executable=python.exe]{pyluatex}
\usepackage[pyluatex]{ResolSysteme}              %version pyluatex, lua + shell-escape
\usepackage{systeme}
\sisetup{locale=FR,output-decimal-marker={,}}
\end{ShowCodeTeX}

\section{Inverse d'une matrice, 2x2 ou 3x3 ou 4x4}

\begin{ShowCodeTeX}
L'inverse de $A=\begin{pNiceMatrix} 1&2 \\ 3&4 \end{pNiceMatrix}$ est
$A^{-1}=\MatriceInversePY<cell-space-limits=2pt>(1,2 § 3,4)$.
\end{ShowCodeTeX}

\begin{ShowCodeTeX}
L'inverse de $A=\begin{pNiceMatrix} 1&2 \\ 3&4 \end{pNiceMatrix}$ est
$A^{-1}=\MatriceInversePY*<cell-space-limits=2pt>(1,2 § 3,4)$.
\end{ShowCodeTeX}

\begin{ShowCodeTeX}
L'inverse de $A=\begin{pNiceMatrix} 1&2 \\ 3&6 \end{pNiceMatrix}$ est
$A^{-1}=\MatriceInversePY<cell-space-limits=2pt>(1,2 § 3,6)$.
\end{ShowCodeTeX}

\begin{ShowCodeTeX}
L'inverse de $A=\begin{pNiceMatrix} 1&2 \\ 3&4 \end{pNiceMatrix}$ est
$A^{-1}=\MatriceInversePY*[d]<cell-space-limits=2pt>(1,2 § 3,4)$.
\end{ShowCodeTeX}

\begin{ShowCodeTeX}
L'inverse de $A=\begin{pNiceMatrix} 1&2&3\\4&5&6\\7&8&8 \end{pNiceMatrix}$ est
$A^{-1}=\MatriceInversePY<cell-space-limits=2pt>(1,2,3 § 4,5,6 § 7,8,8)$.
\end{ShowCodeTeX}

\begin{ShowCodeTeX}
L'inverse de $A=\begin{pNiceMatrix} 1&2&3\\4&5&6\\7&8&8 \end{pNiceMatrix}$ est
$A^{-1}=\MatriceInversePY*<cell-space-limits=2pt>(1,2,3 § 4,5,6 § 7,8,8)$.
\end{ShowCodeTeX}

\begin{ShowCodeTeX}
L'inverse de $A=\begin{pNiceMatrix} 1&2&3&4\\5&6&7&0\\1&1&1&1\\2&-3&-5&-6 \end{pNiceMatrix}$
est $A^{-1}=\MatriceInversePY*[n]<cell-space-limits=2pt>(1,2,3,4 § 5,6,7,0 § 1,1,1,1 § 2,-3,-5,-6)$.
\end{ShowCodeTeX}

\section{Résolution d'un système, 2x2 ou 3x3 ou 4x4}

\begin{ShowCodeTeX}
La solution de $\systeme{-9x-8y=-8,3x-6y=-7}$ est $\mathcal{S}=%
\left\lbrace \SolutionSystemePY(-9,-8 § 3,-6)(-8,-7) \right\rbrace$.
\end{ShowCodeTeX}

\begin{ShowCodeTeX}
La solution de $\systeme{x+2y=-5,4x+8y=1}$ est $\mathcal{S}=%
\left\lbrace \SolutionSystemePY(1,2 § 4,8)(-5,1) \right\rbrace$.
\end{ShowCodeTeX}

\begin{ShowCodeTeX}
La solution de $\systeme{-9x-8y=-8,3x-6y=-7}$ est $\mathcal{S}=%
\left\lbrace \SolutionSystemePY*[d](-9,-8 § 3,-6)(-8,-7) \right\rbrace$.
\end{ShowCodeTeX}

\begin{ShowCodeTeX}
La solution de $\systeme{x+y+z=-1,3x+2y-z=6,-x-y+2z=-5}$ est $\mathcal{S}=%
\left\lbrace \SolutionSystemePY(1,1,1 § 3,2,-1 § -1,-1,2)(-1,6,-5) \right\rbrace$.
\end{ShowCodeTeX}

\begin{ShowCodeTeX}
La solution de $\systeme{x+y+z=-1,3x+2y-z=-5,-x-y+2z=0}$ est donnée par $X=%
\SolutionSystemePY*[d]<cell-space-limits=2pt>(1,1,1 § 3,2,-1 § -1,-1,2)(-1,-5,0)[Matrice]$.
\end{ShowCodeTeX}

\begin{ShowCodeTeX}
La solution de $\systeme[xyzt]{y+z+t=1,x+z+t=-1,x+y+t=1,x+y+z=0}$ est $\mathcal{S}=%
\left\lbrace\SolutionSystemePY*[d](0,1,1,1 § 1,0,1,1 § 1,1,0,1 § 1,1,1,0)(1,-1,1,0)\right\rbrace$.
\end{ShowCodeTeX}

\begin{ShowCodeTeX}
La solution de $\systeme[xyzt]{x+2y+3z+4t=-10,5x+6y+7z=0,x+y+z+t=4,-2x-3y-5z-6t=7}$ est $\mathcal{S}=
\left\lbrace
\SolutionSystemePY
    [dec]<cell-space-limits=2pt>
    (1,2,3,4 § 5,6,7,0 § 1,1,1,1 § -2,-3,-5,-6)(-10,0,4,7)
    [Matrice]
\right\rbrace$.
\end{ShowCodeTeX}

\end{document}