<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">% Licence    : Released under the LaTeX Project Public License v1.3c
% or later, see http://www.latex-project.org/lppl.txtf
\newcommand\EquaBaseLaurent[5][]{%type ax=d ou b=cx
  \useKVdefault[ClesEquation]%
  \setKV[ClesEquation]{#1}%
  \ifx\bla#2\bla%on teste si le paramÃ¨tre #2 est vide:
  % si oui, on est dans le cas b=cx. Eh bien on Ã©change :)
  % Mais attention si les deux paramÃ¨tres a et c sont vides...
  \EquaBaseLaurent[#1]{#4}{0}{0}{#3}
  \else
  % si non, on est dans le cas ax=d
  \xintifboolexpr{#2==0}{%
    \xintifboolexpr{#5==0}{%
      L'Ã©quation $0\useKV[ClesEquation]{ELettre}=0$ a une infinitÃ© de solutions.}{L'Ã©quation $0\useKV[ClesEquation]{Lettre}=\num{#5}$ n'a aucune solution.}%
  }{%\else
    \xintifboolexpr{#5==0}{L'Ã©quation $\num{#2}\useKV[ClesEquation]{Lettre}=0$ a une unique solution : $\useKV[ClesEquation]{Lettre}=0$.}{%\else
      \begin{align*}%
        \xintifboolexpr{#2==1}{\useKV[ClesEquation]{Lettre}}{\color{Cdecomp}\frac{\cancel{\color{black}\num{#2}}\color{black}\useKV[ClesEquation]{Lettre}}{\cancel{\num{#2}}}}&amp;=\xintifboolexpr{#2==1}{\num{#5}}{\color{Cdecomp}\frac{\color{black}\num{#5}}{\num{#2}}}
        \xintifboolexpr{#2==1}{}{\\\useKV[ClesEquation]{Lettre}&amp;=\frac{\num{#5}}{\num{#2}}}%\\
        %% decimal
        \ifboolKV[ClesEquation]{Decimal}{%
        \\\useKV[ClesEquation]{Lettre}&amp;=\num{\fpeval{#5/#2}}%
                                        }{}%
%                                        %%%
        \ifboolKV[ClesEquation]{Entier}{%
        \SSimpliTest{#5}{#2}%
        \ifboolKV[ClesEquation]{Simplification}{%
        \ifthenelse{\boolean{Simplification}}{\\\useKV[ClesEquation]{Lettre}&amp;=\SSimplifie{#5}{#2}}{}%\\
        }{}
        }{}
      \end{align*}
      \xdef\Coeffa{#2}%
      \xdef\Coeffb{#5}%
      \ifboolKV[ClesEquation]{Solution}{\EcrireSolutionEquation{#2}{#3}{#4}{#5}}{}%
    }
  }
  \fi
}

\newcommand\EquaDeuxLaurent[5][]{%type ax+b=d ou b=cx+d$
  \useKVdefault[ClesEquation]%
  \setKV[ClesEquation]{#1}%
  \ifx\bla#2\bla%On Ã©change en faisant attention Ã&nbsp; ne pas boucler : c doit Ãªtre non vide
  \EquaDeuxLaurent[#1]{#4}{#5}{#2}{#3}
  \else%cas ax+b=d
  \xintifboolexpr{#2==0}{%
    \xintifboolexpr{#3==#5}{%b=d
      L'Ã©quation $\num{#3}=\num{#5}$ a une infinitÃ© de solutions.}%
    {%b&lt;&gt;d
      L'Ã©quation $\num{#3}=\num{#5}$ n'a aucune solution.%
    }%
  }{%ELSE
    \xintifboolexpr{#3==0}{%ax+b=d
      \EquaBaseLaurent[#1]{#2}{0}{0}{#5}%
    }{%ax+b=d$ Ici
      \begin{align*}
        \xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3&gt;0}{+\num{#3}\stackMath\Longstack{$\tiny$\color{Cdecomp}-\num{#3} {}}\stackText}{-\num{\fpeval{0-#3}}\stackMath\Longstack{$\tiny$\color{Cdecomp}+\num{\fpeval{0-#3}} {}}\stackText}&amp;=\num{#5}\xintifboolexpr{#3&gt;0}{\stackMath\Longstack{$\tiny$\color{Cdecomp}-\num{#3} {}}\stackText}{\stackMath\Longstack{$\tiny$\color{Cdecomp}+\num{\fpeval{0-#3}} {}}\stackText}\\
        \xdef\Coeffa{#2}\xdef\Coeffb{\fpeval{#5-#3}}%\\
        \xintifboolexpr{\Coeffa==1}{\useKV[ClesEquation]{Lettre}}{\color{Cdecomp}\frac{\cancel{\color{black}\num{\Coeffa}}\color{black}\useKV[ClesEquation]{Lettre}}{\cancel{\num{\Coeffa}}}}&amp;=\xintifboolexpr{\Coeffa==1}{\num{\Coeffb}}{\color{Cdecomp}\frac{\color{black}\num{\Coeffb}}{\num{\Coeffa}}}%\\
        \xintifboolexpr{\Coeffa==1}{}{\\}
        \xintifboolexpr{\Coeffa==1}{% 
        }{%\ifnum\cmtd&gt;1
        \useKV[ClesEquation]{Lettre}&amp;=\frac{\num{\Coeffb}}{\num{\Coeffa}}%\\
        %% decimal
        \ifboolKV[ClesEquation]{Decimal}{%
        \\\useKV[ClesEquation]{Lettre}&amp;=\num{\fpeval{\Coeffb/\Coeffa}}%
                                        }{}%
                                        %%%
        \ifboolKV[ClesEquation]{Entier}{%
        \SSimpliTest{\Coeffb}{\Coeffa}%
        \ifboolKV[ClesEquation]{Simplification}{%
        \ifthenelse{\boolean{Simplification}}{\\\useKV[ClesEquation]{Lettre}&amp;=\SSimplifie{\Coeffb}{\Coeffa}}{}%\\
        }{}
        }{}
        }
      \end{align*}
      \ifboolKV[ClesEquation]{Solution}{\EcrireSolutionEquation{#2}{#3}{#4}{#5}}{}%
    }
  }
}

\newcommand\EquaTroisLaurent[5][]{%ax+b=cx ou ax=cx+d
  \useKVdefault[ClesEquation]%
  \setKV[ClesEquation]{#1}%
  \ifx\bla#3\bla%on inverse en faisant attention Ã&nbsp; la boucle #3&lt;-&gt;#5
    \ifx\bla#5\bla%
      %% paramÃ¨tre oubliÃ©
    \else
      \EquaTroisLaurent[#1]{#4}{#5}{#2}{0}%
    \fi
  \else
  \xintifboolexpr{#2==0}{%b=cx
    \EquaBaseLaurent[#1]{#4}{0}{0}{#3}
  }{%
    \xintifboolexpr{#4==0}{%ax+b=0
      \EquaDeuxLaurent[#1]{#2}{#3}{0}{0}
    }{%ax+b=cx
      \xintifboolexpr{#2==#4}{%
        \xintifboolexpr{#3==0}{%ax=ax
          L'Ã©quation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}$ a une infinitÃ© de solutions.}%
        {%ax+b=ax
          L'Ã©quation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3&gt;0}{+\num{#3}}{-\num{\fpeval{0-#3}}}=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}$ n'a aucune solution.%
        }%
      }{%% Cas dÃ©licat
        \xintifboolexpr{#2&gt;#4}{%ax+b=cx avec a&gt;c
          \begin{align*}
            \xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3==0}{}{\xintifboolexpr{#3&gt;0}{+\num{#3}\stackMath\Longstack{$\tiny$\color{Cdecomp}-\num{#3} {}}\stackText}{-\num{\fpeval{0-#3}}\stackMath\Longstack{$\tiny$\color{Cdecomp}+\num{\fpeval{0-#3}} {}}\stackText}}&amp;=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3==0}{}{\xintifboolexpr{#3&gt;0}{\stackMath\Longstack{$\tiny$\color{Cdecomp}-\num{#3} {}}\stackText}{\stackMath\Longstack{$\tiny$\color{Cdecomp}+\num{\fpeval{0-#3}} {}}\stackText}}\\
            \xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#4&gt;0}{\stackMath\Longstack{$\tiny$\color{Cdecomp}-\num{#4}\useKV[ClesEquation]{Lettre} {}}\stackText}{\stackMath\Longstack{$\tiny$\color{Cdecomp}+\num{\fpeval{0-#4}}\useKV[ClesEquation]{Lettre} {}}\stackText}&amp;=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#4&gt;0}{\stackMath\Longstack{$\tiny$\color{Cdecomp}-\num{#4}\useKV[ClesEquation]{Lettre} {}}\stackText}{\stackMath\Longstack{$\tiny$\color{Cdecomp}+\num{\fpeval{0-#4}}\useKV[ClesEquation]{Lettre} {}}\stackText}\xintifboolexpr{#3==0}{}{\xintifboolexpr{#3&gt;0}{-\num{#3}}{+\num{\fpeval{0-#3}}}}\\
            \xdef\Coeffa{\fpeval{#2-#4}}\xdef\Coeffb{\fpeval{0-#3}}%\\
            \xintifboolexpr{\Coeffa==1}{\useKV[ClesEquation]{Lettre}}{\color{Cdecomp}\frac{\cancel{\color{black}\num{\Coeffa}}\color{black}\useKV[ClesEquation]{Lettre}}{\cancel{\num{\Coeffa}}}}&amp;=\xintifboolexpr{\Coeffa==1}{\num{\Coeffb}}{\color{Cdecomp}\frac{\color{black}\num{\Coeffb}}{\num{\Coeffa}}}%\\
            \xintifboolexpr{\Coeffa==1}{}{\\}
            \xintifboolexpr{\Coeffa==1}{% 
            }{%\ifnum\cmtd&gt;1
            \useKV[ClesEquation]{Lettre}&amp;=\frac{\num{\Coeffb}}{\num{\Coeffa}}%\\
            %% decimal
            \ifboolKV[ClesEquation]{Decimal}{%
            \\\useKV[ClesEquation]{Lettre}&amp;=\num{\fpeval{\Coeffb/\Coeffa}}%
                                            }{}%
                                        %%%
            \ifboolKV[ClesEquation]{Entier}{%
            \SSimpliTest{\Coeffb}{\Coeffa}%
            \ifboolKV[ClesEquation]{Simplification}{%
            \ifthenelse{\boolean{Simplification}}{\\\useKV[ClesEquation]{Lettre}&amp;=\SSimplifie{\Coeffb}{\Coeffa}}{}%\\
            }{}
            }{}
            }
          \end{align*}
          %\ifboolKV[ClesEquation]{Solution}{L'Ã©quation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3&gt;0}{+\num{#3}}{-\num{\fpeval{0-#3}}}=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}$ a une unique solution : \opdiv*{\Coeffb}{\Coeffa}{solution}{resteequa}\opcmp{resteequa}{0}$\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}{}\displaystyle\ifopeq\opexport{solution}{\solution}\num{\solution}\else\ifboolKV[ClesEquation]{Entier}{\SSimplifie{\Coeffb}{\Coeffa}}{\frac{\num{\Coeffb}}{\num{\Coeffa}}}\fi$.}{}
        }{%ax+b=cx avec a&lt;c              % Autre cas dÃ©licat
          \begin{align*}%
            \xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#4&gt;0}{\stackMath\Longstack{$\tiny$\color{Cdecomp}-\num{#4}\useKV[ClesEquation]{Lettre} {}}\stackText}{\stackMath\Longstack{$\tiny$\color{Cdecomp}+\num{\fpeval{0-#4}}\useKV[ClesEquation]{Lettre} {}}\stackText}\xintifboolexpr{#3==0}{}{\xintifboolexpr{#3&gt;0}{+\num{#3}}{-\num{\fpeval{0-#3}}}}&amp;=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#4&gt;0}{\stackMath\Longstack{$\tiny$\color{Cdecomp}-\num{#4}\useKV[ClesEquation]{Lettre} {}}\stackText}{\stackMath\Longstack{$\tiny$\color{Cdecomp}+\num{\fpeval{0-#4}}\useKV[ClesEquation]{Lettre} {}}\stackText}\\
            \xdef\Coeffa{\fpeval{#2-#4}}\xdef\Coeffb{\fpeval{0-#3}}%\\
            \xintifboolexpr{\Coeffa==1}{}{\num{\Coeffa}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3==0}{}{\xintifboolexpr{#3&gt;0}{+\num{#3}\stackMath\Longstack{$\tiny$\color{Cdecomp}-\num{#3} {}}\stackText}{-\num{\fpeval{0-#3}}\stackMath\Longstack{$\tiny$\color{Cdecomp}+\num{\fpeval{0-#3}} {}}\stackText}}&amp;=0\xintifboolexpr{#3==0}{}{\xintifboolexpr{#3&gt;0}{\stackMath\Longstack{$\tiny$\color{Cdecomp}-\num{#3} {}}\stackText}{\stackMath\Longstack{$\tiny$\color{Cdecomp}+\num{\fpeval{0-#3}} {}}\stackText}}\\
            \xintifboolexpr{\Coeffa==1}{\useKV[ClesEquation]{Lettre}}{\color{Cdecomp}\frac{\cancel{\color{black}\num{\Coeffa}}\color{black}\useKV[ClesEquation]{Lettre}}{\cancel{\num{\Coeffa}}}}&amp;=\xintifboolexpr{\Coeffa==1}{\num{\Coeffb}}{\color{Cdecomp}\frac{\color{black}\num{\Coeffb}}{\num{\Coeffa}}}%\\
            \xintifboolexpr{\Coeffa==1}{}{\\}
            \xintifboolexpr{\Coeffa==1}{% 
            }{%\ifnum\cmtd&gt;1
            \useKV[ClesEquation]{Lettre}&amp;=\frac{\num{\Coeffb}}{\num{\Coeffa}}%\\
            %% decimal
            \ifboolKV[ClesEquation]{Decimal}{%
            \\\useKV[ClesEquation]{Lettre}&amp;=\num{\fpeval{\Coeffb/\Coeffa}}%
                                        }{}%
                                        %%%
            \ifboolKV[ClesEquation]{Entier}{%
            \SSimpliTest{\Coeffb}{\Coeffa}%
            \ifboolKV[ClesEquation]{Simplification}{%
            \ifthenelse{\boolean{Simplification}}{\\\useKV[ClesEquation]{Lettre}&amp;=\SSimplifie{\Coeffb}{\Coeffa}}{}%\\
            }{}
            }{}
            }
          \end{align*}
          %\ifboolKV[ClesEquation]{Solution}{L'Ã©quation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3&gt;0}{+\num{#3}}{-\num{\fpeval{0-#3}}}=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}$ a une unique solution : \opdiv*{\Coeffb}{\Coeffa}{solution}{resteequa}\opcmp{resteequa}{0}$\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}{}\displaystyle\ifopeq\opexport{solution}{\solution}\num{\solution}\else\ifboolKV[ClesEquation]{Entier}{\SSimplifie{\Coeffb}{\Coeffa}}{\frac{\num{\Coeffb}}{\num{\Coeffa}}}\fi$.}{}%
        }%
        \ifboolKV[ClesEquation]{Solution}{\EcrireSolutionEquation{#2}{#3}{#4}{#5}}{}%
      }%
    }%
  }%
  \fi
}%

\newcommand\ResolEquationLaurent[5][]{%
  \useKVdefault[ClesEquation]%
  \setKV[ClesEquation]{#1}%
  \xintifboolexpr{#2==0}{%
    \xintifboolexpr{#4==0}{%
      \xintifboolexpr{#3==#5}{%b=d
        L'Ã©quation $\num{#3}=\num{#5}$ a une infinitÃ© de solutions.}%
      {%b&lt;&gt;d
        L'Ã©quation $\num{#3}=\num{#5}$ n'a aucune solution.%
      }%
    }%
    {%0x+b=cx+d
      \EquaDeuxLaurent[#1]{#4}{#5}{0}{#3}%
    }%
  }{%
    \xintifboolexpr{#4==0}{%ax+b=0x+d
      \EquaDeuxLaurent[#1]{#2}{#3}{0}{#5}%
    }
    {%ax+b=cx+d
      \xintifboolexpr{#3==0}{%
        \xintifboolexpr{#5==0}{%ax=cx
          \EquaTroisLaurent[#1]{#2}{0}{#4}{0}%
        }%
        {%ax=cx+d
          \EquaTroisLaurent[#1]{#4}{#5}{#2}{0}%
        }%
      }%
      {\xintifboolexpr{#5==0}{%ax+b=cx
          \EquaTroisLaurent[#1]{#2}{#3}{#4}{0}%
        }%
        {%ax+b=cx+d -- ici
          \xintifboolexpr{#2==#4}{%
            \xintifboolexpr{#3==#5}{%b=d
              L'Ã©quation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3&gt;0}{+\num{#3}}{-\num{\fpeval{0-#3}}}=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#5&gt;0}{+\num{#5}}{-\num{\fpeval{0-#5}}}$ a une infinitÃ© de solutions.}%
            {%b&lt;&gt;d
              L'Ã©quation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3&gt;0}{+\num{#3}}{-\num{\fpeval{0-#3}}}=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#5&gt;0}{+\num{#5}}{-\num{\fpeval{0-#5}}}$ n'a aucune solution.%
            }%
          }{%% Cas dÃ©licat
            \xintifboolexpr{#2&gt;#4}{%ax+b=cx+d avec a&gt;c
              \begin{align*}
                \xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3&gt;0}{+\num{#3}\stackMath\Longstack{$\tiny$\color{Cdecomp}-\num{#3} {}}\stackText}{-\num{\fpeval{0-#3}}\stackMath\Longstack{$\tiny$\color{Cdecomp}+\num{\fpeval{0-#3}} {}}\stackText}&amp;=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#5&gt;0}{+\num{#5}}{-\num{\fpeval{0-#5}}}\xintifboolexpr{#3&gt;0}{\stackMath\Longstack{$\tiny$\color{Cdecomp}-\num{#3} {}}\stackText}{\stackMath\Longstack{$\tiny$\color{Cdecomp}+\num{\fpeval{0-#3}} {}}\stackText}\\
                \xdef\Coeffa{\fpeval{#2-#4}}\xdef\Coeffb{\fpeval{#5-#3}}%\\
                \xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#4&gt;0}{\stackMath\Longstack{$\tiny$\color{Cdecomp}-\num{#4}\useKV[ClesEquation]{Lettre} {}}\stackText}{\stackMath\Longstack{$\tiny$\color{Cdecomp}+\num{\fpeval{0-#4}}\useKV[ClesEquation]{Lettre} {}}\stackText}&amp;=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#4&gt;0}{\stackMath\Longstack{$\tiny$\color{Cdecomp}-\num{#4}\useKV[ClesEquation]{Lettre} {}}\stackText}{\stackMath\Longstack{$\tiny$\color{Cdecomp}+\num{\fpeval{0-#4}}\useKV[ClesEquation]{Lettre} {}}\stackText}\xintifboolexpr{\Coeffb&gt;0}{+\num{\Coeffb}}{-\num{\fpeval{0-\Coeffb}}}\\
                \xintifboolexpr{\Coeffa==1}{\useKV[ClesEquation]{Lettre}}{\color{Cdecomp}\frac{\cancel{\color{black}\num{\Coeffa}}\color{black}\useKV[ClesEquation]{Lettre}}{\cancel{\num{\Coeffa}}}}&amp;=\xintifboolexpr{\Coeffa==1}{\num{\Coeffb}}{\color{Cdecomp}\frac{\color{black}\num{\Coeffb}}{\num{\Coeffa}}}%\\
                \xintifboolexpr{\Coeffa==1}{}{\\}
                \xintifboolexpr{\Coeffa==1}{% 
                }{%\ifnum\cmtd&gt;1
                \useKV[ClesEquation]{Lettre}&amp;=\frac{\num{\Coeffb}}{\num{\Coeffa}}%\\
                %% decimal
                \ifboolKV[ClesEquation]{Decimal}{%
                \\\useKV[ClesEquation]{Lettre}&amp;=\num{\fpeval{\Coeffb/\Coeffa}}%
                                        }{}%
                                        %%%
                \ifboolKV[ClesEquation]{Entier}{%
                \SSimpliTest{\Coeffb}{\Coeffa}%
                \ifboolKV[ClesEquation]{Simplification}{%
                \ifthenelse{\boolean{Simplification}}{\\\useKV[ClesEquation]{Lettre}&amp;=\SSimplifie{\Coeffb}{\Coeffa}}{}%\\
                }{}
                }{}
                }
              \end{align*}
              %\ifboolKV[ClesEquation]{Solution}{L'Ã©quation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3&gt;0}{+\num{#3}}{-\num{\fpeval{0-#3}}}=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#5&gt;0}{+\num{#5}}{-\num{\fpeval{0-#5}}}$ a une unique solution : \opdiv*{\Coeffb}{\Coeffa}{solution}{resteequa}\opcmp{resteequa}{0}$\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}{}\displaystyle\ifopeq\opexport{solution}{\solution}\num{\solution}\else\ifboolKV[ClesEquation]{Entier}{\SSimplifie{\Coeffb}{\Coeffa}}{\frac{\num{\Coeffb}}{\num{\Coeffa}}}\fi$.}{}
            }{%ax+b=cx+d avec a&lt;c              % Autre cas dÃ©licat
              \begin{align*}%
                \xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3&gt;0}{+\num{#3}}{-\num{\fpeval{0-#3}}}\xintifboolexpr{#3&gt;0}{\stackMath\Longstack{$\tiny$\color{Cdecomp}-\num{#3} {}}\stackText}{\stackMath\Longstack{$\tiny$\color{Cdecomp}+\num{\fpeval{0-#3}} {}}\stackText}%
                &amp;=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#5&gt;0}{+\num{#5}}{-\num{\fpeval{0-#5}}}\xintifboolexpr{#3&gt;0}{\stackMath\Longstack{$\tiny$\color{Cdecomp}-\num{#3} {}}\stackText}{\stackMath\Longstack{$\tiny$\color{Cdecomp}+\num{\fpeval{0-#3}} {}}\stackText}
                \\
                \xdef\Coeffa{\fpeval{#2-#4}}\xdef\Coeffb{\fpeval{#5-#3}}%\\
                \xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#4&gt;0}{\stackMath\Longstack{$\tiny$\color{Cdecomp}-\num{#4}\useKV[ClesEquation]{Lettre} {}}\stackText}{\stackMath\Longstack{$\tiny$\color{Cdecomp}+\num{\fpeval{0-#4}}\useKV[ClesEquation]{Lettre} {}}\stackText}&amp;=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#4&gt;0}{\stackMath\Longstack{$\tiny$\color{Cdecomp}-\num{#4}\useKV[ClesEquation]{Lettre} {}}\stackText}{\stackMath\Longstack{$\tiny$\color{Cdecomp}+\num{\fpeval{0-#4}}\useKV[ClesEquation]{Lettre} {}}\stackText}\xintifboolexpr{\Coeffb&gt;0}{+\num{\Coeffb}}{-\num{\fpeval{0-\Coeffb}}}\\
                \xintifboolexpr{\Coeffa==1}{\useKV[ClesEquation]{Lettre}}{\color{Cdecomp}\frac{\cancel{\color{black}\num{\Coeffa}}\color{black}\useKV[ClesEquation]{Lettre}}{\cancel{\num{\Coeffa}}}}&amp;=\xintifboolexpr{\Coeffa==1}{\num{\Coeffb}}{\color{Cdecomp}\frac{\color{black}\num{\Coeffb}}{\num{\Coeffa}}}%\\
                \xintifboolexpr{\Coeffa==1}{}{\\}
                \xintifboolexpr{\Coeffa==1}{% 
                }{%\ifnum\cmtd&gt;1
                \useKV[ClesEquation]{Lettre}&amp;=\frac{\num{\Coeffb}}{\num{\Coeffa}}%\\
                %% decimal
                \ifboolKV[ClesEquation]{Decimal}{%
                \\\useKV[ClesEquation]{Lettre}&amp;=\num{\fpeval{\Coeffb/\Coeffa}}%
                                                }{}%
                                        %%%
                \ifboolKV[ClesEquation]{Entier}{%
                \SSimpliTest{\Coeffb}{\Coeffa}%
                \ifboolKV[ClesEquation]{Simplification}{%
                \ifthenelse{\boolean{Simplification}}{\\\useKV[ClesEquation]{Lettre}&amp;=\SSimplifie{\Coeffb}{\Coeffa}}{}%\\
                }{}
                }{}
                }
              \end{align*}
              %\ifboolKV[ClesEquation]{Solution}{L'Ã©quation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3&gt;0}{+\num{#3}}{-\num{\fpeval{0-#3}}}=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#5&gt;0}{+\num{#5}}{-\num{\fpeval{0-#5}}}$ a une unique solution : \opdiv*{\Coeffb}{\Coeffa}{solution}{resteequa}\opcmp{resteequa}{0}$\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}{}\displaystyle\ifopeq\opexport{solution}{\solution}\num{\solution}\else\ifboolKV[ClesEquation]{Entier}{\SSimplifie{\Coeffb}{\Coeffa}}{\frac{\num{\Coeffb}}{\num{\Coeffa}}}\fi$.}{}%
            }%
            \ifboolKV[ClesEquation]{Solution}{\EcrireSolutionEquation{#2}{#3}{#4}{#5}}{}%
          }%
        }%
      }%
    }%
  }%
}%</pre></body></html>