summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/tablor/tablor.sty
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2008-01-19 14:55:20 +0000
committerNorbert Preining <preining@logic.at>2008-01-19 14:55:20 +0000
commit9bca56189bb3edc83bf64b0088ef5a52b07e3b36 (patch)
treeddd6f446085e1b22c5bf2a9c75aeaf828b53d882 /Master/texmf-dist/tex/latex/tablor/tablor.sty
parent53f5c9b6fd4fe0cde4c661cc8d252d571392b66f (diff)
new package tablor, put into mathextra
git-svn-id: svn://tug.org/texlive/trunk@6313 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/tablor/tablor.sty')
-rw-r--r--Master/texmf-dist/tex/latex/tablor/tablor.sty726
1 files changed, 726 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/tablor/tablor.sty b/Master/texmf-dist/tex/latex/tablor/tablor.sty
new file mode 100644
index 00000000000..fa48fb7905c
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/tablor/tablor.sty
@@ -0,0 +1,726 @@
+
+\NeedsTeXFormat{LaTeX2e}[1995/12/01]
+\ProvidesPackage{tablor}
+ [17/01/2008 v1.2
+ la machine à créer des tableaux de signes et variations]
+
+
+
+%% Crée 5 environnements :
+%% tableau de signes de 2 facteurs affines
+% \begin{TSa}
+% TSa(-2,3,-1,5,1);
+% \end{TSa}
+% %%%%%% Pour des tableaux de plus de 2 facteurs
+%
+% \begin{TS}
+% TS([-2*x+3,x^2-1,x^2+1,x-1,x^2-2],2);
+% \end{TS}
+%
+% pour les tableaux de signes avec quotient
+%\begin{TSq}
+%TSq("Q",[-2*x+3,-4*x+5],[x^2-16,x-2],3)
+%%\end{TSq}
+% un tableau de variation :
+%
+% \begin{TV}
+% TV([0,+infinity],[0],"h","x",ln(x)-(ln(x))^2,1,4)
+% \end{TV}
+%
+% tableau avec valeurs intermédiares
+%\begin{TVI}
+%TVI([-1,+infinity],[-1],"f","x",x2/sqrt(x+1)-1,1,2,1)
+%\end{TVI}
+%%%
+
+
+
+\newcommand{\nettoyer}{
+\immediate\write18{rm XCasmp.mp* XCasmp.log XCasmp?.mp* XCasmp?.log XCasmpTV.mp* XCasmpTV.log *.out XCasmpTVI.mp* XCasmpTVI.log
+ *.in *.meta *mpx*}}
+
+\newcommand{\bouger}[1]{
+\immediate\write18{cp XCas* #1}}
+
+
+\newcommand{\recup}[2]{
+\immediate\write18{cp #1 #2}}
+
+
+
+\newcounter{TVn}
+
+
+\usepackage{fancyvrb}
+%\usepackage[upright]{fourier}
+
+\makeatletter
+\newcommand{\executGiacmp}[1]{
+\immediate\write18{giac <#1 } }
+\makeatother
+
+
+\begin{VerbatimOut}{XcasTV.meta}
+TV(L,F,nom,nomv,f,ftt,nmr):={
+nl:=size(L);
+f:=unapply(f,x);
+fp:=fonction_derivee(f);
+Z:=concat(L,F);
+S:=resoudre(fp(x),x);
+ si size(S)>0 alors pour j de 0 jusque size(S)-1 faire
+ kk:=(evalf(S[j])>=evalf(L[0])) and (evalf(S[j])<=evalf(L[nl-1]));
+ if(kk==1){Z:=append(Z,simplifier(S[j]))};
+ fpour
+ fsi;
+
+Z:=sort(Z);
+nz:=size(Z);
+ si Z[0]==Z[1] alors Z:=augment(Z[0],Z[2..nz-1]);nz:=nz-1;
+ fsi;
+pour u de 1 jusque nz-2 faire
+ si Z[u]==Z[u+1] alors Z:=augment(Z[0..u-1],Z[u+1..nz-1]);nz:=nz-1;
+ fsi;
+fpour;
+nz:=size(Z);
+l0:=" newLigneVariables(btex $"+nomv+"$ etex);";lp:=" "; lf:=" ";lsp:=" ";
+pour m de 0 jusque nz-1 faire l0:=l0+"val(btex $"+latex(Z[m])+"$ etex);";fpour;
+
+ k0:= evalf(limite(f(x),x=Z[0],1))> evalf(limite(f(x),x=Z[1],-1));
+ kz:=evalf(limite(f(x),x=Z[nz-1],-1))> evalf(limite(f(x),x=Z[nz-2],1));
+
+lsi:="newLigneSignes(btex $\\hbox{ Signe de }\\atop{\\displaystyle "+nom+"'("+nomv+")}$ etex);"+
+ if(Z[0]==-infinity){if(sign(evalf(fp(if(Z[1]==+infinity){0}else{Z[1]-10^(-5)})))==1){"plus;"}else{"moins;"}}else{if(member(Z[0],F)==0){
+ if(sign(fp(Z[0]+10^(-5)))==1){"plus;"}else{"moins;"}}else{"nonDefBarre;"+
+ if(sign(fp((Z[0]+10^(-5))))==1){"plus;"}else{"moins;"} }}
+
+if(nz>2){ for(r:=1; r<=nz-2;r++){ ksp:=evalf(fp(Z[r]+0.01))>0;
+ lsp:=lsp+if(member(Z[r],F)==0){"valBarre(btex 0 etex);"}else{"nonDefBarre;"}+
+ if(ksp==1){"plus;"}else{"moins;"}
+ }; }
+
+lsf:=if(member(Z[nz-1],F)==0){""}else{"nomDefBarre;"}
+lm0:=limite(f(x),x=Z[0],1)==-infinity;
+ li:="newLigneVariations(btex $\\hbox{\\bf Variations de }\\atop{\\displaystyle \\Mathbold{"+nom+"}}$ etex);"+
+ if(member(Z[0],F)==0){"valPos(btex $"+if(lm0==1){"-\\infty"}else{latex(simplifier(limite(f(x),x=Z[0],1)))}+"$ etex,"}
+ else{"nonDefBarre;limDroite(btex $"+if(lm0==1){"-\\infty"}else{latex(simplifier(limite(f(x),x=Z[0],1)))}+"$ etex,"}+
+ if(k0==1){"1"}else{"0"}+
+ ");";
+
+ if(nz>2){ for(r:=1; r<=nz-2;r++){ krm:=evalf(limite(f(x),x=Z[r-1],1))< evalf(limite(f(x),x=Z[r],-1));
+ krp:=evalf(limite(f(x),x=Z[r],1))> evalf(limite(f(x),x=Z[r+1],-1)) ;
+ lmrm:=limite(f(x),x=Z[r],-1)==-infinity;lmrp:=limite(f(x),x=Z[r],1)==-infinity;
+ lp:=lp+if(member(Z[r],F)){
+ "limGauche(btex $"+if(lmrm==1){"-\\infty"}else{latex(simplifier(limite(f(x),x=Z[r],-1)))}+"$ etex,"+if(krm==1){"1);"}else{"0);"}+"nonDefBarre;limDroite(btex $"+if(lmrp==1){"-\\infty"}else{latex(simplifier(limite(f(x),x=Z[r],1)))}+"$ etex,"+if(krp==1){"1);"}else{"0);"}}
+ else{"valPos(btex $"+latex(simplifier(f(Z[r])))+"$ etex,"+if(sign(evalf(fp(Z[r]-0.01)))==sign(fp(Z[r]+0.01))){"0.5);"}else{if(krp==1){"1);"}else{"0);"}}}
+ }; }
+
+lnz:=limite(f(x),x=Z[nz-1],-1)==-infinity;
+ lf:=if(member(Z[nz-1],F)==0){"valPos(btex $"+if(lnz==1){"-\\infty"}else{latex(simplifier(limite(f(x),x=Z[nz-1],-1)))}+"$ etex,"}else{"nonDefBarre;limGauche(btex $"+if(lnz==1){"-\\infty"}else{latex(simplifier(limite(f(x),x=Z[nz-1],-1)))}+"$ etex,"}+
+ if(kz==1){"1);"}else{"0);"};
+
+
+intro:="input tableauVariation;
+ verbatimtex
+%&latex
+ \\documentclass{article}
+ \\usepackage[upright]{fourier}
+ \\usepackage{amsmath}
+ \\newcommand{\\Mathbold}[1]{\\mbox{\\boldmath$#1$\\unboldmath}}
+ \\begin{document}
+ etex
+
+"
+
+
+MetaL:= if(ftt==0){if(nz>2){intro+"beginTableau("+nmr+")"+
+ l0+
+li+
+lp+
+lf
++"endTableau;
+end";}else{intro+"beginTableau("+nmr+")"+
+ l0+
+li+
+lf
++"endTableau;
+end";}}else{
+if(nz>2){intro+"beginTableau("+nmr+")"+
+ l0+
+lsi+lsp+lsf+
+li+
+lp+
+lf
++"endTableau;
+end";}else{intro+"beginTableau("+nmr+")"+
+ l0+
+lsi+lsf+
+li+
+lf
++"endTableau;
+end";}
+}
+
+return(MetaL);
+ }:;
+
+
+
+\end{VerbatimOut}
+
+\begin{VerbatimOut}{XcasTVI.meta}
+
+
+TVI(L,F,nom,nomv,f,ftt,ao,nmr):={
+nl:=size(L);
+f:=unapply(f,x);
+fp:=fonction_derivee(f);
+Z:=concat(L,F);
+S:=resoudre(fp(x),x);
+ si size(S)>0 alors pour j de 0 jusque size(S)-1 faire
+ kk:=(evalf(S[j])>=evalf(L[0])) and (evalf(S[j])<=evalf(L[nl-1]));
+ if(kk==1){Z:=append(Z,simplifier(S[j]))};
+ fpour
+ fsi;
+
+Z:=sort(Z);
+nz:=size(Z);
+ si Z[0]==Z[1] alors Z:=augment(Z[0],Z[2..nz-1]);nz:=nz-1;
+ fsi;
+pour u de 1 jusque nz-2 faire
+ si Z[u]==Z[u+1] alors Z:=augment(Z[0..u-1],Z[u+1..nz-1]);nz:=nz-1;
+ fsi;
+fpour;
+nz:=size(Z);
+l0:=" newLigneVariables(btex $"+nomv+"$ etex);";lp:=" "; lf:=" ";lsp:=" ";
+
+
+
+LI:=limite(f(x),x,Z[0],1);
+LF:=limite(f(x),x,Z[nz-1],-1);
+LP:=NULL;
+if(nz>2){ for(r:=1; r<=nz-2;r++){LP:=LP,if(member(Z[r],F)){limite(f(x),x,Z[r],-1),limite(f(x),x,Z[r],1)}else{f(Z[r])}}};
+if(nz>2){ LL:=[LI,LP,LF]}else{LL:=[LI,LF]};
+
+NL:=size(LL);
+A:=NULL;aa:=1;kk:=0;
+
+if(NL==nz){for(k:=0;k<nz-1;k++){TestS:=(sign(evalf(LL[k]-ao))==sign(evalf(LL[k+1]-ao))) or (sign(evalf(LL[k]-ao))==0.0)or (sign(evalf(LL[k+1]-ao))==0.0);
+if(TestS==0){A:=A,aa;l0:=l0+"val(btex $"+latex(Z[k])+"$ etex);"+"val(btex $\\alpha_"+aa+"$ etex);";aa:=aa+1;}else{l0:=l0+"val(btex $"+latex(Z[k])+"$ etex);"}}
+l0:=l0+"val(btex $"+latex(Z[nz-1])+"$ etex);"};
+
+if(NL>nz){for(k:=0;k<NL-1;k++){TestS:=(sign(evalf(LL[k]-ao))==sign(evalf(LL[k+1]-ao))) or (sign(evalf(LL[k]-ao))==0.0)or (sign(evalf(LL[k+1]-ao))==0.0);
+TestL:=(abs(LL[k])==abs(LL[k+1]));
+if(TestS==0){ if( TestL==1 ){l0:=l0}else{
+A:=A,aa;l0:=l0+"val(btex $"+latex(Z[kk])+"$ etex);"+"val(btex $\\alpha_"+aa+"$ etex);";aa:=aa+1;kk:=kk+1}}else{l0:=l0+"val(btex $"+latex(Z[kk])+"$ etex);";kk:=kk+1}}
+l0:=l0+"val(btex $"+latex(Z[nz-1])+"$ etex);"};
+
+
+
+TestS:=(sign(evalf(LL[0]-ao))==sign(evalf(LL[1]-ao))) or (sign(evalf(LL[0]-ao))==0.0) or (sign(evalf(LL[1]-ao))==0.0);
+ k0:= evalf(limite(f(x),x=Z[0],1))> evalf(limite(f(x),x=Z[1],-1));
+ kz:=evalf(limite(f(x),x=Z[nz-1],-1))> evalf(limite(f(x),x=Z[nz-2],1));
+
+lsi:="newLigneSignes(btex $\\hbox{ Signe de }\\atop{\\displaystyle "+nom+"'("+nomv+")}$ etex);"+
+ if(Z[0]==-infinity){if(sign(evalf(fp(if(Z[1]==+infinity){0}else{Z[1]-10^(-5)})))==1){"plus;"}else{"moins;"}}else{if(member(Z[0],F)==0){
+ if(sign(fp((Z[0]+10^(-10))))==1){"plus;"}else{"moins;"}}else{"nonDefBarre;"+
+ if(sign(fp(10^(-10)+Z[0]))==1){"plus;"}else{"moins;"} }}+if(TestS==0){"valBarre(btex$ $ etex);"+ if(sign(fp(10^(-10)+Z[0]))==1){"plus;"}else{"moins;"}}else{" "};
+
+
+
+
+
+if(nz>2){rr:=1; if(nz==NL){for(r:=1; r<=NL-2;r++){ TestS:=(sign(evalf(LL[r]-ao))==sign(evalf(LL[r+1]-ao))) or (sign(evalf(LL[r]-ao))==0.0)or (sign(evalf(LL[r+1]-ao))==0.0);
+ ksp:=evalf(fp(Z[r]+0.01))>0;
+ TestL:=(abs(LL[r])==abs(LL[r+1]));
+ lsp:=lsp+if(member(Z[r],F)==0){"valBarre(btex 0 etex);"}else{"nonDefBarre;"}+
+ if(ksp==1){"plus;"}else{"moins;"}+if(TestS==0){"valBarre(btex $ $ etex);"}else{" "}+if(TestS==0){if(ksp==1){"plus;"}else{"moins;"}}else{" "};
+ }}
+else{for(r:=1; r<=NL-2;r++){kspp:=evalf(fp(Z[rr]+0.01))>0;TestS:=(sign(evalf(LL[r]-ao))==sign(evalf(LL[r+1]-ao))) or (sign(evalf(LL[r]-ao))==0.0)or (sign(evalf(LL[r+1]-ao))==0.0);
+ TestL:=(abs(LL[r])==abs(LL[r+1]));
+ if(TestS==0){if( TestL==1 ){lsp:=lsp}else{lsp:=lsp+if(member(Z[rr],F)==0){"valBarre(btex 0 etex);"}else{"nonDefBarre;"}+
+ if(kspp==1){"plus;"}else{"moins;"}+"valBarre(btex $ $ etex);"+if(kspp==1){"plus;"}else{"moins;"};rr:=rr+1;}
+ } else{lsp:=lsp+if(member(Z[rr],F)==0){"valBarre(btex 0 etex);"}else{"nonDefBarre;"}+
+ if(kspp==1){"plus;"}else{"moins;"};rr:=rr+1;}
+}}
+ };
+
+
+
+lsf:=if(member(Z[nz-1],F)==0){""}else{"nomDefBarre;"}
+lm0:=limite(f(x),x=Z[0],1)==-infinity;
+
+TestS:=(sign(evalf(LL[0]-ao))==sign(evalf(LL[1]-ao))) or (sign(evalf(LL[0]-ao))==0.0) or (sign(evalf(LL[1]-ao))==0.0);
+
+ li:="newLigneVariations(btex $\\hbox{\\bf Variations de }\\atop{\\displaystyle \\Mathbold{"+nom+"}}$ etex);"+
+ if(member(Z[0],F)==0){"valPos(btex $"+if(lm0==1){"-\\infty"}else{latex(simplifier(limite(f(x),x=Z[0],1)))}+"$ etex,"}
+ else{"nonDefBarre;limDroite(btex $"+if(lm0==1){"-\\infty"}else{latex(simplifier(limite(f(x),x=Z[0],1)))}+"$ etex,"}+
+ if(k0==1){"1);"}else{"0);"}+if(TestS==0){"valPos(btex $ "+ao+" $ etex,0.5);"}else{" "};
+
+
+ if(nz>2){if(nz==NL){for(r:=1; r<=nz-2;r++){TestS:=(sign(evalf(LL[r]-ao))==sign(evalf(LL[r+1]-ao))) or (sign(evalf(LL[r]-ao))==0.0)or (sign(evalf(LL[r+1]-ao))==0.0);
+ krm:=evalf(limite(f(x),x=Z[r-1],1))< evalf(limite(f(x),x=Z[r],-1));
+ krp:=evalf(limite(f(x),x=Z[r],1))> evalf(limite(f(x),x=Z[r+1],-1)) ;
+ lmrm:=limite(f(x),x=Z[r],-1)==-infinity;lmrp:=limite(f(x),x=Z[r],1)==-infinity;
+ lp:=lp+if(member(Z[r],F)) {
+ "limGauche(btex $"+if(lmrm==1){"-\\infty"}else{latex(simplifier(limite(f(x),x=Z[r],-1)))}+"$ etex,"+if(krm==1){"1);"}else{"0);"}+"nonDefBarre;limDroite(btex $"+if(lmrp==1){"-\\infty"}else{latex(simplifier(limite(f(x),x=Z[r],1)))}+"$ etex,"+if(krp==1){"1);"}else{"0);"}}
+ else{"valPos(btex $"+latex(simplifier(f(Z[r])))+"$
+ etex,"+if(sign(evalf(fp(Z[r]-0.01)))==sign(fp(Z[r]+0.01))){"0.5);"}else{if(krp==1){"1);"}else{"0);"}}}+if(TestS==0){"valPos(btex
+ $ "+ao+" $ etex,0.5);"
+ }else{" "};
+};//for
+}else{rr:=1;for(r:=1; r<=NL-2;r++){TestS:=(sign(evalf(LL[r]-ao))==sign(evalf(LL[r+1]-ao))) or (sign(evalf(LL[r]-ao))==0.0)or (sign(evalf(LL[r+1]-ao))==0.0);
+ krm:=evalf(limite(f(x),x=Z[rr-1],1))< evalf(limite(f(x),x=Z[rr],-1));
+ krp:=evalf(limite(f(x),x=Z[rr],1))> evalf(limite(f(x),x=Z[rr+1],-1)) ;
+ lmrm:=limite(f(x),x=Z[rr],-1)==-infinity;lmrp:=limite(f(x),x=Z[rr],1)==-infinity; TestL:=(abs(LL[r])==abs(LL[r+1]));
+if(TestS==0){if( TestL==1 ){lp:=lp}else{ lp:=lp+if(member(Z[rr],F)) {
+ "limGauche(btex $"+if(lmrm==1){"-\\infty"}else{latex(simplifier(limite(f(x),x=Z[rr],-1)))}+"$ etex,"+if(krm==1){"1);"}else{"0);"}+"nonDefBarre;limDroite(btex $"+if(lmrp==1){"-\\infty"}else{latex(simplifier(limite(f(x),x=Z[rr],1)))}+"$ etex,"+if(krp==1){"1);"}else{"0);"}}
+ else{"valPos(btex $"+latex(simplifier(f(Z[rr])))+"$
+ etex,"+if(sign(evalf(fp(Z[rr]-0.01)))==sign(fp(Z[rr]+0.01))){"0.5);"}else{if(krp==1){"1);"}else{"0);"}}}+"valPos(btex
+ $ "+ao+" $ etex,0.5);
+ ";rr:=rr+1;
+}// else testL==1
+}//testS==0
+else{lp:=lp+if(member(Z[rr],F)){
+ "limGauche(btex $"+if(lmrm==1){"-\\infty"}else{latex(simplifier(limite(f(x),x=Z[rr],-1)))}+"$ etex,"+if(krm==1){"1);"}else{"0);"}+"nonDefBarre;limDroite(btex $"+if(lmrp==1){"-\\infty"}else{latex(simplifier(limite(f(x),x=Z[rr],1)))}+"$ etex,"+if(krp==1){"1);"}else{"0);"}}
+ else{"valPos(btex $"+latex(simplifier(f(Z[rr])))+"$
+ etex,"+if(sign(evalf(fp(Z[rr]-0.01)))==sign(fp(Z[rr]+0.01))){"0.5);"}else{if(krp==1){"1);"}else{"0);
+ "}}};rr:=rr+1;
+}//else testS==0
+}//for nz<NL
+}// else nz<NL
+//if nz=NL
+};//if nz>2
+
+
+lnz:=limite(f(x),x=Z[nz-1],-1)==-infinity;
+ lf:=if(member(Z[nz-1],F)==0){"valPos(btex $"+if(lnz==1){"-\\infty"}else{latex(simplifier(limite(f(x),x=Z[nz-1],-1)))}+"$ etex,"}else{"nonDefBarre;limGauche(btex $"+if(lnz==1){"-\\infty"}else{latex(simplifier(limite(f(x),x=Z[nz-1],-1)))}+"$ etex,"}+
+ if(kz==1){"1);"}else{"0);"};
+
+
+
+intro:="
+input tableauVariation;
+verbatimtex
+%&latex
+ \\documentclass{article}
+ \\usepackage[upright]{fourier}
+ \\usepackage{amsmath}
+ \\newcommand{\\Mathbold}[1]{\\mbox{\\boldmath$#1$\\unboldmath}}
+ \\begin{document}
+ etex
+
+";
+
+
+MetaL:= if(ftt==0){if(nz>2){intro+"beginTableau("+nmr+")"+
+ l0+
+li+
+lp+
+lf
++"endTableau;
+end";}else{intro+"beginTableau("+nmr+")"+
+ l0+
+li+
+lf
++"endTableau;
+end";}}else{
+if(nz>2){intro+"beginTableau("+nmr+")"+
+ l0+
+lsi+lsp+lsf+
+li+
+lp+
+lf
++"endTableau;
+end";}else{intro+"beginTableau("+nmr+")"+
+ l0+
+lsi+lsf+
+li+
+lf
++"endTableau;
+end";}
+};
+
+return(MetaL);
+ }:;
+
+
+
+\end{VerbatimOut}
+
+
+
+
+
+
+
+
+
+
+\begin{VerbatimOut}{XcasTabSignL.meta}
+TS(L,nmr):={
+L:=apply(f->unapply(f,x),L)
+n:=size(L);
+Z:=NULL;
+
+
+pour k de 0 jusque n-1 faire
+ S:=resoudre(L[k](x),x);
+ si size(S)>0 alors pour j de 0 jusque size(S)-1 faire
+ Z:=Z,simplifier(S[j]);
+ fpour;
+ fsi;
+fpour;
+Z:=sort(Z);
+nz:=size(Z);
+pour u de 1 jusque nz-2 faire
+ si Z[u]==Z[u+1] alors Z:=Z[0..u-1],Z[u+1..nz-1];nz:=nz-1;
+ fsi;
+fpour;
+nz:=size(Z);
+l0:=" ";li:=" ";lr:=" ";
+pour m de 0 jusque nz-1 faire l0:=l0+"val(btex $"+latex(Z[m])+"$ etex);";fpour;
+
+
+
+for(p:=0;p<=n-1;p++){lp:=" ";
+ li:=li+"newLigneSignes(btex $\\hbox{\\bf Signe de }\\atop{\\displaystyle \\Mathbold{"+latex(L[p](x))+"}}$ etex);"+
+ if(L[p](Z[0]-1.0)>0){"plus;"}else{"moins;"}+
+ for(r:=0; r<=nz-2;r++){
+ lp:=lp+if(simplifier(L[p](Z[r]))==0){"valBarre(btex 0 etex);"}else{"barre;"}+
+ if(L[p]((Z[r]+Z[r+1])*.5)>0){"plus;"}else{"moins;"}}+
+ if(simplifier(L[p](Z[nz-1]))==0){"valBarre(btex 0 etex);"}else{"barre;"}+
+ if(L[p](Z[nz-1]+1.0)>0){"plus;"}else{"moins;"}
+ };
+
+
+pour t de 0 jusque nz-2 faire
+ lr:=lr+if(product(L[s]((Z[t]+Z[t+1])*.5),s,0,n-1)>0){"plus;"}else{"moins;"}+"valBarre(btex 0 etex);"
+ fpour
+
+MetaL:=" input tableauVariation;
+ verbatimtex
+%&latex
+ \\documentclass{article}
+ \\usepackage[upright]{fourier}
+ \\usepackage{amsmath}
+ \\newcommand{\\Mathbold}[1]{\\mbox{\\boldmath$#1$\\unboldmath}}
+ \\begin{document}
+ etex
+ beginTableau("+nmr+")
+newLigneVariables(btex $\\Mathbold{x}$ etex);
+ val(btex $-\\infty$ etex);"+l0+"val(btex $+\\infty$ etex);"+
+ li
+ +
+ " newLigneSignes(btex $\\hbox{\\bf Signe du }\\atop{{\\bf produit}}$ etex);"+
+ if(product(L[s](Z[0]-1.0),s,0,n-1)>0){"plus;"}else{"moins;"}+"valBarre(btex 0 etex);"+
+ lr+
+ if(product(L[s](Z[nz-1]+1.0),s,0,n-1)>0){"plus;"}else{"moins;"}+"
+endTableau;
+end"
+;
+return(MetaL);
+ }:;
+\end{VerbatimOut}
+
+
+
+
+
+
+
+
+
+\begin{VerbatimOut}{XcasTabSignQ.meta}
+TSq(nomf,L,Fo,nmr):={
+L:=apply(f->unapply(f,x),L);
+Fo:=apply(f->unapply(f,x),Fo);
+L:=concat(L,Fo);
+n:=size(L);
+Z:=NULL;
+m:=size(Fo);
+F:=NULL;
+
+
+
+pour k de 0 jusque n-1 faire
+ S:=resoudre(L[k](x),x);
+ si size(S)>0 alors pour j de 0 jusque size(S)-1 faire
+ Z:=Z,simplifier(S[j]);
+ fpour;
+ fsi;
+fpour;
+
+
+pour k de 0 jusque m-1 faire
+ SF:=resoudre(Fo[k](x),x);
+ si size(SF)>0 alors pour j de 0 jusque size(SF)-1 faire
+ F:=F,simplifier(SF[j]);
+ fpour;
+ fsi;
+fpour;
+
+
+
+Z:=sort(Z); // on classe les zéros dans l'ordre croissant
+nz:=size(Z);
+pour u de 1 jusque nz-2 faire
+ si Z[u]==Z[u+1] alors Z:=Z[0..u-1],Z[u+1..nz-1];nz:=nz-1; // pour les zéros en double
+ fsi;
+fpour;
+nz:=size(Z);
+l0:=" ";li:=" ";lr:=" ";
+pour m de 0 jusque nz-1 faire l0:=l0+"val(btex $"+latex(Z[m])+"$ etex);";fpour;
+
+
+
+for(p:=0;p<=n-1;p++){lp:=" ";
+ li:=li+"newLigneSignes(btex $\\hbox{\\bf Signe de }\\atop{\\displaystyle \\Mathbold{"+latex(L[p](x))+"}}$ etex);"+
+ if(L[p](Z[0]-1.0)>0){"plus;"}else{"moins;"}+
+ for(r:=0; r<=nz-2;r++){
+ lp:=lp+if(simplifier(L[p](Z[r]))==0){"
+ valBarre(btex 0 etex);"}else{"barre;"}+
+ if(L[p]((Z[r]+Z[r+1])*.5)>0){"plus;"}else{"moins;"}}+
+ if(simplifier(L[p](Z[nz-1]))==0){"valBarre(btex 0 etex);"}else{"barre;"}+
+ if(L[p](Z[nz-1]+1.0)>0){"plus;"}else{"moins;
+ "}
+ };
+
+
+pour t de 0 jusque nz-2 faire
+ lr:=lr+if(product(L[s]((Z[t]+Z[t+1])*.5),s,0,n-1)>0){"plus;"}else{"moins;"}+if(member(Z[t+1],F)==0){"valBarre(btex 0 etex);"}else{"nonDefBarre;"}
+ fpour
+
+MetaL:=" input tableauVariation;
+ verbatimtex
+%&latex
+ \\documentclass{article}
+ \\usepackage[upright]{fourier}
+ \\usepackage{amsmath}
+ \\newcommand{\\Mathbold}[1]{\\mbox{\\boldmath$#1$\\unboldmath}}
+ \\begin{document}
+ etex
+ beginTableau("+nmr+")
+newLigneVariables(btex $\\Mathbold{x}$ etex);
+ val(btex $-\\infty$ etex);"+l0+"val(btex $+\\infty$ etex);"+
+ li
+ +
+ " newLigneSignes(btex $\\hbox{\\bf Signe de }\\atop{\\bf "+nomf+"(x) }$ etex);"+
+ if(product(L[s](Z[0]-1.0),s,0,n-1)>0){"plus;"}else{"moins;"}+if(member(Z[0],F)==0){"valBarre(btex 0 etex);"}else{"nonDefBarre;"}+
+ lr+
+ if(product(L[s](Z[nz-1]+1.0),s,0,n-1)>0){"plus;"}else{"moins;"}+"
+endTableau;
+end"
+;
+return(MetaL);
+ }:;
+
+
+\end{VerbatimOut}
+
+\begin{VerbatimOut}{XcasTabSign.meta}
+TSa(a,b,c,d,nmr):={
+zA:=resoudre(a*x+b=0,x)[0];
+zB:=resoudre(c*x+d=0,x)[0];
+zmin:=min(zA,zB);
+zmax:=max(zA,zB);
+ Meta:= " input tableauVariation;
+ verbatimtex
+%&latex
+ \\documentclass{article}
+ \\usepackage[upright]{fourier}
+ \\usepackage{amsmath}
+ \\newcommand{\\Mathbold}[1]{\\mbox{\\boldmath$#1$\\unboldmath}}
+ \\begin{document}
+ etex
+ beginTableau("+nmr+")
+ newLigneVariables(btex $\\Mathbold{x}$ etex);
+ val(btex $-\\infty$ etex);val(btex $"+latex(zmin)+"$ etex);
+val(btex $"+latex(zmax)+"$etex);
+val(btex $+\\infty$ etex);
+ newLigneSignes(btex $\\hbox{\\bf Signe de }\\atop{\\displaystyle \\Mathbold{"+if(a==1){"x+"}else{if(a==-1){"-x+"}else{a+"x+"}}+b+"}}$ etex);"
+ + if(a>0){"moins;"}else{"plus;"}+
+ if(zmin==zA){"valBarre(btex 0 etex);"}else{"barre;"}+
+ if(zmin==zA){si a>0 alors "plus;"; sinon "moins;";fsi}
+ else{si a>0 alors "moins;"; sinon "plus;"; fsi}+
+ if(zmin==zA){"barre;"}else{"valBarre(btex 0 etex);"}+
+ if(a>0){"plus;"}else{"moins;"}
+ +" newLigneSignes(btex $\\hbox{\\bf Signe de }\\atop{\\displaystyle \\Mathbold{"+if(c==1){"x+"}else{if(c==-1){"-x+"}else{c+"x+"}}+d+"}}$ etex);"
+ + if(c>0){"moins"}else{"plus"}+";"+
+ if(zmin==zB){"valBarre(btex 0 etex);"}else{"barre;"}+
+ if(zmin==zB){si c>0 alors "plus;"; sinon "moins;";fsi}
+ else{si c>0 alors "moins;"; sinon "plus;"; fsi}+
+ if(zmin==zB){"barre;"}else{"valBarre(btex 0 etex);"}+
+ if(c>0){"plus;"}else{"moins;"}
+
+ +" newLigneSignes(btex $\\hbox{\\bf Signe de }\\atop{\\displaystyle \\Mathbold{("+if(a==1){"x+"}else{if(a==-1){"-x+"}else{a+"x+"}}+b+")("+if(c==1){"x+"}else{if(c==-1){"-x+"}else{c+"x+"}}+d+")}}$ etex);"
+ + si a*c>0 alors plus; sinon moins;fsi+";"+
+ "valBarre(btex 0 etex);"+
+ si a*c>0 alors moins; sinon plus;fsi+";"+
+ "valBarre(btex 0 etex);"+
+ si a*c>0 alors plus; sinon moins;fsi+";"+"
+endTableau;
+end"
+;
+return(Meta);
+ }:;
+\end{VerbatimOut}
+
+
+
+
+\begin{VerbatimOut}{XCas.in}
+maple_mode(0);
+read("XcasTabSign.meta");
+Sortie:=fopen("XCasmp.mp");
+vect.xcas.out := read("XCas.out");
+vxo := vect.xcas.out;
+dim.vxo := dim(vxo);
+nbr.line.vxo := dim.vxo;
+Resultat:=cat(" ");
+rslt := vxo[0]; RslT:=cat(rslt);
+Resultat:=cat(Resultat,RslT);
+fprint(Sortie,Unquoted,Resultat);
+fclose(Sortie);
+\end{VerbatimOut}
+
+\newenvironment{TSa}
+{\stepcounter{TVn}\VerbatimEnvironment\begin{VerbatimOut}{XCas.out}}
+{\end{VerbatimOut}
+ \executGiacmp{XCas.in}
+
+ \immediate\write18{mpost XCasmp}
+
+\begin{center}
+ \includegraphics{XCasmp.\theTVn}
+\end{center}
+
+}
+
+
+\begin{VerbatimOut}{XCasQ.in}
+maple_mode(0);
+read("XcasTabSignQ.meta");
+Sortie:=fopen("XCasmpQ.mp");
+vect.xcas.out := read("XCasQ.out");
+vxo := vect.xcas.out;
+dim.vxo := dim(vxo);
+nbr.line.vxo := dim.vxo;
+Resultat:=cat(" ");
+rslt := vxo[0]; RslT:=cat(rslt);
+Resultat:=cat(Resultat,RslT);
+fprint(Sortie,Unquoted,Resultat);
+fclose(Sortie);
+\end{VerbatimOut}
+
+\newenvironment{TSq}
+{\stepcounter{TVn}\VerbatimEnvironment\begin{VerbatimOut}{XCasQ.out}}
+{\end{VerbatimOut}
+ \executGiacmp{XCasQ.in}
+
+ \immediate\write18{mpost XCasmpQ}
+
+\begin{center}
+ \includegraphics{XCasmpQ.\theTVn}
+\end{center}
+
+}
+
+
+
+\begin{VerbatimOut}{XCasL.in}
+maple_mode(0);
+read("XcasTabSignL.meta");
+Sortie:=fopen("XCasmpL.mp");
+vect.xcas.out := read("XCasL.out");
+vxo := vect.xcas.out;
+dim.vxo := dim(vxo);
+nbr.line.vxo := dim.vxo;
+Resultat:=cat(" ");
+rslt := vxo[0]; RslT:=cat(rslt);
+Resultat:=cat(Resultat,RslT);
+fprint(Sortie,Unquoted,Resultat);
+fclose(Sortie);
+\end{VerbatimOut}
+
+\newenvironment{TS}
+{\stepcounter{TVn}\VerbatimEnvironment\begin{VerbatimOut}{XCasL.out}}
+{\end{VerbatimOut}
+ \executGiacmp{XCasL.in}
+
+ \immediate\write18{mpost XCasmpL}
+
+\begin{center}
+ \includegraphics{XCasmpL.\theTVn}
+\end{center}
+
+}
+
+
+
+
+
+
+\begin{VerbatimOut}{XCasTV.in}
+maple_mode(0);
+read("XcasTV.meta");
+Sortie:=fopen("XCasmpTV.mp");
+vect.xcas.out := read("XCasTV.out");
+vxo := vect.xcas.out;
+dim.vxo := dim(vxo);
+nbr.line.vxo := dim.vxo;
+Resultat:=cat(" ");
+rslt := vxo[0]; RslT:=cat(rslt);
+Resultat:=cat(Resultat,RslT);
+fprint(Sortie,Unquoted,Resultat);
+fclose(Sortie);
+\end{VerbatimOut}
+\newenvironment{TV}
+{\stepcounter{TVn}\VerbatimEnvironment\begin{VerbatimOut}{XCasTV.out}}
+{\end{VerbatimOut}
+ \executGiacmp{XCasTV.in}
+
+ \immediate\write18{mpost XCasmpTV}
+
+\begin{center}
+ \includegraphics{XCasmpTV.\theTVn}
+\end{center}
+
+}
+
+
+
+
+\begin{VerbatimOut}{XCasTVI.in}
+maple_mode(0);
+read("XcasTVI.meta");
+Sortie:=fopen("XCasmpTVI.mp");
+vect.xcas.out := read("XCasTVI.out");
+vxo := vect.xcas.out;
+dim.vxo := dim(vxo);
+nbr.line.vxo := dim.vxo;
+Resultat:=cat(" ");
+rslt := vxo[0]; RslT:=cat(rslt);
+Resultat:=cat(Resultat,RslT);
+fprint(Sortie,Unquoted,Resultat);
+fclose(Sortie);
+\end{VerbatimOut}
+\newenvironment{TVI}
+{\stepcounter{TVn}\VerbatimEnvironment\begin{VerbatimOut}{XCasTVI.out}}
+{\end{VerbatimOut}
+ \executGiacmp{XCasTVI.in}
+
+ \immediate\write18{mpost XCasmpTVI}
+
+\begin{center}
+ \includegraphics{XCasmpTVI.\theTVn}
+\end{center}
+
+}
+
+
+
+
+
+
+%%
+%% Zi end