diff options
author | Karl Berry <karl@freefriends.org> | 2009-04-20 00:11:54 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2009-04-20 00:11:54 +0000 |
commit | 66177f74989fac44bc5003990547ae9fcb5e8b00 (patch) | |
tree | 6b7378caf0dfd78309958f2246b7c319478abe16 /Master/texmf-dist/doc/latex/tablor/tablor.html | |
parent | b3594201954d5e5c7b4894579aeddaa5c0112c1c (diff) |
tablor update (19apr09)
git-svn-id: svn://tug.org/texlive/trunk@12753 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/tablor/tablor.html')
-rw-r--r-- | Master/texmf-dist/doc/latex/tablor/tablor.html | 739 |
1 files changed, 371 insertions, 368 deletions
diff --git a/Master/texmf-dist/doc/latex/tablor/tablor.html b/Master/texmf-dist/doc/latex/tablor/tablor.html index 82dfd03264f..50dfc3084de 100644 --- a/Master/texmf-dist/doc/latex/tablor/tablor.html +++ b/Master/texmf-dist/doc/latex/tablor/tablor.html @@ -87,7 +87,7 @@ <body> <pre> <span class="font-latex-sedate">\NeedsTeXFormat</span>{LaTeX2e}[1995/12/01] -<span class="font-latex-sedate">\ProvidesPackage</span>{<span class="flyspell-duplicate">tablor</span>}[17/03/2009 v4.04-b la machine a creer des tableaux de signes et variations] +<span class="font-latex-sedate">\ProvidesPackage</span>{<span class="flyspell-duplicate">tablor</span>}[19/04/2009 v4.04-d la machine a creer des tableaux de signes et variations] <span class="comment-delimiter">% </span><span class="font-latex-sedate"><span class="comment">\copyleft</span></span><span class="comment"> Connan le Barbare (aka Guillaume Connan) </span><span class="font-latex-sedate"><span class="comment">\copyright</span></span><span class="comment"> </span><span class="comment-delimiter">% </span><span class="comment">This work may be distributed and/or mofified under the conditions @@ -161,7 +161,7 @@ </span><span class="comment-delimiter">% </span><span class="comment">fichier metapost pour le modifier </span><span class="comment-delimiter">%</span><span class="comment"> </span><span class="comment-delimiter">%</span><span class="comment"> -</span><span class="comment-delimiter">% </span><span class="comment">Courbes </span><span class="comment"><span class="flyspell-duplicate">parametrees</span></span><span class="comment"> +</span><span class="comment-delimiter">% </span><span class="comment">Courbes parametrees </span><span class="comment-delimiter">% </span><span class="font-latex-sedate"><span class="comment">\begin</span></span><span class="comment">{TVP} </span><span class="comment-delimiter">% </span><span class="comment">TVP([-infinity,+infinity],[[-1,2],[-1]],["x","y"],"t",[t^2/((t+1)*(t-2)),t^2*(t+2)/(t+1)],1,n,</span><span class="font-latex-sedate"><span class="comment">\tv</span></span><span class="comment">) </span><span class="comment-delimiter">% </span><span class="font-latex-sedate"><span class="comment">\end</span></span><span class="comment">{TVP} @@ -189,17 +189,17 @@ </span><span class="comment-delimiter">%% </span><span class="comment">ne l'avez pas de base </span> -<span class="font-latex-sedate">\RequirePackage</span>{<span class="flyspell-incorrect">filecontents</span>} -<span class="font-latex-sedate">\RequirePackage</span>{ifthen} +<span class="font-latex-sedate">\RequirePackage</span>{filecontents} +<span class="font-latex-sedate">\RequirePackage</span>{<span class="flyspell-incorrect">ifthen</span>} <span class="font-latex-sedate">\RequirePackage</span>{fancyvrb} -<span class="font-latex-sedate">\RequirePackage</span>{<span class="flyspell-duplicate">ifpdf</span>} +<span class="font-latex-sedate">\RequirePackage</span>{ifpdf} -<span class="font-latex-sedate">\fvset</span>{<span class="flyspell-incorrect">gobble</span>=0} +<span class="font-latex-sedate">\fvset</span>{gobble=0} -<span class="comment-delimiter">% </span><span class="comment">option xcas present +<span class="comment-delimiter">% </span><span class="comment">option xcas </span><span class="comment"><span class="flyspell-duplicate">present</span></span><span class="comment"> </span> -<span class="font-latex-sedate">\newboolean</span>{xcas}<span class="font-latex-sedate">\setboolean</span>{xcas}{<span class="flyspell-duplicate">false</span>} +<span class="font-latex-sedate">\newboolean</span>{xcas}<span class="font-latex-sedate">\setboolean</span>{xcas}{false} <span class="font-latex-sedate">\DeclareOption</span>{xcas}{<span class="font-latex-sedate">\setboolean</span>{xcas}{<span class="flyspell-incorrect">true</span>}} @@ -208,22 +208,22 @@ -<span class="comment-delimiter">%% </span><span class="comment">Initialisation du choix d'OS -</span><span class="font-latex-sedate">\newboolean</span>{windows}<span class="font-latex-sedate">\setboolean</span>{windows}{<span class="flyspell-duplicate">false</span>} +<span class="comment-delimiter">%% </span><span class="comment">Initialisation du choix </span><span class="comment"><span class="flyspell-incorrect">d'OS</span></span><span class="comment"> +</span><span class="font-latex-sedate">\newboolean</span>{windows}<span class="font-latex-sedate">\setboolean</span>{windows}{false} -<span class="comment-delimiter">%% </span><span class="comment">on configure tablor dans un fichier exterieur pour la </span><span class="comment"><span class="flyspell-incorrect">plateforme</span></span><span class="comment"> -</span><span class="comment-delimiter">%% </span><span class="comment">et l'editeur +<span class="comment-delimiter">%% </span><span class="comment">on configure tablor dans un fichier exterieur pour la plateforme +</span><span class="comment-delimiter">%% </span><span class="comment">et </span><span class="comment"><span class="flyspell-duplicate">l'editeur</span></span><span class="comment"> </span> -<span class="font-latex-sedate">\IfFileExists</span>{tablor.cfg}{<span class="font-latex-sedate"><span class="keyword">\input</span></span><span class="constant">{tablor.cfg}</span>}<span class="comment">%</span><span class="font-latex-sedate"><span class="comment">\typeout</span></span><span class="comment">{pas de fichier tablor.</span><span class="comment"><span class="flyspell-duplicate">cfg</span></span><span class="comment">}} +<span class="font-latex-sedate">\IfFileExists</span>{tablor.cfg}{<span class="font-latex-sedate"><span class="keyword">\input</span></span><span class="constant">{tablor.cfg}</span>}<span class="comment">%</span><span class="font-latex-sedate"><span class="comment">\typeout</span></span><span class="comment">{pas de fichier tablor.cfg}} </span> <span class="comment-delimiter">%% </span><span class="comment">Definit des commandes disque selon l'OS utilise -</span><span class="font-latex-sedate">\ifthenelse</span>{<span class="font-latex-sedate">\boolean</span>{windows}}<span class="comment">% +</span><span class="font-latex-sedate">\ifthenelse</span>{<span class="font-latex-sedate">\boolean</span>{<span class="flyspell-duplicate">windows</span>}}<span class="comment">% </span> {<span class="font-latex-sedate"><span class="keyword">\newcommand</span></span><span class="function-name">{</span><span class="font-latex-sedate"><span class="function-name">\rem</span></span><span class="function-name">}</span>{DEL } <span class="font-latex-sedate"><span class="keyword">\newcommand</span></span><span class="function-name">{</span><span class="font-latex-sedate"><span class="function-name">\cat</span></span><span class="function-name">}</span>{TYPE } <span class="font-latex-sedate"><span class="keyword">\newcommand</span></span><span class="function-name">{</span><span class="font-latex-sedate"><span class="function-name">\cp</span></span><span class="function-name">}</span>{COPY }}<span class="comment">% -</span> {<span class="font-latex-sedate"><span class="keyword">\newcommand</span></span><span class="function-name">{</span><span class="font-latex-sedate"><span class="function-name">\rem</span></span><span class="function-name">}</span>{rm }<span class="font-latex-sedate"><span class="keyword">\newcommand</span></span><span class="function-name">{</span><span class="font-latex-sedate"><span class="function-name">\cat</span></span><span class="function-name">}</span>{<span class="flyspell-duplicate">cat</span> } +</span> {<span class="font-latex-sedate"><span class="keyword">\newcommand</span></span><span class="function-name">{</span><span class="font-latex-sedate"><span class="function-name">\rem</span></span><span class="function-name">}</span>{rm }<span class="font-latex-sedate"><span class="keyword">\newcommand</span></span><span class="function-name">{</span><span class="font-latex-sedate"><span class="function-name">\cat</span></span><span class="function-name">}</span>{cat } <span class="font-latex-sedate"><span class="keyword">\newcommand</span></span><span class="function-name">{</span><span class="font-latex-sedate"><span class="function-name">\cp</span></span><span class="function-name">}</span>{<span class="flyspell-duplicate">cp</span> }} @@ -232,10 +232,10 @@ -<span class="comment-delimiter">%% </span><span class="comment">pour ceux compilant via pdflatex +<span class="comment-delimiter">%% </span><span class="comment">pour ceux compilant via </span><span class="comment"><span class="flyspell-incorrect">pdflatex</span></span><span class="comment"> </span> <span class="font-latex-sedate">\ifpdf</span> -<span class="font-latex-sedate">\DeclareGraphicsRule</span>{*}{<span class="flyspell-incorrect">mps</span>}{*}{} +<span class="font-latex-sedate">\DeclareGraphicsRule</span>{*}{mps}{*}{} <span class="font-latex-sedate">\fi</span> <span class="comment-delimiter">%% </span><span class="comment">pour nettoyer les fichiers auxiliaires @@ -246,10 +246,10 @@ -<span class="comment-delimiter">%% </span><span class="comment">Pour clore les fichiers </span><span class="comment"><span class="flyspell-duplicate">metapost</span></span><span class="comment"> +<span class="comment-delimiter">%% </span><span class="comment">Pour clore les fichiers metapost </span> - <span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>{queue.mp} + <span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>{queue.<span class="flyspell-duplicate">mp</span>} end @@ -264,7 +264,7 @@ <span class="font-latex-sedate"><span class="keyword">\newcommand</span></span><span class="function-name">{</span><span class="font-latex-sedate"><span class="function-name">\nettoyer</span></span><span class="function-name">}</span>[1][<span class="font-latex-sedate">\jobname</span>]<span class="comment">% -</span>{<span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{<span class="font-latex-sedate">\rem</span> #1.Tab.log queue.mp enteteMP.cfg session.tex config.<span class="flyspell-duplicate">cxx</span>} +</span>{<span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{<span class="font-latex-sedate">\rem</span> #1.Tab.log queue.mp enteteMP.cfg session.tex config.cxx} } @@ -277,7 +277,7 @@ <span class="comment-delimiter">%% </span><span class="comment">initialise les compteurs </span> -<span class="font-latex-sedate"><span class="keyword">\newcounter</span></span><span class="function-name">{</span><span class="function-name"><span class="flyspell-duplicate">TVn</span></span><span class="function-name">}</span> +<span class="font-latex-sedate"><span class="keyword">\newcounter</span></span><span class="function-name">{TVn}</span> <span class="font-latex-sedate"><span class="keyword">\newcommand</span></span><span class="function-name">{</span><span class="font-latex-sedate"><span class="function-name">\tv</span></span><span class="function-name">}</span>{<span class="font-latex-sedate">\theTVn</span>} <span class="font-latex-sedate"><span class="keyword">\newcounter</span></span><span class="function-name">{TVnbis}</span> @@ -285,7 +285,7 @@ -<span class="comment-delimiter">%% </span><span class="comment">permet de donner un prefixe aux tableaux produits (</span><span class="font-latex-sedate"><span class="comment">\jobname</span></span><span class="comment"> par </span><span class="comment"><span class="flyspell-duplicate">defaut</span></span><span class="comment">) +<span class="comment-delimiter">%% </span><span class="comment">permet de donner un prefixe aux tableaux produits (</span><span class="font-latex-sedate"><span class="comment">\jobname</span></span><span class="comment"> par defaut) </span><span class="comment-delimiter">%% </span><span class="comment">effectue quelques verifications : </span> @@ -294,16 +294,16 @@ </span><span class="font-latex-sedate"><span class="keyword">\setcounter</span></span><span class="variable-name">{TVn}{0}</span><span class="comment">% Initialisation du compteur de tableaux. </span><span class="font-latex-sedate">\ifthenelse</span>{<span class="font-latex-sedate">\boolean</span>{xcas}}<span class="comment">% Avec l'option XCas </span>{<span class="font-latex-sedate">\IfFileExists</span>{<span class="font-latex-sedate">\nomtravail</span>.Tab.mp}<span class="comment">% Si Tableaux.mp est present... -</span> {<span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{<span class="font-latex-sedate">\rem</span> <span class="font-latex-sedate">\nomtravail</span>.Tab.mp}}<span class="comment">% le </span><span class="comment"><span class="flyspell-incorrect">detruire</span></span><span class="comment"> +</span> {<span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{<span class="font-latex-sedate">\rem</span> <span class="font-latex-sedate">\nomtravail</span>.Tab.mp}}<span class="comment">% le detruire </span> {}<span class="comment">% -</span> <span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{<span class="font-latex-sedate">\cp</span> enteteMP.cfg <span class="font-latex-sedate">\nomtravail</span>.Tab.mp}<span class="comment">% Reconstituer l'entête de Tableaux.</span><span class="comment"><span class="flyspell-duplicate">mp</span></span><span class="comment"> +</span> <span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{<span class="font-latex-sedate">\cp</span> enteteMP.cfg <span class="font-latex-sedate">\nomtravail</span>.Tab.mp}<span class="comment">% Reconstituer l'entête de Tableaux.mp </span>} {<span class="font-latex-sedate">\IfFileExists</span>{<span class="font-latex-sedate">\nomtravail</span>.Tab.mp}<span class="comment">% Sans l'option XCas, si </span> <span class="comment">% Tableaux.mp existe </span>{<span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{mpost -interaction=batchmode <span class="font-latex-sedate">\nomtravail</span>.Tab}}<span class="comment">% l'executer pour reconstituer les figures </span>{<span class="font-latex-sedate">\PackageWarning</span>{tablor}{Pas de source metapost pour creer les tableaux.}}<span class="comment">% sinon message d'erreur </span> <span class="comment">% (mais pas d'arret car les tableaux -</span> <span class="comment">% peuvent être </span><span class="comment"><span class="flyspell-incorrect">presents</span></span><span class="comment"> ) +</span> <span class="comment">% peuvent être presents ) </span>}}<span class="comment">% </span> @@ -312,7 +312,7 @@ </span> <span class="font-latex-sedate">\makeatletter</span> <span class="font-latex-sedate"><span class="keyword">\newcommand</span></span><span class="function-name">{</span><span class="font-latex-sedate"><span class="function-name">\executGiacmp</span></span><span class="function-name">}</span>[1]{<span class="comment">% -</span><span class="font-latex-sedate">\ifthenelse</span>{<span class="font-latex-sedate">\boolean</span>{<span class="flyspell-duplicate">windows</span>}}<span class="comment">% +</span><span class="font-latex-sedate">\ifthenelse</span>{<span class="font-latex-sedate">\boolean</span>{windows}}<span class="comment">% </span>{<span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{giac #1 }}<span class="comment">% </span>{<span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{giac <#1 }}} <span class="font-latex-sedate">\makeatother</span> @@ -335,7 +335,7 @@ </span> <span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>{XcasTV.cxx} -<span class="flyspell-duplicate">TV</span>(L,F,nom,nomv,f,ftt,trigo,nmr):={ +TV(L,F,nom,nomv,f,ftt,trigo,nmr):={ nl:=size(L); f:=unapply(f,x); fp:=function_diff(f); @@ -347,13 +347,13 @@ if(trigo==t){ all_trig_solutions:=1; reset_solve_counter(-1,-1); SS:=solve(factor(simplify(fp(x))),x); -<span class="flyspell-duplicate">ns</span>:=size(SS); +ns:=size(SS); for(k:=0;k<ns;k++){ m:=0; while(evalf(simplify(subst(SS[k],n_1=m)))<=evalf(L[nl-1])){ S:=concat(S,simplify(subst(SS[k],n_1=m)));m:=m+1; };m:=-1; -<span class="flyspell-duplicate">while</span>(evalf(subst(SS[k],n_1=m))>=L[0]){ +while(evalf(subst(SS[k],n_1=m))>=L[0]){ S:=concat(S,simplify(subst(SS[k],n_1=m)));m:=m-1; } } @@ -366,14 +366,14 @@ S:=solve(fp(x),x); qq:=member(simplify(S[j]),Z)==0; kk:=(evalf(S[j])>=evalf(L[0])) and (evalf(S[j])<=evalf(L[nl-1])); if(kk==1){if(qq==1){Z:=append(Z,simplify(S[j]))}}; - <span class="flyspell-duplicate">fpour</span> + fpour fsi; Z:=sort(Z); nz:=size(Z); tantque evalf(Z[0])==evalf(Z[1]) faire Z:=Z[1..nz-1];nz:=size(Z); - <span class="flyspell-duplicate">ftantque</span>; + ftantque; @@ -385,7 +385,7 @@ nz:=size(Z); kk:=(evalf(S[j])>=evalf(L[0])) and (evalf(S[j])<=evalf(L[nl-1])); if(kk==1){Z:=append(Z,simplify(S[j]))}; fpour - <span class="flyspell-duplicate">fsi</span>; + fsi; Z:=sort([op(set[op(Z)])]); @@ -393,7 +393,7 @@ Z:=sort([op(set[op(Z)])]); nz:=size(Z); l0:=" newLigneVariables(btex <span class="font-latex-math">$"+nomv+"$</span> etex);";lp:=" "; lf:=" ";lsp:=" "; pour m de 0 jusque nz-1 faire l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[m])+"$</span> etex); -";<span class="flyspell-duplicate">fpour</span>; +";fpour; k0:= evalf(limit(f(x),x=Z[0],1))> evalf(limit(f(x),x=Z[1],-1)); kz:=evalf(limit(f(x),x=Z[nz-1],-1))> evalf(limit(f(x),x=Z[nz-2],1)); @@ -430,16 +430,16 @@ lm0:=limit(f(x),x=Z[0],1)==-infinity; "}}} }; } -lnz:=limit(f(x),x=Z[nz-1],-1)==-<span class="flyspell-duplicate">infinity</span>; +lnz:=limit(f(x),x=Z[nz-1],-1)==-infinity; -lf:=if(member(Z[nz-1],F)==0){"valPos(<span class="flyspell-duplicate">btex</span> <span class="font-latex-math">$"+ +lf:=if(member(Z[nz-1],F)==0){"valPos(btex <span class="font-latex-math">$"+ if(lnz==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[nz-1],-1)))}+"$</span> etex,"+ if(kz==1){"1);"}else{"0);"}} - else{"limGauche(<span class="flyspell-duplicate">btex</span> <span class="font-latex-math">$"+ + else{"limGauche(btex <span class="font-latex-math">$"+ if(lnz==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[nz-1],-1)))}+"$</span> etex,"+ - if(kz==1){"1);nonDefBarre;"}else{"0);<span class="flyspell-duplicate">nonDefBarre</span>;"}}; + if(kz==1){"1);nonDefBarre;"}else{"0);nonDefBarre;"}}; @@ -447,15 +447,15 @@ lf:=if(member(Z[nz-1],F)==0){"valPos(<span class="flyspell-duplicate">btex</span MetaLfc:=if(ftt==2){if(nz>2){" -<span class="flyspell-duplicate">beginTableau</span>("+nmr+")"+ +beginTableau("+nmr+")"+ l0+lsi+lsp+lsf+" -<span class="flyspell-duplicate">endTableau</span>; +endTableau; ";}else{ -intro+"beginTableau("+<span class="flyspell-duplicate">nmr</span>+")"+ +intro+"beginTableau("+nmr+")"+ l0+ lsi+lsf+" -<span class="flyspell-duplicate">endTableau</span>; +endTableau; "; } @@ -465,39 +465,39 @@ li+ lp+ lf +" -<span class="flyspell-duplicate">endTableau</span>; +endTableau; ";}else{"beginTableau("+nmr+")"+ l0+ li+ -<span class="flyspell-duplicate">lf</span> +lf +" -<span class="flyspell-duplicate">endTableau</span>; +endTableau; ";}}else{ if(nz>2){"beginTableau("+nmr+")"+ l0+ -<span class="flyspell-duplicate">lsi</span>+lsp+lsf+ +lsi+lsp+lsf+ li+ -<span class="flyspell-duplicate">lp</span>+ +lp+ lf +" -<span class="flyspell-duplicate">endTableau</span>; +endTableau; -";}else{"beginTableau("+<span class="flyspell-duplicate">nmr</span>+")"+ +";}else{"beginTableau("+nmr+")"+ l0+ lsi+lsf+ li+ -<span class="flyspell-duplicate">lf</span> +lf +" -<span class="flyspell-duplicate">endTableau</span>; +endTableau; ";} }} sortie:=fopen("XCasmpfc.mp"); -<span class="flyspell-duplicate">fprint</span>(sortie,Unquoted,MetaLfc); +fprint(sortie,Unquoted,MetaLfc); fclose(sortie); @@ -533,13 +533,13 @@ S:=[]; if(trigo==t){ -<span class="flyspell-duplicate">all</span>_trig_solutions:=1; +all_trig_solutions:=1; reset_solve_counter(-1,-1); SS:=solve(factor(simplify(fp(x))),x); ns:=size(SS); for(k:=0;k<ns;k++){ m:=0; -<span class="flyspell-duplicate">while</span>(evalf(simplify(subst(SS[k],n_1=m)))<=evalf(L[nl-1])){ +while(evalf(simplify(subst(SS[k],n_1=m)))<=evalf(L[nl-1])){ S:=concat(S,simplify(subst(SS[k],n_1=m)));m:=m+1; };m:=-1; while(evalf(subst(SS[k],n_1=m))>=L[0]){ @@ -555,14 +555,14 @@ S:=solve(fp(x),x); qq:=member(simplify(S[j]),Z)==0; kk:=(evalf(S[j])>=evalf(L[0])) and (evalf(S[j])<=evalf(L[nl-1])); if(kk==1){if(qq==1){Z:=append(Z,simplify(S[j]))}}; - <span class="flyspell-duplicate">fpour</span> + fpour fsi; Z:=sort(Z); nz:=size(Z); tantque evalf(Z[0])==evalf(Z[1]) faire Z:=Z[1..nz-1];nz:=size(Z); - <span class="flyspell-duplicate">ftantque</span>; + ftantque; @@ -574,15 +574,15 @@ nz:=size(Z); kk:=(evalf(S[j])>=evalf(L[0])) and (evalf(S[j])<=evalf(L[nl-1])); if(kk==1){Z:=append(Z,simplify(S[j]))}; fpour - <span class="flyspell-duplicate">fsi</span>; + fsi; Z:=sort([op(set[op(Z)])]); -<span class="flyspell-duplicate">nz</span>:=size(Z); +nz:=size(Z); l0:=" newLigneVariables(btex <span class="font-latex-math">$"+nomv+"$</span> etex);";lp:=" "; lf:=" ";lsp:=" "; pour m de 0 jusque nz-1 faire l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[m])+"$</span> etex); -";<span class="flyspell-duplicate">fpour</span>; +";fpour; k0:= evalf(limit(f(x),x=Z[0],1))> evalf(limit(f(x),x=Z[1],-1)); kz:=evalf(limit(f(x),x=Z[nz-1],-1))> evalf(limit(f(x),x=Z[nz-2],1)); @@ -614,72 +614,72 @@ lm0:=limit(f(x),x=Z[0],1)==-infinity; "valPos(btex <span class="font-latex-math">$"+if(lmrm==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[r],-1)))}+"$</span> etex,"+if(krm==1){"1);"}else{"0);"} } - else{"valPos(btex <span class="font-latex-math">$"+latex(</span><span class="font-latex-math"><span class="flyspell-duplicate">simplify</span></span><span class="font-latex-math">(f(Z[r])))+"$</span> + else{"valPos(btex <span class="font-latex-math">$"+latex(simplify(f(Z[r])))+"$</span> etex,"+if(sign(evalf(fp(Z[r]-0.01)))==sign(fp(Z[r]+0.01))){"0.5);"}else{if(krp==1){"1);"}else{"0); "}}} }; } -<span class="flyspell-duplicate">lnz</span>:=limit(f(x),x=Z[nz-1],-1)==-<span class="flyspell-duplicate">infinity</span>; +lnz:=limit(f(x),x=Z[nz-1],-1)==-infinity; lf:=if(member(Z[nz-1],F)==0){"valPos(btex <span class="font-latex-math">$"+ if(lnz==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[nz-1],-1)))}+"$</span> etex,"+ if(kz==1){"1);"}else{"0);"}} - else{"limGauche(<span class="flyspell-duplicate">btex</span> <span class="font-latex-math">$"+ + else{"limGauche(btex <span class="font-latex-math">$"+ if(lnz==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[nz-1],-1)))}+"$</span> etex,"+ - if(kz==1){"1);"}<span class="flyspell-duplicate">else</span>{"0);"}}; + if(kz==1){"1);"}else{"0);"}}; -MetaLfc:=if(ftt==2){if(<span class="flyspell-duplicate">nz</span>>2){" +MetaLfc:=if(ftt==2){if(nz>2){" beginTableau("+nmr+")"+ l0+lsi+lsp+lsf+" -<span class="flyspell-duplicate">endTableau</span>; +endTableau; ";}else{ -<span class="flyspell-duplicate">intro</span>+"beginTableau("+nmr+")"+ +intro+"beginTableau("+nmr+")"+ l0+ lsi+lsf+" -<span class="flyspell-duplicate">endTableau</span>; +endTableau; "; } }else{ if(ftt==0){if(nz>2){"beginTableau("+nmr+")"+ l0+ li+ -<span class="flyspell-duplicate">lp</span>+ -<span class="flyspell-duplicate">lf</span> +lp+ +lf +" endTableau; -";}else{"beginTableau("+<span class="flyspell-duplicate">nmr</span>+")"+ +";}else{"beginTableau("+nmr+")"+ l0+ li+ -<span class="flyspell-duplicate">lf</span> +lf +" -<span class="flyspell-duplicate">endTableau</span>; +endTableau; ";}}else{ -if(nz>2){"beginTableau("+<span class="flyspell-duplicate">nmr</span>+")"+ +if(nz>2){"beginTableau("+nmr+")"+ l0+ lsi+lsp+lsf+ li+ lp+ -<span class="flyspell-duplicate">lf</span> +lf +" -<span class="flyspell-duplicate">endTableau</span>; +endTableau; ";}else{"beginTableau("+nmr+")"+ l0+ -<span class="flyspell-duplicate">lsi</span>+lsf+ +lsi+lsf+ li+ -<span class="flyspell-duplicate">lf</span> +lf +" -<span class="flyspell-duplicate">endTableau</span>; +endTableau; ";} }} @@ -687,7 +687,7 @@ li+ sortie:=fopen("XCasmpfc.mp"); fprint(sortie,Unquoted,MetaLfc); -<span class="flyspell-duplicate">fclose</span>(sortie); +fclose(sortie); }:; @@ -716,7 +716,7 @@ fprint(sortie,Unquoted,MetaLfc); TVZ(L,F,FF,nom,nomv,f,ftt,trigo,nmr):={ nl:=size(L); -nf:=size(<span class="flyspell-duplicate">FF</span>); +nf:=size(FF); Ff:=NULL;IMIN:=NULL;IMAX:=NULL; for(k:=0;k<nf;k++){ if(FF[k][0]>L[0]){Imin[k]:=FF[k][0];LL:=L}else{Imin[k]:=L[0];LL:=[L[1]]}; @@ -729,7 +729,7 @@ if(FF[k][1]<L[1]){Imax[k]:=FF[k][1];LL:=L}else{Imax[k]:=L[1];LL:=[L[0]]}; IMIN:=[IMIN]; IMAX:=[IMAX]; f:=unapply(f,x); -<span class="flyspell-duplicate">fp</span>:=function_diff(f); +fp:=function_diff(f); Z:=concat(LL,F); for(k:=0;k<nf;k++){ @@ -741,7 +741,7 @@ S:=[]; if(trigo==t){ all_trig_solutions:=1; -<span class="flyspell-duplicate">reset</span>_solve_counter(-1,-1); +reset_solve_counter(-1,-1); SS:=solve(factor(simplify(fp(x))),x); ns:=size(SS); for(k:=0;k<ns;k++){ @@ -770,7 +770,7 @@ S:=solve(fp(x),x); if(Kk==1){Z:=append(Z,simplify(S[j]))}; } fpour - <span class="flyspell-duplicate">fsi</span>; + fsi; Z:=sort([op(set[op(Z)])]); @@ -783,14 +783,14 @@ for(j:=0;j<nf;j++){ } } } -<span class="flyspell-duplicate">nz</span>:=size(Z); +nz:=size(Z); l0:=" newLigneVariables(btex <span class="font-latex-math">$"+nomv+"$</span> etex);";lp:=" "; lf:=" ";lsp:=" "; pour m de 0 jusque nz-1 faire l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[m])+"$</span> etex); -";<span class="flyspell-duplicate">fpour</span>; +";fpour; k0:= evalf(limit(f(x),x=Z[0],1))> evalf(limit(f(x),x=Z[1],-1)); - kz:=evalf(limit(f(x),x=Z[nz-1],-1))> evalf(limit(f(x),x=Z[<span class="flyspell-duplicate">nz</span>-2],1)); + kz:=evalf(limit(f(x),x=Z[nz-1],-1))> evalf(limit(f(x),x=Z[nz-2],1)); lsi:=lsic+nom+"'("+nomv+")}<span class="font-latex-math">$ etex);"+ if(member(Z[0],IMIN)!=0){if((member(Z[0],F)==0) and (fp(Z[0])!=undef)){"debutNonDef;"}else{"debutNonDefStrict;"}}else{if(Z[0]==-infinity){if(sign(evalf(fp(if(Z[1]==+infinity){0}else{Z[1]-10^</span><span class="font-latex-superscript"><span class="font-latex-math">(</span></span><span class="font-latex-math">-5)})))==1){"plus;"}else{"moins;"}}else{if(member(Z[0],F)==0){ @@ -802,7 +802,7 @@ if(member(Z[0],IMIN)!=0){if((member(Z[0],F)==0) and (fp(Z[0])!=undef)){"debutNon if(nz>2){ for(r:=1; r<=nz-2;r++){ ksp:=evalf(fp(Z[r]+0.01))>0; lsp:=lsp+if(member(Z[r],IMIN)!=0){if((member(Z[r],F)==0) and (fp(Z[r])!=undef)){"debutNonDef;"}else{"debutNonDefStrict;"}}else{ - if(member(Z[r],IMAX)!=0){if((member(Z[r],F)==0) and (fp(Z[r])!=undef)){"finNonDef;"}else{"</span><span class="font-latex-math"><span class="flyspell-duplicate">finNonDefStrict</span></span><span class="font-latex-math">;"}+ + if(member(Z[r],IMAX)!=0){if((member(Z[r],F)==0) and (fp(Z[r])!=undef)){"finNonDef;"}else{"finNonDefStrict;"}+ if(ksp==1){"plus;"}else{"moins;"}}else{ if(member(Z[r],F)==0){"valBarre(btex 0 etex);"}else{"nonDefBarre;"}+ if(ksp==1){"plus;"}else{"moins;"} @@ -810,7 +810,7 @@ if(nz>2){ for(r:=1; r<=nz-2;r++){ ksp:=evalf(fp(Z[r]+0.01))>0; -lsf:=if(member(Z[nz-1],IMAX)!=0){if((member(Z[nz-1],F)==0) and (fp(Z[nz-1])!=undef)){"finNonDef;"}else{"finNonDefStrict;"}}else{if(member(Z[nz-1],F)==0){""}else{"</span><span class="font-latex-math"><span class="flyspell-duplicate">nonDefBarre</span></span><span class="font-latex-math">; +lsf:=if(member(Z[nz-1],IMAX)!=0){if((member(Z[nz-1],F)==0) and (fp(Z[nz-1])!=undef)){"finNonDef;"}else{"finNonDefStrict;"}}else{if(member(Z[nz-1],F)==0){""}else{"nonDefBarre; "}} @@ -831,48 +831,48 @@ if(nz>2){ "-\\infty"}else{ latex(simplify(limit(f(x),x=Z[r],-1)))} +"$</span> etex,"+if(krm==1){ - "1);"}<span class="flyspell-duplicate">else</span>{"0);"} + "1);"}else{"0);"} +if(member(Z[r],F)==0){"debutNonDef;"}else{"debutNonDefStrict;"} - }//fsi Zr=<span class="flyspell-duplicate">Imin</span> + }//fsi Zr=Imin else{ if (member(Z[r],IMAX)!=0){if(member(Z[r],F)==0){"finNonDef;"}else{"finNonDefStrict;"}+"limDroite(btex <span class="font-latex-math">$"+if(lmrp==1){ "-\\infty"}else{latex(simplify(limit(f(x),x=Z[r],1)))} +"$</span> etex,"+if(krp==1){ - "1);"}<span class="flyspell-duplicate">else</span>{"0);"} + "1);"}else{"0);"} }else{ if(member(Z[r],F)){ "limGauche(btex <span class="font-latex-math">$"+if(lmrm==1){ "-\\infty"}else{ latex(simplify(limit(f(x),x=Z[r],-1)))} - +"$</span> etex,"+if(<span class="flyspell-duplicate">krm</span>==1){ + +"$</span> etex,"+if(krm==1){ "1);"}else{"0);"} +"nonDefBarre;limDroite(btex <span class="font-latex-math">$"+if(lmrp==1){ "-\\infty"}else{latex(simplify(limit(f(x),x=Z[r],1)))} - +"$</span> etex,"+if(<span class="flyspell-duplicate">krp</span>==1){ + +"$</span> etex,"+if(krp==1){ "1);"}else{"0);"} }//fsi (member Zr F) else{"valPos(btex<span class="font-latex-math">$"+latex(simplify(f(Z[r])))+"$</span>etex,"+ if(sign(evalf(fp(Z[r]-0.01)))==sign(fp(Z[r]+0.01))){ "0.5);"}else{ - if(<span class="flyspell-duplicate">krp</span>==1){ + if(krp==1){ "1);"}else{"0);"}//felse(krp) - }//felse(<span class="flyspell-incorrect">valpos</span>) + }//felse(valpos) }//felse(member Zr F) } //felse(Zr=Imax) }//felse(Zr=Imin) - };//<span class="flyspell-incorrect">ffor</span> + };//ffor }//fsi nz -<span class="flyspell-duplicate">lnz</span>:=limit(f(x),x=Z[nz-1],-1)==-infinity; +lnz:=limit(f(x),x=Z[nz-1],-1)==-infinity; -<span class="flyspell-duplicate">lf</span>:=if(member(Z[nz-1],F)==0){"valPos(btex <span class="font-latex-math">$"+ - if(lnz==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[nz-1],-1)))}+"$</span> <span class="flyspell-duplicate">etex</span>,"+ +lf:=if(member(Z[nz-1],F)==0){"valPos(btex <span class="font-latex-math">$"+ + if(lnz==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[nz-1],-1)))}+"$</span> etex,"+ if(kz==1){"1);"}else{"0);"}} else{"limGauche(btex <span class="font-latex-math">$"+ if(lnz==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[nz-1],-1)))}+"$</span> etex,"+ - if(kz==1){"1);nonDefBarre;"}else{"0);<span class="flyspell-duplicate">nonDefBarre</span>;"}}; + if(kz==1){"1);nonDefBarre;"}else{"0);nonDefBarre;"}}; @@ -880,32 +880,32 @@ if(nz>2){ MetaLfc:=if(ftt==2){if(nz>2){" -beginTableau("+<span class="flyspell-duplicate">nmr</span>+")"+ +beginTableau("+nmr+")"+ l0+lsi+lsp+lsf+" -<span class="flyspell-duplicate">endTableau</span>; +endTableau; ";}else{ intro+"beginTableau("+nmr+")"+ l0+ -<span class="flyspell-duplicate">lsi</span>+lsf+" -<span class="flyspell-duplicate">endTableau</span>; +lsi+lsf+" +endTableau; "; } -}else{ if(ftt==0){if(nz>2){"beginTableau("+<span class="flyspell-duplicate">nmr</span>+")"+ +}else{ if(ftt==0){if(nz>2){"beginTableau("+nmr+")"+ l0+ li+ -<span class="flyspell-duplicate">lp</span>+ +lp+ lf +" -<span class="flyspell-duplicate">endTableau</span>; +endTableau; -";}else{"beginTableau("+<span class="flyspell-duplicate">nmr</span>+")"+ +";}else{"beginTableau("+nmr+")"+ l0+ li+ lf +" -<span class="flyspell-duplicate">endTableau</span>; +endTableau; ";}}else{ if(nz>2){"beginTableau("+nmr+")"+ @@ -913,17 +913,17 @@ if(nz>2){"beginTableau("+nmr+")"+ lsi+lsp+lsf+ li+ lp+ -<span class="flyspell-duplicate">lf</span> +lf +" -<span class="flyspell-duplicate">endTableau</span>; +endTableau; ";}else{"beginTableau("+nmr+")"+ l0+ -<span class="flyspell-duplicate">lsi</span>+lsf+ +lsi+lsf+ li+ lf +" -<span class="flyspell-duplicate">endTableau</span>; +endTableau; ";} }} @@ -931,7 +931,7 @@ lf sortie:=fopen("XCasmpfc.mp"); fprint(sortie,Unquoted,MetaLfc); -<span class="flyspell-duplicate">fclose</span>(sortie); +fclose(sortie); } :; @@ -947,7 +947,7 @@ fprint(sortie,Unquoted,MetaLfc); </span> -<span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>{XcasTVapp.<span class="flyspell-duplicate">cxx</span>} +<span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>{XcasTVapp.cxx} @@ -955,7 +955,7 @@ fprint(sortie,Unquoted,MetaLfc); -<span class="flyspell-duplicate">TVapp</span>(L,F,nom,nomv,f,ftt,nmr):={ +TVapp(L,F,nom,nomv,f,ftt,nmr):={ nl:=size(L); @@ -969,18 +969,26 @@ nz:=size(z); -S:=NULL; -if(L==[-infinity,+infinity]){j:=[seq(-100+k,k=0..200)]minus F;for k in j do S:=S,fsolve(fp(x),x,k/10,<span class="flyspell-duplicate">newton</span>_solver);end_for} -else{if(L[0]==-infinity){j:=[seq(k,k=100..floor(L[1]))] minus F;for k in j do S:=S,fsolve(fp(x),x,k/10,newton_solver);end_for} -else{if(L[1]==+infinity){j:=[seq(k,k=floor(L[0])..100)] minus F;for k in j do S:=S,fsolve(fp(x),x,k/10,newton_solver);end_for;} -else{ j:=[seq(k,k=floor(z[0])..floor(z[nz-1]))] minus F;for k in j do S:=S,fsolve(fp(x),x,k/10,newton_<span class="flyspell-duplicate">solver</span>);end_for; }}}; +S:=op(fsolve(fp(x),x)); +if(L==[-infinity,+infinity]){j:=[seq(-100+k,k=0..200)]minus F; + for k in j do for(m:=-5;m<=5;m++){S:=S,fsolve(fp(x),x,k+m*0.1,newton_solver)};end_for} +else{if(L[0]==-infinity){j:=[seq(k,k=-100..floor(L[1]))] minus F; + for k in j do for(m:=-5;m<=5;m++){ S:=S,fsolve(fp(x),x,k+m*0.1,newton_solver)};end_for} +else{if(L[1]==+infinity){j:=[seq(k,k=floor(L[0])..100)] minus F; + for k in j do for(m:=-5;m<=5;m++){ S:=S,fsolve(fp(x),x,k+m*0.1,newton_solver)};end_for;} +else{ j:=[seq(k,k=floor(z[0])..floor(z[nz-1]))] minus F; + for k in j do + for(m:=-5;m<=5;m++){S:=S,fsolve(fp(x),x,k+m*0.1,newton_solver)};end_for; }}}; + + + si size(S)>0 alors pour j de 0 jusque size(S)-1 faire - kk:=(re(S[j])==S[j]);kok:=(evalf(S[j])>=L[0]) and (<span class="flyspell-duplicate">evalf</span>(S[j])<=L[1]); + kk:=(re(S[j])==S[j]);kok:=(evalf(S[j])>=L[0]) and (evalf(S[j])<=L[1]); if(kk==1){if(kok==1){z:=append(z,simplify(S[j]))}}; fpour; <span class="flyspell-duplicate">fsi</span>; @@ -1008,13 +1016,13 @@ Z:=[S]; nz:=size(Z); l0:=" newLigneVariables(btex <span class="font-latex-math">$"+nomv+"$</span> etex);";lp:=" "; lf:=" ";lsp:=" "; -pour m de 0 jusque nz-1 faire l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[m])+"$</span> <span class="flyspell-duplicate">etex</span>); -";<span class="flyspell-duplicate">fpour</span>; +pour m de 0 jusque nz-1 faire l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[m])+"$</span> etex); +";fpour; k0:= evalf(limit(f(x),x=Z[0],1))> evalf(limit(f(x),x=Z[1],-1)); kz:=evalf(limit(f(x),x=Z[nz-1],-1))> evalf(limit(f(x),x=Z[nz-2],1)); -lsi:=lsic+nom+"'("+nomv+")}<span class="font-latex-math">$ etex);"+ +<span class="flyspell-duplicate">lsi</span>:=lsic+nom+"'("+nomv+")}<span class="font-latex-math">$ etex);"+ if(Z[0]==-infinity){if(sign(evalf(fp(if(Z[1]==+infinity){0}else{Z[1]-10^</span><span class="font-latex-superscript"><span class="font-latex-math">(</span></span><span class="font-latex-math">-5)})))==1){"plus;"}else{"moins;"}}else{if(member(Z[0],F)==0){ if(fp(Z[0])==0){"valBarre(btex 0 etex);"}else{" "}+ if(sign(fp(Z[0]+10^</span><span class="font-latex-superscript"><span class="font-latex-math">(</span></span><span class="font-latex-math">-5)))==1){"plus;"}else{"moins;"}}else{"nonDefBarre;"+ @@ -1025,9 +1033,9 @@ if(nz>2){ for(r:=1; r<=nz-2;r++){ ksp:=evalf(fp(Z[r]+0.01))>0; if(ksp==1){"plus;"}else{"moins;"} }; } -lsf:=if(member(Z[nz-1],F)==0){""}else{"nonDefBarre; +</span><span class="font-latex-math"><span class="flyspell-duplicate">lsf</span></span><span class="font-latex-math">:=if(member(Z[nz-1],F)==0){""}else{"nonDefBarre; "} -lm0:=limit(f(x),x=Z[0],1)==-</span><span class="font-latex-math"><span class="flyspell-duplicate">infinity</span></span><span class="font-latex-math">; +lm0:=limit(f(x),x=Z[0],1)==-infinity; li:=lvic+nom+"}$</span> etex);"+ if(member(Z[0],F)==0){"valPos(btex <span class="font-latex-math">$"+if(lm0==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[0],1)))}+"$</span> etex,"} else{"nonDefBarre;limDroite(btex <span class="font-latex-math">$"+if(lm0==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[0],1)))}+"$</span> etex,"}+ @@ -1047,23 +1055,23 @@ lm0:=limit(f(x),x=Z[0],1)==-</span><span class="font-latex-math"><span class="fl lnz:=limit(f(x),x=Z[nz-1],-1)==-<span class="flyspell-duplicate">infinity</span>; -lf:=if(member(Z[nz-1],F)==0){"valPos(<span class="flyspell-duplicate">btex</span> <span class="font-latex-math">$"+ +lf:=if(member(Z[nz-1],F)==0){"valPos(btex <span class="font-latex-math">$"+ if(lnz==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[nz-1],-1)))}+"$</span> etex,"+ - if(kz==1){"1);"}else{"0);"}} - else{"limGauche(<span class="flyspell-duplicate">btex</span> <span class="font-latex-math">$"+ - if(lnz==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[nz-1],-1)))}+"$</span> <span class="flyspell-duplicate">etex</span>,"+ - if(kz==1){"1);nonDefBarre;"}else{"0);nonDefBarre;"}}; + if(kz==1){"1);"}<span class="flyspell-duplicate">else</span>{"0);"}} + else{"limGauche(btex <span class="font-latex-math">$"+ + if(lnz==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[nz-1],-1)))}+"$</span> etex,"+ + if(kz==1){"1);nonDefBarre;"}else{"0);<span class="flyspell-duplicate">nonDefBarre</span>;"}}; -MetaLfc:=if(ftt==2){if(<span class="flyspell-duplicate">nz</span>>2){" +MetaLfc:=if(ftt==2){if(nz>2){" -<span class="flyspell-duplicate">beginTableau</span>("+nmr+")"+ +beginTableau("+nmr+")"+ l0+lsi+lsp+lsf+" -endTableau; +<span class="flyspell-duplicate">endTableau</span>; ";}else{ -<span class="flyspell-duplicate">intro</span>+"beginTableau("+<span class="flyspell-duplicate">nmr</span>+")"+ +intro+"beginTableau("+nmr+")"+ l0+ lsi+lsf+" <span class="flyspell-duplicate">endTableau</span>; @@ -1073,33 +1081,33 @@ lsi+lsf+" }else{ if(ftt==0){if(nz>2){"beginTableau("+nmr+")"+ l0+ li+ -lp+ -<span class="flyspell-duplicate">lf</span> +<span class="flyspell-duplicate">lp</span>+ +lf +" -<span class="flyspell-duplicate">endTableau</span>; +endTableau; -";}else{"beginTableau("+nmr+")"+ +";}else{"beginTableau("+<span class="flyspell-duplicate">nmr</span>+")"+ l0+ li+ -<span class="flyspell-duplicate">lf</span> +lf +" -endTableau; +<span class="flyspell-duplicate">endTableau</span>; ";}}else{ -if(nz>2){"beginTableau("+<span class="flyspell-duplicate">nmr</span>+")"+ +if(nz>2){"beginTableau("+nmr+")"+ l0+ -<span class="flyspell-duplicate">lsi</span>+lsp+lsf+ +lsi+lsp+lsf+ li+ lp+ -lf +<span class="flyspell-duplicate">lf</span> +" -<span class="flyspell-duplicate">endTableau</span>; +endTableau; ";}else{"beginTableau("+nmr+")"+ l0+ -lsi+lsf+ +<span class="flyspell-duplicate">lsi</span>+lsf+ li+ -<span class="flyspell-duplicate">lf</span> +lf +" <span class="flyspell-duplicate">endTableau</span>; @@ -1109,7 +1117,7 @@ li+ sortie:=fopen("XCasmpfc.mp"); fprint(sortie,Unquoted,MetaLfc); -fclose(sortie); +<span class="flyspell-duplicate">fclose</span>(sortie); }:; @@ -1137,11 +1145,11 @@ fclose(sortie); -<span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>{XcasTVI.cxx} +<span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>{XcasTVI.<span class="flyspell-duplicate">cxx</span>} TVI(L,F,nom,nomv,f,ftt,ao,trigo,nmr):={ -<span class="flyspell-duplicate">nl</span>:=size(L); +nl:=size(L); f:=unapply(f,x); fp:=function_diff(f); Z:=concat(L,F); @@ -1151,7 +1159,7 @@ S:=[]; if(trigo==t){ all_trig_solutions:=1; reset_solve_counter(-1,-1); -SS:=solve(factor(simplify(fp(x))),x); +<span class="flyspell-duplicate">SS</span>:=solve(factor(simplify(fp(x))),x); ns:=size(SS); for(k:=0;k<ns;k++){ m:=0; @@ -1170,25 +1178,25 @@ S:=solve(fp(x),x); kk:=(evalf(S[j])>=evalf(L[0])) and (evalf(S[j])<=evalf(L[<span class="flyspell-duplicate">nl</span>-1])); if(kk==1){Z:=append(Z,simplify(S[j]))}; fpour - <span class="flyspell-duplicate">fsi</span>; + fsi; Z:=sort([op(set[op(Z)])]); -<span class="flyspell-duplicate">nz</span>:=size(Z); +nz:=size(Z); l0:=" newLigneVariables(btex <span class="font-latex-math">$"+nomv+"$</span> etex);";lp:=" "; lf:=" ";<span class="flyspell-duplicate">lsp</span>:=" "; LI:=limit(f(x),x,Z[0],1); -<span class="flyspell-duplicate">LF</span>:=limit(f(x),x,Z[nz-1],-1); +LF:=limit(f(x),x,Z[nz-1],-1); LP:=NULL; -<span class="flyspell-duplicate">PB</span>:=1; +PB:=1; if(nz>2){ for(r:=1; r<=nz-2;r++){LP:=LP,if(member(Z[r],F)){limit(f(x),x,Z[r],-1),limit(f(x),x,Z[r],1)}else{f(Z[r])}; -if(member(Z[r],F)){PB:=PB,0,1}else{PB:=<span class="flyspell-duplicate">PB</span>,1}; +if(member(Z[r],F)){PB:=PB,0,1}else{PB:=PB,1}; } }; if(nz>2){ LL:=[LI,LP,LF]; PB:=[PB,1]}else{LL:=[LI,LF];PB:=[1,1]}; @@ -1203,14 +1211,14 @@ if(NL==nz){for(k:=0;k<nz-1;k++){TestS:=(evalf(sign(LL[k]-ao))==evalf(sign(LL[ if(TestS==0){A:=A,aa;l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[k])+"$</span> etex);"+"val(btex <span class="font-latex-math">$\\alpha_</span><span class="font-latex-subscript"><span class="font-latex-math">"</span></span><span class="font-latex-math">+aa+"$</span> etex);";aa:=aa+1;}else{l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[k])+"$</span> etex);"}} l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[nz-1])+"$</span> etex);"}; //chgmt NL->nz -if(NL>nz){for(k:=0;k<NL-1;k++){TestS:=(evalf(sign(LL[k]-ao))==evalf(sign(LL[k+1]-ao))) or (evalf(sign(LL[k]-ao))==0.0)or (evalf(sign(LL[k+1]-<span class="flyspell-duplicate">ao</span>))==0.0); +if(NL>nz){for(k:=0;k<NL-1;k++){TestS:=(evalf(sign(LL[k]-ao))==evalf(sign(LL[k+1]-ao))) or (evalf(sign(LL[k]-ao))==0.0)or (evalf(sign(LL[k+1]-ao))==0.0); if(PB[k]==1){if(TestS==0){ A:=A,aa;l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[kk])+"$</span> etex);"+"val(btex <span class="font-latex-math">$\\alpha_</span><span class="font-latex-subscript"><span class="font-latex-math">"</span></span><span class="font-latex-math">+aa+"$</span> etex);";aa:=aa+1;kk:=kk+1} else{l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[kk])+"$</span> etex);";kk:=<span class="flyspell-duplicate">kk</span>+1}}; } - l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[nz-1])+"$</span> <span class="flyspell-duplicate">etex</span>);" + l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[nz-1])+"$</span> etex);" }; @@ -1219,7 +1227,7 @@ TestS:=(evalf(sign(LL[0]-ao))==evalf(sign(LL[1]-ao))) or (evalf(sign(LL[0]-<span k0:= evalf(limit(f(x),x=Z[0],1))> evalf(limit(f(x),x=Z[1],-1)); kz:=evalf(limit(f(x),x=Z[nz-1],-1))> evalf(limit(f(x),x=Z[nz-2],1)); -<span class="flyspell-duplicate">lsi</span>:=lsic+nom+"'("+nomv+")}<span class="font-latex-math">$ etex);"+ +lsi:=lsic+nom+"'("+nomv+")}<span class="font-latex-math">$ etex);"+ if(Z[0]==-infinity){if(evalf(sign(fp(if(Z[1]==+infinity){0}else{Z[1]-10^</span><span class="font-latex-superscript"><span class="font-latex-math">(</span></span><span class="font-latex-math">-5)})))==1){"plus;"}else{"moins;"}}else{if(member(Z[0],F)==0){ if(fp(Z[0])==0){"valBarre(btex 0 etex);"}else{" "}+ if(sign(fp((Z[0]+10^</span><span class="font-latex-superscript"><span class="font-latex-math">(</span></span><span class="font-latex-math">-3))))==1){"plus;"}else{"moins;"}}else{"nonDefBarre;"+ @@ -1234,10 +1242,10 @@ if(nz>2){rr:=1; if(nz==NL){for(r:=1; r<=NL-2;r++){ TestS:=(evalf(sign(LL[r 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 $</span> <span class="font-latex-math">$ etex);"}else{" "}+if(TestS==0){if(ksp==1){"plus;"}else{"moins;"}}else{" "}; }} -</span><span class="font-latex-math"><span class="flyspell-duplicate">else</span></span><span class="font-latex-math">{for(r:=1; r<=NL-2;r++){kspp:=evalf(fp(Z[rr]+0.01))>0;TestS:=(evalf(sign(LL[r]-ao))==evalf(sign(</span><span class="font-latex-math"><span class="flyspell-duplicate">LL</span></span><span class="font-latex-math">[r+1]-ao))) or (evalf(sign(LL[r]-ao))==0.0)or (evalf(sign(LL[r+1]-ao))==0.0); +</span><span class="font-latex-math"><span class="flyspell-duplicate">else</span></span><span class="font-latex-math">{for(r:=1; r<=NL-2;r++){kspp:=evalf(fp(Z[rr]+0.01))>0;TestS:=(evalf(sign(LL[r]-ao))==evalf(sign(LL[r+1]-ao))) or (evalf(sign(LL[r]-ao))==0.0)or (evalf(sign(LL[r+1]-ao))==0.0); if(PB[r]==1){if(TestS==0){lsp:=lsp+if(member(Z[rr],F)==0){"valBarre(btex 0 etex);"}else{"</span><span class="font-latex-math"><span class="flyspell-duplicate">nonDefBarre</span></span><span class="font-latex-math">;"}+ - if(kspp==1){"plus;"}else{"moins;"}+"valBarre(btex $</span> <span class="font-latex-math">$ etex);"+if(kspp==1){"plus;"}else{"moins;"};rr:=</span><span class="font-latex-math"><span class="flyspell-duplicate">rr</span></span><span class="font-latex-math">+1;} + if(kspp==1){"plus;"}else{"moins;"}+"valBarre(btex $</span> <span class="font-latex-math">$ 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:=</span><span class="font-latex-math"><span class="flyspell-duplicate">rr</span></span><span class="font-latex-math">+1;} }}}}; @@ -1249,12 +1257,12 @@ if(nz>2){rr:=1; if(nz==NL){for(r:=1; r<=NL-2;r++){ TestS:=(evalf(sign(LL[r -</span><span class="font-latex-math"><span class="flyspell-duplicate">lm</span></span><span class="font-latex-math">0:=limit(f(x),x=Z[0],1)==-</span><span class="font-latex-math"><span class="flyspell-duplicate">infinity</span></span><span class="font-latex-math">; +lm0:=limit(f(x),x=Z[0],1)==-</span><span class="font-latex-math"><span class="flyspell-duplicate">infinity</span></span><span class="font-latex-math">; -TestS:=(evalf(sign(LL[0]-ao))==evalf(sign(LL[1]-ao))) or (evalf(sign(LL[0]-ao))==0.0) or (evalf(sign(</span><span class="font-latex-math"><span class="flyspell-duplicate">LL</span></span><span class="font-latex-math">[1]-ao))==0.0); +TestS:=(evalf(sign(LL[0]-ao))==evalf(sign(LL[1]-ao))) or (evalf(sign(LL[0]-ao))==0.0) or (evalf(sign(LL[1]-ao))==0.0); li:=lvic+nom+"}$</span> etex); "+ if(member(Z[0],F)==0){"valPos(btex <span class="font-latex-math">$"+if(lm0==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[0],1)))}+"$</span> etex,"} @@ -1281,31 +1289,31 @@ TestS:=(evalf(sign(LL[0]-ao))==evalf(sign(LL[1]-ao))) or (evalf(sign(LL[0]-ao))= if(PB[r]==1){if(TestS==0){lp:=lp+if(member(Z[rr],F)){ "limGauche(btex <span class="font-latex-math">$"+if(lmrm==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[rr],-1)))}+"$</span> etex,"+if(krm==1){"1);"}<span class="flyspell-duplicate">else</span>{"0);"}+"nonDefBarre;limDroite(btex <span class="font-latex-math">$"+if(lmrp==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[rr],1)))}+"$</span> etex,"+if(krp==1){"1);"}else{"0);"}} else{"valPos(btex <span class="font-latex-math">$"+latex(simplify(f(Z[rr])))+"$</span> - etex,"+if(evalf(sign(fp(Z[rr]-0.01)))==sign(fp(Z[<span class="flyspell-duplicate">rr</span>]+0.01))){"0.5);"}else{if(krp==1){"1);"}else{"0);"}}}+"valPos(<span class="flyspell-duplicate">btex</span> + etex,"+if(evalf(sign(fp(Z[rr]-0.01)))==sign(fp(Z[rr]+0.01))){"0.5);"}else{if(krp==1){"1);"}else{"0);"}}}+"valPos(<span class="flyspell-duplicate">btex</span> <span class="font-latex-math">$ "+ao+" $</span> etex,0.5); ";rr:=rr+1; }// testS==0 else{lp:=lp+if(member(Z[rr],F)){ - "limGauche(btex <span class="font-latex-math">$"+if(lmrm==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[rr],-1)))}+"$</span> etex,"+if(krm==1){"1);"}<span class="flyspell-duplicate">else</span>{"0);"}+"nonDefBarre;limDroite(btex <span class="font-latex-math">$"+if(lmrp==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[rr],1)))}+"$</span> etex,"+if(krp==1){"1);"}else{"0);"}} + "limGauche(btex <span class="font-latex-math">$"+if(lmrm==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[rr],-1)))}+"$</span> etex,"+if(krm==1){"1);"}else{"0);"}+"nonDefBarre;limDroite(btex <span class="font-latex-math">$"+if(lmrp==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[rr],1)))}+"$</span> etex,"+if(krp==1){"1);"}else{"0);"}} else{"valPos(btex <span class="font-latex-math">$"+latex(simplify(f(Z[rr])))+"$</span> - etex,"+if(evalf(sign(fp(Z[rr]-0.01)))==sign(fp(Z[rr]+0.01))){"0.5);"}else{if(krp==1){"1);"}<span class="flyspell-duplicate">else</span>{"0); - "}}};rr:=<span class="flyspell-duplicate">rr</span>+1; + etex,"+if(evalf(sign(fp(Z[<span class="flyspell-duplicate">rr</span>]-0.01)))==sign(fp(Z[rr]+0.01))){"0.5);"}else{if(krp==1){"1);"}else{"0); + "}}};rr:=rr+1; }//else testS==0 }//PB[r]==1 }//for nz<NL -}// else nz<NL -//if nz=<span class="flyspell-duplicate">NL</span> -};//if <span class="flyspell-duplicate">nz</span>>2 +}// else nz<<span class="flyspell-duplicate">NL</span> +//if nz=NL +};//if nz>2 lnz:=limit(f(x),x=Z[nz-1],-1)==-<span class="flyspell-duplicate">infinity</span>; -<span class="flyspell-duplicate">lf</span>:=if(member(Z[nz-1],F)==0){"valPos(btex <span class="font-latex-math">$"+ +lf:=if(member(Z[nz-1],F)==0){"valPos(btex <span class="font-latex-math">$"+ if(lnz==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[nz-1],-1)))}+"$</span> etex,"+ - if(kz==1){"1);"}else{"0);"}} - else{"limGauche(<span class="flyspell-duplicate">btex</span> <span class="font-latex-math">$"+ + if(kz==1){"1);"}<span class="flyspell-duplicate">else</span>{"0);"}} + else{"limGauche(btex <span class="font-latex-math">$"+ if(lnz==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[nz-1],-1)))}+"$</span> etex,"+ if(kz==1){"1);nonDefBarre;"}else{"0);<span class="flyspell-duplicate">nonDefBarre</span>;"}}; @@ -1315,48 +1323,48 @@ lnz:=limit(f(x),x=Z[nz-1],-1)==-<span class="flyspell-duplicate">infinity</span> -MetaLfc:= if(ftt==2){if(nz>2){"beginTableau("+nmr+")"+ +MetaLfc:= if(ftt==2){if(nz>2){"beginTableau("+<span class="flyspell-duplicate">nmr</span>+")"+ l0+lsi+lsp+lsf+" -<span class="flyspell-duplicate">endTableau</span>; +endTableau; -";}<span class="flyspell-duplicate">else</span>{ +";}else{ "beginTableau("+nmr+")"+ l0+ -lsi+lsf+" -<span class="flyspell-duplicate">endTableau</span>; +<span class="flyspell-duplicate">lsi</span>+lsf+" +endTableau; "; } }else{ -if(ftt==0){if(nz>2){"beginTableau("+<span class="flyspell-duplicate">nmr</span>+")"+ +if(ftt==0){if(nz>2){"beginTableau("+nmr+")"+ l0+ li+ lp+ -<span class="flyspell-duplicate">lf</span> +lf +" <span class="flyspell-duplicate">endTableau</span>; ";}else{"beginTableau("+nmr+")"+ l0+ li+ -lf +<span class="flyspell-duplicate">lf</span> +" -<span class="flyspell-duplicate">endTableau</span>; +endTableau; ";}}else{ -if(nz>2){"beginTableau("+<span class="flyspell-duplicate">nmr</span>+")"+ +if(nz>2){"beginTableau("+nmr+")"+ l0+ lsi+lsp+lsf+ li+ -<span class="flyspell-duplicate">lp</span>+ +lp+ lf +" <span class="flyspell-duplicate">endTableau</span>; -";}else{"beginTableau("+<span class="flyspell-duplicate">nmr</span>+")"+ +";}else{"beginTableau("+nmr+")"+ l0+ lsi+lsf+ li+ -<span class="flyspell-duplicate">lf</span> +lf +" <span class="flyspell-duplicate">endTableau</span>; @@ -1370,8 +1378,8 @@ li+ sortie:=fopen("XCasmpfc.mp"); -fprint(sortie,Unquoted,MetaLfc); -<span class="flyspell-duplicate">fclose</span>(sortie); +<span class="flyspell-duplicate">fprint</span>(sortie,Unquoted,MetaLfc); +fclose(sortie); }:; @@ -1397,20 +1405,20 @@ fprint(sortie,Unquoted,MetaLfc); -TVIex(L,F,nom,nomv,f,ftt,ao,trigo,<span class="flyspell-duplicate">nmr</span>):={ -<span class="flyspell-duplicate">nl</span>:=size(L); +TVIex(L,F,nom,nomv,f,ftt,ao,trigo,nmr):={ +nl:=size(L); f:=unapply(f,x); -fp:=function_diff(f); +<span class="flyspell-duplicate">fp</span>:=function_diff(f); Z:=concat(L,F); S:=[]; -<span class="flyspell-duplicate">Sex</span>:=NULL; -Zex:=solve(f(x)=<span class="flyspell-duplicate">ao</span>); -Zex:=sort(Zex); +Sex:=NULL; +Zex:=solve(f(x)=ao); +<span class="flyspell-duplicate">Zex</span>:=sort(Zex); for(j:=0;j<size(Zex);j++){ if((evalf(Zex[j])>=evalf(L[0])) and (evalf(Zex[j])<=evalf(L[nl-1]))){Sex:=Sex,Zex[j]}; }; -<span class="flyspell-duplicate">Sex</span>:=[<span class="flyspell-duplicate">Sex</span>]; +Sex:=[<span class="flyspell-duplicate">Sex</span>]; @@ -1422,14 +1430,14 @@ if((evalf(Zex[j])>=evalf(L[0])) and (evalf(Zex[j])<=evalf(L[nl-1]))){Sex:= if(trigo==t){ all_trig_solutions:=1; reset_solve_counter(-1,-1); -<span class="flyspell-duplicate">SS</span>:=solve(factor(simplify(fp(x))),x); -ns:=size(SS); +SS:=solve(factor(simplify(fp(x))),x); +<span class="flyspell-duplicate">ns</span>:=size(SS); for(k:=0;k<ns;k++){ m:=0; while(evalf(simplify(subst(SS[k],n_1=m)))<=evalf(L[nl-1])){ S:=concat(S,simplify(subst(SS[k],n_1=m)));m:=m+1; };m:=-1; -while(evalf(subst(SS[k],n_1=m))>=L[0]){ +<span class="flyspell-duplicate">while</span>(evalf(subst(SS[k],n_1=m))>=L[0]){ S:=concat(S,simplify(subst(SS[k],n_1=m)));m:=m-1; } } @@ -1438,31 +1446,31 @@ S:=solve(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[<span class="flyspell-duplicate">nl</span>-1])); + kk:=(evalf(S[j])>=evalf(L[0])) and (evalf(S[j])<=evalf(L[nl-1])); if(kk==1){Z:=append(Z,simplify(S[j]))}; fpour - <span class="flyspell-duplicate">fsi</span>; + fsi; Z:=sort([op(set[op(Z)])]); -<span class="flyspell-duplicate">nz</span>:=size(Z); -l0:=" newLigneVariables(btex <span class="font-latex-math">$"+nomv+"$</span> etex);";lp:=" "; lf:=" ";lsp:=" "; +nz:=size(Z); +l0:=" newLigneVariables(btex <span class="font-latex-math">$"+nomv+"$</span> etex);";lp:=" "; lf:=" ";<span class="flyspell-duplicate">lsp</span>:=" "; LI:=limit(f(x),x,Z[0],1); -<span class="flyspell-duplicate">LF</span>:=limit(f(x),x,Z[nz-1],-1); +LF:=limit(f(x),x,Z[nz-1],-1); LP:=NULL; PB:=1; -if(<span class="flyspell-duplicate">nz</span>>2){ for(r:=1; +if(nz>2){ for(r:=1; r<=nz-2;r++){LP:=LP,if(member(Z[r],F)){limit(f(x),x,Z[r],-1),limit(f(x),x,Z[r],1)}else{f(Z[r])}; -if(member(Z[r],F)){PB:=PB,0,1}else{PB:=<span class="flyspell-duplicate">PB</span>,1}; +if(member(Z[r],F)){PB:=PB,0,1}else{PB:=PB,1}; } }; -if(nz>2){ LL:=[LI,LP,LF]; PB:=[PB,1]}else{LL:=[LI,LF];PB:=[1,1]}; +if(nz>2){ LL:=[LI,LP,LF]; PB:=[PB,1]}else{LL:=[LI,LF];<span class="flyspell-duplicate">PB</span>:=[1,1]}; NL:=size(LL); A:=NULL;aa:=0; @@ -1474,19 +1482,19 @@ if(NL==nz){for(k:=0;k<nz-1;k++){TestS:=(evalf(sign(LL[k]-ao))==evalf(sign(LL[ if(TestS==0){A:=A,aa;l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[k])+"$</span> etex);"+"val(btex <span class="font-latex-math">$"+latex(simplify(Sex[aa]))+"$</span> etex);";aa:=aa+1;}else{l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[k])+"$</span> etex);"}} l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[nz-1])+"$</span> etex);"}; //chgmt NL->nz -if(NL>nz){for(k:=0;k<NL-1;k++){TestS:=(evalf(sign(LL[k]-ao))==evalf(sign(LL[k+1]-ao))) or (evalf(sign(LL[k]-ao))==0.0)or (evalf(sign(LL[k+1]-<span class="flyspell-duplicate">ao</span>))==0.0); +if(NL>nz){for(k:=0;k<NL-1;k++){TestS:=(evalf(sign(LL[k]-ao))==evalf(sign(LL[k+1]-ao))) or (evalf(sign(LL[k]-ao))==0.0)or (evalf(sign(LL[k+1]-ao))==0.0); -if(PB[k]==1){if(TestS==0){ +if(PB[k]==1){if(<span class="flyspell-duplicate">TestS</span>==0){ A:=A,aa;l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[kk])+"$</span> etex);"+"val(btex <span class="font-latex-math">$"+latex(simplify(Sex[aa]))+"$</span> etex);";aa:=aa+1;kk:=kk+1} -else{l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[kk])+"$</span> etex);";kk:=<span class="flyspell-duplicate">kk</span>+1}}; +else{l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[kk])+"$</span> etex);";kk:=kk+1}}; } - l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[nz-1])+"$</span> etex);" + l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[nz-1])+"$</span> <span class="flyspell-duplicate">etex</span>);" }; -<span class="flyspell-duplicate">TestS</span>:=(evalf(sign(LL[0]-ao))==evalf(sign(LL[1]-ao))) or (evalf(sign(LL[0]-ao))==0.0) or (evalf(sign(LL[1]-ao))==0.0); +TestS:=(evalf(sign(LL[0]-ao))==evalf(sign(LL[1]-ao))) or (evalf(sign(LL[0]-ao))==0.0) or (evalf(sign(LL[1]-<span class="flyspell-duplicate">ao</span>))==0.0); k0:= evalf(limit(f(x),x=Z[0],1))> evalf(limit(f(x),x=Z[1],-1)); kz:=evalf(limit(f(x),x=Z[nz-1],-1))> evalf(limit(f(x),x=Z[nz-2],1)); @@ -1499,24 +1507,24 @@ lsi:=lsic+nom+"'("+nomv+")}<span class="font-latex-math">$ etex);"+ -if(nz>2){rr:=1; if(nz==NL){for(r:=1; r<=NL-2;r++){ TestS:=(evalf(sign(LL[r]-ao))==evalf(sign(LL[r+1]-ao))) or (evalf(sign(LL[r]-ao))==0.0)or (evalf(sign(LL[r+1]-ao))==0.0); +if(nz>2){rr:=1; if(nz==NL){for(r:=1; r<=NL-2;r++){ TestS:=(evalf(sign(LL[r]-</span><span class="font-latex-math"><span class="flyspell-duplicate">ao</span></span><span class="font-latex-math">))==evalf(sign(LL[r+1]-ao))) or (evalf(sign(LL[r]-ao))==0.0)or (evalf(sign(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{"</span><span class="font-latex-math"><span class="flyspell-duplicate">nonDefBarre</span></span><span class="font-latex-math">;"}+ + lsp:=lsp+if(member(Z[r],F)==0){"valBarre(</span><span class="font-latex-math"><span class="flyspell-duplicate">btex</span></span><span class="font-latex-math"> 0 etex);"}else{"nonDefBarre;"}+ if(ksp==1){"plus;"}else{"moins;"}+if(TestS==0){"valBarre(btex $</span> <span class="font-latex-math">$ 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:=(evalf(sign(LL[r]-ao))==evalf(sign(LL[r+1]-ao))) or (evalf(sign(LL[r]-ao))==0.0)or (evalf(sign(LL[r+1]-</span><span class="font-latex-math"><span class="flyspell-duplicate">ao</span></span><span class="font-latex-math">))==0.0); +else{for(r:=1; r<=NL-2;r++){kspp:=evalf(fp(Z[rr]+0.01))>0;TestS:=(evalf(sign(LL[r]-ao))==evalf(sign(LL[r+1]-ao))) or (evalf(sign(LL[r]-ao))==0.0)or (evalf(sign(LL[r+1]-ao))==0.0); if(PB[r]==1){if(TestS==0){lsp:=lsp+if(member(Z[rr],F)==0){"valBarre(btex 0 etex);"}else{"nonDefBarre;"}+ - if(kspp==1){"plus;"}else{"moins;"}+"valBarre(btex $</span> <span class="font-latex-math">$ etex);"+if(kspp==1){"plus;"}else{"moins;"};rr:=rr+1;} - else{lsp:=lsp+if(member(Z[rr],F)==0){"valBarre(btex 0 etex);"}</span><span class="font-latex-math"><span class="flyspell-duplicate">else</span></span><span class="font-latex-math">{"nonDefBarre;"}+ + if(kspp==1){"plus;"}else{"moins;"}+"valBarre(</span><span class="font-latex-math"><span class="flyspell-duplicate">btex</span></span><span class="font-latex-math"> $</span> <span class="font-latex-math">$ 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:=</span><span class="font-latex-math"><span class="flyspell-duplicate">rr</span></span><span class="font-latex-math">+1;} }}}}; - lsf:=if(member(Z[nz-1],F)==0){" "}else{"nonDefBarre;"} + lsf:=if(member(Z[nz-1],F)==0){" "}else{"</span><span class="font-latex-math"><span class="flyspell-duplicate">nonDefBarre</span></span><span class="font-latex-math">;"} @@ -1525,10 +1533,10 @@ lm0:=limit(f(x),x=Z[0],1)==-</span><span class="font-latex-math"><span class="fl -TestS:=(evalf(sign(LL[0]-ao))==evalf(sign(LL[1]-ao))) or (evalf(sign(LL[0]-ao))==0.0) or (evalf(sign(LL[1]-</span><span class="font-latex-math"><span class="flyspell-duplicate">ao</span></span><span class="font-latex-math">))==0.0); +TestS:=(evalf(sign(LL[0]-ao))==evalf(sign(LL[1]-ao))) or (evalf(sign(LL[0]-ao))==0.0) or (evalf(sign(LL[1]-ao))==0.0); li:=lvic+nom+"}$</span> etex); -"+ if(member(Z[0],F)==0){"valPos(btex <span class="font-latex-math">$"+if(lm0==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[0],1)))}+"$</span> etex,"} +"+ if(member(Z[0],F)==0){"valPos(btex <span class="font-latex-math">$"+if(lm0==1){"-\\infty"}else{latex(</span><span class="font-latex-math"><span class="flyspell-duplicate">simplify</span></span><span class="font-latex-math">(limit(f(x),x=Z[0],1)))}+"$</span> etex,"} else{"nonDefBarre;limDroite(btex <span class="font-latex-math">$"+if(lm0==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[0],1)))}+"$</span> etex,"}+ if(k0==1){"1);"}else{"0);"}+if(TestS==0){"valPos(btex <span class="font-latex-math">$ "+ao+" $</span> etex,0.5);"}else{" "}; @@ -1538,7 +1546,7 @@ TestS:=(evalf(sign(LL[0]-ao))==evalf(sign(LL[1]-ao))) or (evalf(sign(LL[0]-ao))= krp:=evalf(limit(f(x),x=Z[r],1))> evalf(limit(f(x),x=Z[r+1],-1)) ; lmrm:=limit(f(x),x=Z[r],-1)==-infinity;lmrp:=limit(f(x),x=Z[r],1)==-infinity; lp:=lp+if(member(Z[r],F)) { - "limGauche(btex <span class="font-latex-math">$"+if(lmrm==1){"-\\infty"}else{latex(simplify(</span><span class="font-latex-math"><span class="flyspell-duplicate">limit</span></span><span class="font-latex-math">(f(x),x=Z[r],-1)))}+"$</span> etex,"+if(krm==1){"1);"}else{"0);"}+"nonDefBarre;limDroite(btex <span class="font-latex-math">$"+if(lmrp==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[r],1)))}+"$</span> etex,"+if(krp==1){"1);"}else{"0);"}} + "limGauche(btex <span class="font-latex-math">$"+if(lmrm==1){"-\\infty"}</span><span class="font-latex-math"><span class="flyspell-duplicate">else</span></span><span class="font-latex-math">{latex(simplify(limit(f(x),x=Z[r],-1)))}+"$</span> etex,"+if(krm==1){"1);"}else{"0);"}+"nonDefBarre;limDroite(btex <span class="font-latex-math">$"+if(lmrp==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[r],1)))}+"$</span> etex,"+if(krp==1){"1);"}else{"0);"}} else{"valPos(btex <span class="font-latex-math">$"+latex(simplify(f(Z[r])))+"$</span> etex,"+if(evalf(sign(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 <span class="font-latex-math">$ "+ao+" $</span> etex,0.5);" @@ -1557,26 +1565,26 @@ if(PB[r]==1){if(TestS==0){lp:=lp+if(member(Z[rr],F)){ ";rr:=rr+1; }// testS==0 else{lp:=lp+if(member(Z[rr],F)){ - "limGauche(btex <span class="font-latex-math">$"+if(lmrm==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[rr],-1)))}+"$</span> etex,"+if(krm==1){"1);"}else{"0);"}+"nonDefBarre;limDroite(btex <span class="font-latex-math">$"+if(lmrp==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[rr],1)))}+"$</span> etex,"+if(krp==1){"1);"}else{"0);"}} + "limGauche(btex <span class="font-latex-math">$"+if(lmrm==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[rr],-1)))}+"$</span> etex,"+if(krm==1){"1);"}<span class="flyspell-duplicate">else</span>{"0);"}+"nonDefBarre;limDroite(btex <span class="font-latex-math">$"+if(lmrp==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[rr],1)))}+"$</span> etex,"+if(krp==1){"1);"}else{"0);"}} else{"valPos(btex <span class="font-latex-math">$"+latex(simplify(f(Z[rr])))+"$</span> - etex,"+if(evalf(sign(fp(Z[rr]-0.01)))==sign(fp(Z[rr]+0.01))){"0.5);"}else{if(krp==1){"1);"}else{"0); + etex,"+if(evalf(sign(fp(Z[rr]-0.01)))==sign(fp(Z[rr]+0.01))){"0.5);"}else{if(krp==1){"1);"}<span class="flyspell-duplicate">else</span>{"0); "}}};rr:=rr+1; -}//else <span class="flyspell-duplicate">testS</span>==0 +}//else testS==0 }//PB[r]==1 }//for nz<NL }// else nz<NL -//if nz=NL -};//if <span class="flyspell-duplicate">nz</span>>2 +//if nz=<span class="flyspell-duplicate">NL</span> +};//if nz>2 -lnz:=limit(f(x),x=Z[nz-1],-1)==-infinity; +lnz:=limit(f(x),x=Z[nz-1],-1)==-<span class="flyspell-duplicate">infinity</span>; -lf:=if(member(Z[nz-1],F)==0){"valPos(<span class="flyspell-duplicate">btex</span> <span class="font-latex-math">$"+ +lf:=if(member(Z[nz-1],F)==0){"valPos(btex <span class="font-latex-math">$"+ if(lnz==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[nz-1],-1)))}+"$</span> etex,"+ if(kz==1){"1);"}else{"0);"}} - else{"limGauche(btex <span class="font-latex-math">$"+ + else{"limGauche(<span class="flyspell-duplicate">btex</span> <span class="font-latex-math">$"+ if(lnz==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[nz-1],-1)))}+"$</span> etex,"+ if(kz==1){"1);nonDefBarre;"}else{"0);<span class="flyspell-duplicate">nonDefBarre</span>;"}}; @@ -1586,12 +1594,12 @@ lf:=if(member(Z[nz-1],F)==0){"valPos(<span class="flyspell-duplicate">btex</span -<span class="flyspell-duplicate">MetaLfc</span>:= if(ftt==2){if(nz>2){"beginTableau("+nmr+")"+ +MetaLfc:= if(ftt==2){if(nz>2){"beginTableau("+nmr+")"+ l0+lsi+lsp+lsf+" -endTableau; +<span class="flyspell-duplicate">endTableau</span>; ";}else{ -"beginTableau("+<span class="flyspell-duplicate">nmr</span>+")"+ +"beginTableau("+nmr+")"+ l0+ lsi+lsf+" <span class="flyspell-duplicate">endTableau</span>; @@ -1599,35 +1607,35 @@ lsi+lsf+" "; } }else{ -if(ftt==0){if(nz>2){"beginTableau("+nmr+")"+ +if(ftt==0){if(nz>2){"beginTableau("+<span class="flyspell-duplicate">nmr</span>+")"+ l0+ li+ lp+ -<span class="flyspell-duplicate">lf</span> +lf +" -endTableau; +<span class="flyspell-duplicate">endTableau</span>; ";}else{"beginTableau("+nmr+")"+ l0+ li+ -<span class="flyspell-duplicate">lf</span> +lf +" -endTableau; +<span class="flyspell-duplicate">endTableau</span>; ";}}else{ if(nz>2){"beginTableau("+nmr+")"+ l0+ -<span class="flyspell-duplicate">lsi</span>+lsp+lsf+ +lsi+lsp+lsf+ li+ -lp+ +<span class="flyspell-duplicate">lp</span>+ lf +" -<span class="flyspell-duplicate">endTableau</span>; +endTableau; -";}else{"beginTableau("+nmr+")"+ +";}else{"beginTableau("+<span class="flyspell-duplicate">nmr</span>+")"+ l0+ lsi+lsf+ li+ -<span class="flyspell-duplicate">lf</span> +lf +" <span class="flyspell-duplicate">endTableau</span>; @@ -1640,7 +1648,7 @@ li+ sortie:=fopen("XCasmpfc.mp"); -<span class="flyspell-duplicate">fprint</span>(sortie,Unquoted,MetaLfc); +fprint(sortie,Unquoted,MetaLfc); fclose(sortie); @@ -1663,14 +1671,14 @@ fclose(sortie); -<span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>{XcasTVIapp.<span class="flyspell-duplicate">cxx</span>} +<span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>{XcasTVIapp.cxx} -TVIapp(L,F,nom,nomv,f,ftt,ao,nmr):={ +TVIapp(L,F,nom,nomv,f,ftt,ao,<span class="flyspell-duplicate">nmr</span>):={ nl:=size(L); f:=unapply(f,x); -<span class="flyspell-duplicate">fp</span>:=function_diff(f); +fp:=function_diff(f); z0:=concat(L,F);z:=sort(z0); nz:=size(z); @@ -1678,11 +1686,19 @@ nz:=size(z); -S:=NULL; -if(L==[-infinity,+infinity]){j:=[seq(-100+k,k=0..200)]minus F;for k in j do S:=S,resoudre_numerique(fp(x),x,k/10,newton_solver);end_for} -else{if(L[0]==-infinity){j:=[seq(k,k=100..floor(L[1]))] minus F;for k in j do S:=S,resoudre_numerique(<span class="flyspell-duplicate">fp</span>(x),x,k/10,newton_solver);end_for} -else{if(L[1]==+infinity){j:=[seq(k,k=floor(L[0])..100)] minus F;for k in j do S:=S,resoudre_numerique(fp(x),x,k/10,newton_solver);end_for;} -else{ j:=[seq(k,k=floor(z[0])..floor(z[nz-1]))] minus F;for k in j do S:=S,resoudre_numerique(fp(x),x,k/10,newton_solver);end_for; }}}; + + +S:=op(fsolve(fp(x),x)); +if(L==[-infinity,+infinity]){j:=[seq(-100+k,k=0..200)]minus F; + for k in j do for(m:=-5;m<=5;m++){S:=S,fsolve(fp(x),x,k+m*0.1,newton_solver)};end_for} +else{if(L[0]==-infinity){j:=[seq(k,k=-100..floor(L[1]))] minus F; + for k in j do for(m:=-5;m<=5;m++){ S:=S,fsolve(fp(x),x,k+m*0.1,newton_solver)};end_for} +else{if(L[1]==+infinity){j:=[seq(k,k=floor(L[0])..100)] minus F; + for k in j do for(m:=-5;m<=5;m++){ S:=S,fsolve(fp(x),x,k+m*0.1,newton_solver)};end_for;} +else{ j:=[seq(k,k=floor(z[0])..floor(z[nz-1]))] minus F; + for k in j do + for(m:=-5;m<=5;m++){S:=S,fsolve(fp(x),x,k+m*0.1,newton_solver)};end_for; }}}; + @@ -1695,7 +1711,7 @@ si size(S)>0 alors pour j de 0 jusque size(S)-1 faire kk:=(re(S[j])==S[j]);kok:=(evalf(S[j])>=L[0]) and (evalf(S[j])<=L[1]); if(kk==1){if(kok==1){z:=append(z,simplify(S[j]))}}; fpour; -<span class="flyspell-duplicate">fsi</span>; +fsi; S:=NULL; @@ -1720,36 +1736,36 @@ for(j:=1;j<nz;j++){ Z:=[S]; -<span class="flyspell-duplicate">nz</span>:=size(Z); +nz:=size(Z); l0:=" newLigneVariables(btex <span class="font-latex-math">$"+nomv+"$</span> etex);";lp:=" "; lf:=" ";lsp:=" "; LI:=limit(f(x),x,Z[0],1); -<span class="flyspell-duplicate">LF</span>:=limit(f(x),x,Z[nz-1],-1); +LF:=limit(f(x),x,Z[nz-1],-1); LP:=NULL; PB:=1; if(nz>2){ for(r:=1; r<=nz-2;r++){LP:=LP,if(member(Z[r],F)){limit(f(x),x,Z[r],-1),limit(f(x),x,Z[r],1)}else{f(Z[r])}; -if(member(Z[r],F)){PB:=PB,0,1}else{PB:=<span class="flyspell-duplicate">PB</span>,1}; +if(member(Z[r],F)){PB:=PB,0,1}else{PB:=PB,1}; } }; if(nz>2){ LL:=[LI,LP,LF]; PB:=[PB,1]}else{LL:=[LI,LF];PB:=[1,1]}; NL:=size(LL); A:=NULL;aa:=1; -<span class="flyspell-duplicate">kk</span>:=0; +kk:=0; if(NL==nz){for(k:=0;k<nz-1;k++){TestS:=(evalf(sign(LL[k]-ao))==evalf(sign(LL[k+1]-ao))) or (evalf(sign(LL[k]-ao))==0.0)or (evalf(sign(LL[k+1]-ao))==0.0); -if(TestS==0){A:=A,aa;l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[k])+"$</span> etex);"+"val(btex <span class="font-latex-math">$\\alpha_</span><span class="font-latex-subscript"><span class="font-latex-math">"</span></span><span class="font-latex-math">+aa+"$</span> etex);";<span class="flyspell-duplicate">aa</span>:=aa+1;}else{l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[k])+"$</span> etex);"}} +if(TestS==0){A:=A,aa;l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[k])+"$</span> etex);"+"val(btex <span class="font-latex-math">$\\alpha_</span><span class="font-latex-subscript"><span class="font-latex-math">"</span></span><span class="font-latex-math">+aa+"$</span> etex);";aa:=aa+1;}else{l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[k])+"$</span> etex);"}} l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[nz-1])+"$</span> etex);"}; //chgmt NL->nz if(NL>nz){for(k:=0;k<NL-1;k++){TestS:=(evalf(sign(LL[k]-ao))==evalf(sign(LL[k+1]-ao))) or (evalf(sign(LL[k]-ao))==0.0)or (evalf(sign(LL[k+1]-ao))==0.0); if(PB[k]==1){if(TestS==0){ A:=A,aa;l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[kk])+"$</span> etex);"+"val(btex <span class="font-latex-math">$\\alpha_</span><span class="font-latex-subscript"><span class="font-latex-math">"</span></span><span class="font-latex-math">+aa+"$</span> etex);";aa:=aa+1;kk:=kk+1} -else{l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[kk])+"$</span> etex);";kk:=<span class="flyspell-duplicate">kk</span>+1}}; +else{l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[kk])+"$</span> etex);";kk:=kk+1}}; } l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[nz-1])+"$</span> etex);" @@ -1757,7 +1773,7 @@ else{l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[kk])+"$</span> et }; -TestS:=(evalf(sign(LL[0]-ao))==evalf(sign(LL[1]-ao))) or (evalf(sign(LL[0]-ao))==0.0) or (evalf(sign(<span class="flyspell-duplicate">LL</span>[1]-ao))==0.0); +TestS:=(evalf(sign(LL[0]-ao))==evalf(sign(LL[1]-ao))) or (evalf(sign(LL[0]-ao))==0.0) or (evalf(sign(LL[1]-ao))==0.0); k0:= evalf(limit(f(x),x=Z[0],1))> evalf(limit(f(x),x=Z[1],-1)); kz:=evalf(limit(f(x),x=Z[nz-1],-1))> evalf(limit(f(x),x=Z[nz-2],1)); @@ -1773,15 +1789,15 @@ lsi:=lsic+nom+"'("+nomv+")}<span class="font-latex-math">$ etex);"+ if(nz>2){rr:=1; if(nz==NL){for(r:=1; r<=NL-2;r++){ TestS:=(evalf(sign(LL[r]-ao))==evalf(sign(LL[r+1]-ao))) or (evalf(sign(LL[r]-ao))==0.0)or (evalf(sign(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{"</span><span class="font-latex-math"><span class="flyspell-duplicate">nonDefBarre</span></span><span class="font-latex-math">;"}+ + 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 $</span> <span class="font-latex-math">$ 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:=(evalf(sign(LL[r]-ao))==evalf(sign(LL[r+1]-ao))) or (evalf(sign(LL[r]-ao))==0.0)or (evalf(sign(LL[r+1]-</span><span class="font-latex-math"><span class="flyspell-duplicate">ao</span></span><span class="font-latex-math">))==0.0); +else{for(r:=1; r<=NL-2;r++){kspp:=evalf(fp(Z[rr]+0.01))>0;TestS:=(evalf(sign(LL[r]-ao))==evalf(sign(LL[r+1]-ao))) or (evalf(sign(LL[r]-ao))==0.0)or (evalf(sign(LL[r+1]-ao))==0.0); if(PB[r]==1){if(TestS==0){lsp:=lsp+if(member(Z[rr],F)==0){"valBarre(btex 0 etex);"}else{"nonDefBarre;"}+ if(kspp==1){"plus;"}else{"moins;"}+"valBarre(btex $</span> <span class="font-latex-math">$ etex);"+if(kspp==1){"plus;"}else{"moins;"};rr:=rr+1;} - else{lsp:=lsp+if(member(Z[rr],F)==0){"valBarre(btex 0 etex);"}else{"</span><span class="font-latex-math"><span class="flyspell-duplicate">nonDefBarre</span></span><span class="font-latex-math">;"}+ - if(kspp==1){"plus;"}else{"moins;"};rr:=</span><span class="font-latex-math"><span class="flyspell-duplicate">rr</span></span><span class="font-latex-math">+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;} }}}}; @@ -1791,12 +1807,12 @@ else{for(r:=1; r<=NL-2;r++){kspp:=evalf(fp(Z[rr]+0.01))>0;TestS:=(evalf(si -lm0:=limit(f(x),x=Z[0],1)==-</span><span class="font-latex-math"><span class="flyspell-duplicate">infinity</span></span><span class="font-latex-math">; +lm0:=limit(f(x),x=Z[0],1)==-infinity; -TestS:=(evalf(sign(LL[0]-ao))==evalf(sign(LL[1]-ao))) or (evalf(sign(LL[0]-ao))==0.0) or (evalf(sign(LL[1]-</span><span class="font-latex-math"><span class="flyspell-duplicate">ao</span></span><span class="font-latex-math">))==0.0); +TestS:=(evalf(sign(LL[0]-ao))==evalf(sign(LL[1]-ao))) or (evalf(sign(LL[0]-ao))==0.0) or (evalf(sign(LL[1]-ao))==0.0); li:=lvic+nom+"}$</span> etex); "+ if(member(Z[0],F)==0){"valPos(btex <span class="font-latex-math">$"+if(lm0==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[0],1)))}+"$</span> etex,"} @@ -1809,7 +1825,7 @@ TestS:=(evalf(sign(LL[0]-ao))==evalf(sign(LL[1]-ao))) or (evalf(sign(LL[0]-ao))= krp:=evalf(limit(f(x),x=Z[r],1))> evalf(limit(f(x),x=Z[r+1],-1)) ; lmrm:=limit(f(x),x=Z[r],-1)==-infinity;lmrp:=limit(f(x),x=Z[r],1)==-infinity; lp:=lp+if(member(Z[r],F)) { - "limGauche(btex <span class="font-latex-math">$"+if(lmrm==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[r],-1)))}+"$</span> etex,"+if(krm==1){"1);"}else{"0);"}+"nonDefBarre;limDroite(btex <span class="font-latex-math">$"+if(</span><span class="font-latex-math"><span class="flyspell-duplicate">lmrp</span></span><span class="font-latex-math">==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[r],1)))}+"$</span> etex,"+if(krp==1){"1);"}else{"0);"}} + "limGauche(btex <span class="font-latex-math">$"+if(lmrm==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[r],-1)))}+"$</span> etex,"+if(krm==1){"1);"}else{"0);"}+"nonDefBarre;limDroite(btex <span class="font-latex-math">$"+if(lmrp==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[r],1)))}+"$</span> etex,"+if(krp==1){"1);"}else{"0);"}} else{"valPos(btex <span class="font-latex-math">$"+latex(simplify(f(Z[r])))+"$</span> etex,"+if(evalf(sign(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 <span class="font-latex-math">$ "+ao+" $</span> etex,0.5);" @@ -1824,11 +1840,11 @@ if(PB[r]==1){if(TestS==0){lp:=lp+if(member(Z[rr],F)){ "limGauche(btex <span class="font-latex-math">$"+if(lmrm==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[rr],-1)))}+"$</span> etex,"+if(krm==1){"1);"}else{"0);"}+"nonDefBarre;limDroite(btex <span class="font-latex-math">$"+if(lmrp==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[rr],1)))}+"$</span> etex,"+if(krp==1){"1);"}else{"0);"}} else{"valPos(btex <span class="font-latex-math">$"+latex(simplify(f(Z[rr])))+"$</span> etex,"+if(evalf(sign(fp(Z[rr]-0.01)))==sign(fp(Z[rr]+0.01))){"0.5);"}else{if(krp==1){"1);"}else{"0);"}}}+"valPos(btex - <span class="font-latex-math">$ "+ao+" $</span> <span class="flyspell-duplicate">etex</span>,0.5); + <span class="font-latex-math">$ "+ao+" $</span> etex,0.5); ";rr:=rr+1; }// testS==0 else{lp:=lp+if(member(Z[rr],F)){ - "limGauche(btex <span class="font-latex-math">$"+if(lmrm==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[rr],-1)))}+"$</span> etex,"+if(krm==1){"1);"}else{"0);"}+"nonDefBarre;limDroite(btex <span class="font-latex-math">$"+if(lmrp==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[rr],1)))}+"$</span> etex,"+if(krp==1){"1);"}<span class="flyspell-duplicate">else</span>{"0);"}} + "limGauche(btex <span class="font-latex-math">$"+if(lmrm==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[rr],-1)))}+"$</span> etex,"+if(krm==1){"1);"}else{"0);"}+"nonDefBarre;limDroite(btex <span class="font-latex-math">$"+if(lmrp==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[rr],1)))}+"$</span> etex,"+if(krp==1){"1);"}else{"0);"}} else{"valPos(btex <span class="font-latex-math">$"+latex(simplify(f(Z[rr])))+"$</span> etex,"+if(evalf(sign(fp(Z[rr]-0.01)))==sign(fp(Z[rr]+0.01))){"0.5);"}else{if(krp==1){"1);"}else{"0); "}}};rr:=rr+1; @@ -1837,7 +1853,7 @@ else{lp:=lp+if(member(Z[rr],F)){ }//for nz<NL }// else nz<NL //if nz=NL -};//if <span class="flyspell-duplicate">nz</span>>2 +};//if nz>2 @@ -1845,11 +1861,11 @@ lnz:=limit(f(x),x=Z[nz-1],-1)==-infinity; lf:=if(member(Z[nz-1],F)==0){"valPos(btex <span class="font-latex-math">$"+ - if(lnz==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[nz-1],-1)))}+"$</span> <span class="flyspell-duplicate">etex</span>,"+ + if(lnz==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[nz-1],-1)))}+"$</span> etex,"+ if(kz==1){"1);"}else{"0);"}} else{"limGauche(btex <span class="font-latex-math">$"+ if(lnz==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[nz-1],-1)))}+"$</span> etex,"+ - if(kz==1){"1);nonDefBarre;"}else{"0);<span class="flyspell-duplicate">nonDefBarre</span>;"}}; + if(kz==1){"1);nonDefBarre;"}else{"0);nonDefBarre;"}}; @@ -1857,14 +1873,14 @@ lf:=if(member(Z[nz-1],F)==0){"valPos(btex <span class="font-latex-math">$"+ -MetaLfc:= if(ftt==2){if(nz>2){"beginTableau("+<span class="flyspell-duplicate">nmr</span>+")"+ +MetaLfc:= if(ftt==2){if(nz>2){"beginTableau("+nmr+")"+ l0+lsi+lsp+lsf+" endTableau; ";}else{ "beginTableau("+nmr+")"+ l0+ -<span class="flyspell-duplicate">lsi</span>+lsf+" +lsi+lsf+" endTableau; "; @@ -1876,12 +1892,12 @@ li+ lp+ lf +" -<span class="flyspell-duplicate">endTableau</span>; +endTableau; ";}else{"beginTableau("+nmr+")"+ l0+ li+ -<span class="flyspell-duplicate">lf</span> +lf +" endTableau; ";}}else{ @@ -1892,7 +1908,7 @@ li+ lp+ lf +" -<span class="flyspell-duplicate">endTableau</span>; +endTableau; ";}else{"beginTableau("+nmr+")"+ l0+ @@ -1900,7 +1916,7 @@ lsi+lsf+ li+ lf +" -<span class="flyspell-duplicate">endTableau</span>; +endTableau; ";} }}; @@ -1927,7 +1943,7 @@ fclose(sortie); <span class="comment-delimiter">%%</span><span class="comment"> -</span><span class="comment-delimiter">%% </span><span class="comment">Code giac/Xcas pour les Tableaux de variations de courbes </span><span class="comment"><span class="flyspell-duplicate">parametrees</span></span><span class="comment"> +</span><span class="comment-delimiter">%% </span><span class="comment">Code giac/Xcas pour les Tableaux de variations de courbes parametrees </span><span class="comment-delimiter">%%</span><span class="comment"> </span> @@ -1948,7 +1964,7 @@ LLL:=[]; all_trig_solutions:=1; -<span class="flyspell-duplicate">reset</span>_solve_counter(-1,-1); +reset_solve_counter(-1,-1); for(d:=0;d<=1;d++){ f:=subst(f,f[d]=unapply(f[d],t)); @@ -1966,7 +1982,7 @@ while(evalf(simplify(subst(SS[k],n_1=m)))<=evalf(L[nl-1])){ S:=concat(S,simplify(subst(SS[k],n_1=m)));m:=m+1; };m:=-1; -<span class="flyspell-duplicate">while</span>(evalf(subst(SS[k],n_1=m))>=L[0]){ +while(evalf(subst(SS[k],n_1=m))>=L[0]){ S:=concat(S,simplify(subst(SS[k],n_1=m)));m:=m-1; @@ -1984,11 +2000,11 @@ S:=concat(S,SS); fpour fsi; Z:=sort(Z); -<span class="flyspell-duplicate">nz</span>:=size(Z); +nz:=size(Z); tantque evalf(Z[0])==evalf(Z[1]) faire Z:=Z[1..nz-1];nz:=size(Z); - <span class="flyspell-duplicate">ftantque</span>; + ftantque; @@ -2000,7 +2016,7 @@ u:=1; Z:=augment(Z[0..u-1],Z[u+1..nz-1]);nz:=size(Z); ftantque; u:=u+1; - <span class="flyspell-duplicate">ftantque</span>; + ftantque; }; @@ -2012,30 +2028,30 @@ nz:=size(Z); l0:=" newLigneVariables(btex <span class="font-latex-math">$"+nomv+"$</span> etex);";lp:="",""; lf:="","";lsp:="",""; pour m de 0 jusque nz-1 faire l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[m])+"$</span> etex); -";<span class="flyspell-duplicate">fpour</span>; +";fpour; lsi:="",""; FFF:=[[],[]]; for(d:=0;d<=1;d++){ -FFF[d]:=concat(F[d],[-infinity,+<span class="flyspell-duplicate">infinity</span>]); +FFF[d]:=concat(F[d],[-infinity,+infinity]); k0:= evalf(limit(f[d](x),x=Z[0],1))> evalf(limit(f[d](x),x=Z[1],-1)); kz:=evalf(limit(f[d](x),x=Z[nz-1],-1))> evalf(limit(f[d](x),x=Z[nz-2],1)); //} //<span class="font-latex-math">$ - lsi[d]:=lsic+nom[d]+"'("+nomv+")}$</span> etex);"+if(member(Z[0],FFF[d])==0){"valBarre(btex <span class="font-latex-math">$"+latex(simplify(fp[d](Z[0])))+"$</span> etex);"}else{if(Z[0]==-infinity){" "}else{"<span class="flyspell-duplicate">nonDefBarre</span>; + lsi[d]:=lsic+nom[d]+"'("+nomv+")}$</span> etex);"+if(member(Z[0],FFF[d])==0){"valBarre(btex <span class="font-latex-math">$"+latex(simplify(fp[d](Z[0])))+"$</span> etex);"}else{if(Z[0]==-infinity){" "}else{"nonDefBarre; "}}+ if(Z[0]==-infinity){if(sign(evalf(fp[d](if(Z[1]==+infinity){0}else{Z[1]-10^(-5)})))==1){"plus;"}else{"moins;"}}else{if(member(Z[0],F[d])==0){ if(sign(fp[d](Z[0]+10^(-5)))==1){"plus;"}else{"moins;"}}else{ - if(sign(fp[d]((Z[0]+10^(-5))))==1){"plus;"}<span class="flyspell-duplicate">else</span>{"moins;"} }} + if(sign(fp[d]((Z[0]+10^(-5))))==1){"plus;"}else{"moins;"} }} if(nz>2){ for(r:=1; r<=nz-2;r++){ ksp:=evalf(fp[d](Z[r]+0.01))>0; lsp[d]:=lsp[d]+if(member(Z[r],F[d])==0){"valBarre(btex <span class="font-latex-math">$"+latex(simplify(fp[d](Z[r])))+"$</span> etex);"}else{"nonDefBarre;"}+ if(ksp==1){"plus;"}else{"moins;"} }; } -lsf[d]:=if(member(Z[nz-1],FFF[d])==0){"valBarre(btex <span class="font-latex-math">$"+latex(simplify(fp[d](Z[nz-1])))+"$</span> etex);"}else{if(Z[nz-1]==+infinity){" "}else{"<span class="flyspell-duplicate">nonDefBarre</span>;"}} +lsf[d]:=if(member(Z[nz-1],FFF[d])==0){"valBarre(btex <span class="font-latex-math">$"+latex(simplify(fp[d](Z[nz-1])))+"$</span> etex);"}else{if(Z[nz-1]==+infinity){" "}else{"nonDefBarre;"}} @@ -2064,7 +2080,7 @@ lm0[d]:=limit(f[d](x),x,Z[0],1)==-infinity; li[d]:=lvic+nom[d]+"}$</span> etex);"+ if(member(Z[0],F[d])==0){"valPos(btex <span class="font-latex-math">$"+if(lm0[d]==1){"-\\infty"}else{latex(simplify(limit(f[d](x),x,Z[0],1)))}+"$</span> etex,"} else{"nonDefBarre;limDroite(btex <span class="font-latex-math">$"+if(lm0[d]==1){"-\\infty"}else{latex(simplify(limit(f[d](x),x,Z[0],1)))}+"$</span> etex,"}+ - if(K0[d]==1){"1"}<span class="flyspell-duplicate">else</span>{"0"}+ + if(K0[d]==1){"1"}else{"0"}+ ");"; if(nz>2){ for(r:=1; r<=nz-2;r++){ krm[d]:=evalf(limit(f[d](x),x=Z[r-1],1))< evalf(limit(f[d](x),x=Z[r],-1)); @@ -2075,19 +2091,19 @@ lm0[d]:=limit(f[d](x),x,Z[0],1)==-infinity; <span class="font-latex-math">$"+if(lmrm[d]==1){"-\\infty"}else{latex(simplify(limit(f[d](x),x,Z[r],-1)))}+"$</span> etex,"+if(krm[d]==1){"1);"}else{"0);"}+"nonDefBarre;limDroite(btex <span class="font-latex-math">$"+if(lmrp[d]==1){"-\\infty"}else{latex(simplify(limit(f[d](x),x,Z[r],1)))}+"$</span> etex,"+if(krp[d]==1){"1);"}else{"0);"}} else{"valPos(btex <span class="font-latex-math">$"+latex(simplify(f[d](Z[r])))+"$</span> - etex,"+if(sign(evalf(fp[d](Z[r]-0.001)))==sign(evalf((fp[d](Z[r]+0.001))) )){"0.5);"}else{if(krp[d]==1){"1);"}<span class="flyspell-duplicate">else</span>{"0); + etex,"+if(sign(evalf(fp[d](Z[r]-0.001)))==sign(evalf((fp[d](Z[r]+0.001))) )){"0.5);"}else{if(krp[d]==1){"1);"}else{"0); "}}} }; } lnz[d]:=limit(f[d](x),x=Z[nz-1],-1)==-infinity; -<span class="flyspell-duplicate">lf</span>[d]:=if(member(Z[nz-1],F[d])==0){"valPos(btex <span class="font-latex-math">$"+ +lf[d]:=if(member(Z[nz-1],F[d])==0){"valPos(btex <span class="font-latex-math">$"+ if(lnz[d]==1){"-\\infty"}else{latex(simplify(limit(f[d](x),x=Z[nz-1],-1)))}+"$</span> etex,"+ if(Kz[d]==1){"1);"}else{"0);"}} else{"limGauche(btex <span class="font-latex-math">$"+ if(lnz[d]==1){"-\\infty"}else{latex(simplify(limit(f[d](x),x=Z[nz-1],-1)))}+"$</span> etex,"+ - if(Kz[d]==1){"1);nonDefBarre;"}else{"0);<span class="flyspell-duplicate">nonDefBarre</span>;"}}; + if(Kz[d]==1){"1);nonDefBarre;"}else{"0);nonDefBarre;"}}; @@ -2105,26 +2121,26 @@ lnz[d]:=limit(f[d](x),x=Z[nz-1],-1)==-infinity; MetaLfc:=if(ftt==2){if(nz>2){" -beginTableau("+<span class="flyspell-duplicate">nmr</span>+")"+ +beginTableau("+nmr+")"+ l0+lsi[0]+lsp[0]+lsf[0]+lsi[1]+lsp[1]+lsf[1]+" endTableau; ";}else{ intro+"beginTableau("+nmr+")"+ l0+ -<span class="flyspell-duplicate">lsi</span>[0]+lsf[0]+lsi[1]+lsf[1]+" +lsi[0]+lsf[0]+lsi[1]+lsf[1]+" endTableau; "; } -}else{ if(ftt==0){if(nz>2){"beginTableau("+<span class="flyspell-duplicate">nmr</span>+")"+ +}else{ if(ftt==0){if(nz>2){"beginTableau("+nmr+")"+ l0+ li[0]+ lp[0]+ lf[0]+ li[1]+ lp[1]+ -<span class="flyspell-duplicate">lf</span>[1] +lf[1] +" endTableau; @@ -2135,19 +2151,19 @@ lf[0]+ li[1]+ lf[1] +" -<span class="flyspell-duplicate">endTableau</span>; +endTableau; ";}}else{ if(nz>2){"beginTableau("+nmr+")"+ l0+ lsi[0]+lsp[0]+lsf[0]+ li[0]+ -<span class="flyspell-duplicate">lp</span>[0]+ +lp[0]+ lf[0]+ lsi[1]+lsp[1]+lsf[1]+ li[1]+ lp[1]+ -<span class="flyspell-duplicate">lf</span>[1] +lf[1] +" endTableau; @@ -2160,7 +2176,7 @@ lsi[1]+lsf[1]+ li[1]+ lf[1] +" -<span class="flyspell-duplicate">endTableau</span>; +endTableau; ";} } @@ -2183,14 +2199,14 @@ fclose(sortie); -<span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>{XcasTabSignL.<span class="flyspell-duplicate">cxx</span>} +<span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>{XcasTabSignL.cxx} TS(nomf,L,D,trigo,nmr):={ L:=apply(f->unapply(f,x),L) n:=size(L); Z:=NULL; -<span class="flyspell-duplicate">nl</span>:=size(L); +nl:=size(L); S:=[]; mini:=D[0]; maxi:=D[1]; @@ -2202,7 +2218,7 @@ pour k de 0 jusque n-1 faire if(trigo==t){ all_trig_solutions:=1; reset_solve_counter(-1,-1); -<span class="flyspell-duplicate">SS</span>:=solve(factor(simplify(L[k](x))),x); +SS:=solve(factor(simplify(L[k](x))),x); ns:=size(SS); for(j:=0;j<ns;j++){ m:=0; @@ -2254,7 +2270,7 @@ if(L[p]((mini+maxi)*0.5>0)){"plus;"}else{"moins;"}+if(maxi!=+infinity and L[p MetaLfc:=" beginTableau("+nmr+") -newLigneVariables(btex $</span> {x}<span class="font-latex-math">$ </span><span class="font-latex-math"><span class="flyspell-duplicate">etex</span></span><span class="font-latex-math">); +newLigneVariables(btex $</span> {x}<span class="font-latex-math">$ etex); "+l0+li+ lsic+nomf+"(x)}$</span> etex);"+ if(mini!=-infinity and product(L[s](mini),s,0,n-1)==0){" valBarre(btex 0 etex);"}else{" @@ -2271,7 +2287,7 @@ endTableau; l0:="val(btex <span class="font-latex-math">$"+latex(D[0])+"$</span> etex);";li:=" ";lr:=" "; pour m de 0 jusque nz-1 faire l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[m])+"$</span> etex); ";fpour; -l0:=l0+"val(btex <span class="font-latex-math">$"+latex(D[1])+"$</span> <span class="flyspell-duplicate">etex</span>);"; +l0:=l0+"val(btex <span class="font-latex-math">$"+latex(D[1])+"$</span> etex);"; for(p:=0;p<=n-1;p++){lp:=""; @@ -2290,7 +2306,7 @@ for(p:=0;p<=n-1;p++){lp:=""; li:=li+lp+ if(simplify(L[p](Z[nz-1]))==0){"valBarre(btex 0 etex);"}else{"barre;"}+ if(L[p](Z[nz-1]+1.0)>0){"plus;"}else{"moins; "}+if(maxi!=+infinity and L[p](maxi)==0){" - valBarre(btex 0 etex);"}</span><span class="font-latex-math"><span class="flyspell-duplicate">else</span></span><span class="font-latex-math">{" + valBarre(btex 0 etex);"}else{" "} }; @@ -2335,9 +2351,9 @@ fclose(sortie); <span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>{XcasTabSignQ.cxx} -TSq(nomf,L,Fo,D,trigo,nmr):={ +<span class="flyspell-duplicate">TSq</span>(nomf,L,Fo,D,trigo,nmr):={ L:=apply(f->unapply(f,x),L); -<span class="flyspell-duplicate">Fo</span>:=apply(f->unapply(f,x),Fo); +Fo:=apply(f->unapply(f,x),Fo); L:=concat(L,Fo); n:=size(L); Z:=NULL; @@ -2345,7 +2361,7 @@ m:=size(Fo); F:=NULL;FF:=NULL; mini:=D[0]; maxi:=D[1]; S:=[]; -SF:=[]; +<span class="flyspell-duplicate">SF</span>:=[]; pour k de 0 jusque n-1 faire @@ -2353,21 +2369,21 @@ pour k de 0 jusque n-1 faire if(trigo==t){ all_trig_solutions:=1; -reset_solve_counter(-1,-1); +<span class="flyspell-duplicate">reset</span>_solve_counter(-1,-1); SS:=solve(factor(simplify(L[k](x))),x); -<span class="flyspell-duplicate">ns</span>:=size(SS); +ns:=size(SS); for(j:=0;j<ns;j++){ mm:=0; while(evalf(simplify(subst(SS[j],n_1=mm)))<=evalf(maxi)){ S:=concat(S,simplify(subst(SS[j],n_1=mm)));mm:=mm+1; };mm:=-1; -<span class="flyspell-duplicate">while</span>(evalf(subst(SS[j],n_1=mm))>=evalf(mini)){ +while(evalf(subst(SS[j],n_1=mm))>=evalf(mini)){ S:=concat(S,simplify(subst(SS[j],n_1=mm)));mm:=mm-1; } } }else{ -S:=solve(L[k](x),x); +S:=<span class="flyspell-duplicate">concat</span>(S,<span class="flyspell-duplicate">solve</span>(L[k](x),x)); } @@ -2386,14 +2402,14 @@ pour k de 0 jusque m-1 faire if(trigo==t){ -all_trig_solutions:=1; -reset_solve_counter(-1,-1); -<span class="flyspell-duplicate">SSF</span>:=solve(factor(simplify(Fo[k](x))),x); +<span class="flyspell-duplicate">all</span>_trig_solutions:=1; +<span class="flyspell-duplicate">reset</span>_solve_counter(-1,-1); +SSF:=solve(factor(simplify(Fo[k](x))),x); <span class="flyspell-duplicate">nsf</span>:=size(SSF); for(j:=0;j<nsf;j++){ mm:=0; -while(evalf(simplify(subst(SSF[j],n_1=mm)))<=evalf(maxi)){ -SF:=concat(SF,<span class="flyspell-duplicate">simplify</span>(<span class="flyspell-duplicate">subst</span>(SSF[j],n_1=mm)));mm:=mm+1; +<span class="flyspell-duplicate">while</span>(evalf(simplify(subst(SSF[j],n_1=mm)))<=evalf(maxi)){ +<span class="flyspell-duplicate">SF</span>:=concat(SF,simplify(subst(SSF[j],n_1=mm)));mm:=mm+1; };mm:=-1; <span class="flyspell-duplicate">while</span>(evalf(subst(SSF[j],n_1=mm))>=evalf(mini)){ SF:=concat(SF,simplify(subst(SSF[j],n_1=mm)));mm:=mm-1; @@ -2401,26 +2417,26 @@ SF:=concat(SF,simplify(subst(SSF[j],n_1=mm)));mm:=mm-1; } }else{ -<span class="flyspell-duplicate">SF</span>:=solve(Fo[k](x),x); +<span class="flyspell-duplicate">SF</span>:=<span class="flyspell-duplicate">concat</span>(<span class="flyspell-duplicate">SF</span>,<span class="flyspell-duplicate">solve</span>(<span class="flyspell-duplicate">Fo</span>[k](x),x)); } si size(SF)>0 alors pour j de 0 jusque size(SF)-1 faire FF:=FF,simplify(SF[j]); if(SF[j]>mini and SF[j]<maxi){F:=F,simplify(SF[j]);} fpour; - fsi; + <span class="flyspell-duplicate">fsi</span>; <span class="flyspell-duplicate">fpour</span>; -Z:=<span class="flyspell-duplicate">concat</span>(Z,F); +Z:=[Z,F]; Z:=sort([op(set[op(Z)])]); nz:=size(Z); -if(nz==0){li:="";l0:="val(btex <span class="font-latex-math">$"+latex(D[0])+"$</span> etex);val(btex <span class="font-latex-math">$"+latex(D[1])+"$</span> <span class="flyspell-duplicate">etex</span>);"; +if(nz==0){li:="";l0:="val(btex <span class="font-latex-math">$"+latex(D[0])+"$</span> etex);val(btex <span class="font-latex-math">$"+latex(D[1])+"$</span> etex);"; for(p:=0;p<=n-1;p++){li:=li+lsic+latex(L[p](x))+"}<span class="font-latex-math">$ etex);"+ if(mini!=-infinity and L[p](mini)==0){" valBarre(btex 0 etex);"}else{" @@ -2436,16 +2452,12 @@ if(L[p]((mini+maxi)*0.5>0)){"plus;"}else{"moins;"}+if(maxi!=+infinity and L[p </span><span class="font-latex-math"><span class="flyspell-duplicate">MetaLfc</span></span><span class="font-latex-math">:=" -beginTableau("+nmr+") -newLigneVariables(btex $</span> {x}<span class="font-latex-math">$ etex); +</span><span class="font-latex-math"><span class="flyspell-duplicate">beginTableau</span></span><span class="font-latex-math">("+nmr+") +newLigneVariables(btex $</span> {x}<span class="font-latex-math">$ </span><span class="font-latex-math"><span class="flyspell-duplicate">etex</span></span><span class="font-latex-math">); "+l0+li+ lsic+nomf+"(x)}$</span> etex);"+ - if(member(mini,FF)==0){if(mini!=-infinity and product(L[s](mini),s,0,n-1)==0){" - valBarre(btex 0 etex);"}else{" - "}}else{"nonDefBarre;"}+ lf+ - if(member(maxi,FF)==0){if(maxi!=+infinity and product(L[s](maxi),s,0,n-1)==0){" - valBarre(btex 0 etex);"}else{" - "}}else{"nonDefBarre;"}+" + if(member(mini,FF)==0){if((mini!=-infinity) and (product(L[s](mini),s,0,n-1)==0)){" valBarre(btex 0 etex);"}else{" "}}else{"nonDefBarre;"}+ lf+ + if(member(maxi,FF)==0){if((maxi!=+infinity) and (product(L[s](maxi),s,0,n-1)==0)){" valBarre(btex 0 etex);"}else{" "}}else{"nonDefBarre;"}+" endTableau; " @@ -2463,23 +2475,17 @@ pour m de 0 jusque nz-1 faire l0:=l0+"val(btex <span class="font-latex-math">$"+ l0:=l0+"val(btex <span class="font-latex-math">$"+latex(D[1])+"$</span> <span class="flyspell-duplicate">etex</span>);"; -for(p:=0;p<=n-1;p++){<span class="flyspell-duplicate">lp</span>:=""; +for(p:=0;p<=n-1;p++){lp:=""; li:=li+lsic+latex(L[p](x))+"}<span class="font-latex-math">$ etex);"+ - if(mini!=-infinity and L[p](mini)==0){" - valBarre(btex 0 etex);"}else{" - "}+ + if(mini!=-infinity and L[p](mini)==0){" valBarre(btex 0 etex);"}else{" "}+ if(L[p](Z[0]-0.01)>0){"plus;"}else{"moins;"}; - for(r:=0; r<=nz-2;r++){ - lp:=lp+if(simplify(L[p](Z[r]))==0){" - valBarre(btex 0 etex);"}else{"barre; - "}+ + for(r:=0; r<=nz-2;r++){lp:=lp+if(simplify(L[p](Z[r]))==0){" valBarre(btex 0 etex);"}else{"barre;"}+ if(L[p]((Z[r]+Z[r+1])*.5)>0){"plus;"}else{"moins;"}}; li:=li+lp+ if(simplify(L[p](Z[nz-1]))==0){"valBarre(btex 0 etex);"}else{"barre;"}+ if(L[p](Z[nz-1]+1.0)>0){"plus;"}else{"moins; - "}+if(maxi!=+infinity and L[p](</span><span class="font-latex-math"><span class="flyspell-duplicate">maxi</span></span><span class="font-latex-math">)==0){" - valBarre(btex 0 etex);"}</span><span class="font-latex-math"><span class="flyspell-duplicate">else</span></span><span class="font-latex-math">{" "} + "}+if(maxi!=+infinity and L[p](</span><span class="font-latex-math"><span class="flyspell-duplicate">maxi</span></span><span class="font-latex-math">)==0){"</span><span class="font-latex-math"><span class="flyspell-duplicate">valBarre</span></span><span class="font-latex-math">(btex 0 etex);"}</span><span class="font-latex-math"><span class="flyspell-duplicate">else</span></span><span class="font-latex-math">{" "} }; @@ -2493,21 +2499,18 @@ pour t de 0 jusque nz-2 faire </span><span class="font-latex-math"><span class="flyspell-duplicate">MetaLfc</span></span><span class="font-latex-math">:=" -beginTableau("+nmr+") +</span><span class="font-latex-math"><span class="flyspell-duplicate">beginTableau</span></span><span class="font-latex-math">("+</span><span class="font-latex-math"><span class="flyspell-duplicate">nmr</span></span><span class="font-latex-math">+") newLigneVariables(btex $</span> {x}<span class="font-latex-math">$ </span><span class="font-latex-math"><span class="flyspell-duplicate">etex</span></span><span class="font-latex-math">); "+l0+ li + - lsic+nomf+"(x)}$</span> etex);"+ - if(member(mini,FF)==0){if(mini!=-infinity and product(L[s](mini),s,0,n-1)==0){" - valBarre(btex 0 etex);"}else{" - "}}else{"nonDefBarre;"}+ + </span><span class="font-latex-math"><span class="flyspell-duplicate">lsic</span></span><span class="font-latex-math">+</span><span class="font-latex-math"><span class="flyspell-duplicate">nomf</span></span><span class="font-latex-math">+"(x)}$</span> etex);"+ + if(member(mini,FF)==0){if((mini!=-infinity) and (product(L[s](mini),s,0,n-1)==0)){" valBarre(btex 0 etex);"}else{" "}}else{"nonDefBarre;"}+ if(product(L[s](Z[0]-0.01),s,0,n-1)>0){"plus;"}else{"moins;"}+ if(member(Z[0],FF)==0){"valBarre(btex 0 etex);"}else{ "nonDefBarre;"}+ lr+ if(product(L[s](Z[nz-1]+0.01),s,0,n-1)>0){"plus;"}else{"moins;"}+ - if(member(maxi,FF)==0){if(maxi!=+infinity and product(L[s](maxi),s,0,n-1)==0){" - valBarre(btex 0 etex);"}else{" "}}else{"nonDefBarre;"}+" + if(member(maxi,FF)==0){if((maxi!=+infinity) and (product(L[s](maxi),s,0,n-1)==0)){"valBarre(btex 0 etex);"}else{" "}}else{"nonDefBarre;"}+" endTableau; " @@ -2519,7 +2522,7 @@ endTableau; sortie:=fopen("XCasmpfc.mp"); -<span class="flyspell-duplicate">fprint</span>(sortie,Unquoted,MetaLfc); +fprint(sortie,Unquoted,MetaLfc); fclose(sortie); @@ -2543,15 +2546,15 @@ fclose(sortie); <span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>{XcasTabSigna.cxx} TSa(a,b,c,d,nmr):={ zA:=solve(a*x+b=0,x)[0]; -<span class="flyspell-duplicate">zB</span>:=solve(c*x+d=0,x)[0]; +zB:=solve(c*x+d=0,x)[0]; zmin:=min(zA,zB); -<span class="flyspell-duplicate">zmax</span>:=max(zA,zB); +zmax:=max(zA,<span class="flyspell-duplicate">zB</span>); Meta:= " beginTableau("+nmr+") - newLigneVariables(btex <span class="font-latex-math">$ {x}$</span> <span class="flyspell-duplicate">etex</span>); + newLigneVariables(btex <span class="font-latex-math">$ {x}$</span> etex); val(btex <span class="font-latex-math">$-\\infty$</span> etex);val(btex <span class="font-latex-math">$"+latex(zmin)+"$</span> etex); val(btex <span class="font-latex-math">$"+latex(zmax)+"$</span>etex); -val(btex <span class="font-latex-math">$+\\infty$</span> etex); +val(btex <span class="font-latex-math">$+\\infty$</span> <span class="flyspell-duplicate">etex</span>); "+lsic+if(a==1){"x+"}else{if(a==-1){"-x+"}else{a+"x+"}}+b+"}<span class="font-latex-math">$ etex);" + if(a>0){"moins;"}else{"plus;"}+ if(zmin==zA){"valBarre(btex 0 etex);"}else{"barre;"}+ @@ -2562,9 +2565,9 @@ val(btex <span class="font-latex-math">$+\\infty$</span> etex); +lsic+if(c==1){"x+"}else{if(c==-1){"-x+"}else{c+"x+"}}+d+"}$</span> 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;";<span class="flyspell-duplicate">fsi</span>} - else{si c>0 alors "moins;"; sinon "plus;"; fsi}+ - if(zmin==zB){"barre;"}else{"valBarre(btex 0 <span class="flyspell-duplicate">etex</span>);"}+ + if(zmin==zB){si c>0 alors "plus;"; sinon "moins;";fsi} + else{si c>0 alors "moins;"; sinon "plus;"; <span class="flyspell-duplicate">fsi</span>}+ + if(zmin==zB){"barre;"}else{"valBarre(btex 0 etex);"}+ if(c>0){"plus;"}else{"moins;"} +lsic+"{("+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+")}}<span class="font-latex-math">$ etex);" @@ -2580,7 +2583,7 @@ endTableau; sortie:=fopen("XCasmpfc.mp"); -</span><span class="font-latex-math"><span class="flyspell-duplicate">fprint</span></span><span class="font-latex-math">(sortie,Unquoted,Meta); +fprint(sortie,Unquoted,Meta); fclose(sortie); @@ -2610,7 +2613,7 @@ S:=[]; if(trigo==t){ all_trig_solutions:=1; -<span class="flyspell-duplicate">reset</span>_solve_counter(-1,-1); +reset_solve_counter(-1,-1); SS:=solve(factor(simplify(f(x))),x); <span class="flyspell-duplicate">ns</span>:=size(SS); for(j:=0;j<ns;j++){ @@ -2634,11 +2637,11 @@ S:=solve(f(x),x); if(size(S)==0){ l0:="val(btex <span class="font-latex-math">$"+latex(D[0])+"$</span> etex);val(btex <span class="font-latex-math">$"+latex(D[1])+"$</span> etex);"; li:=if(member(mini,F)!=0){"nonDefBarre;"}else{if(mini!=-infinity and f(mini)==0){" - valBarre(btex 0 etex);"}<span class="flyspell-duplicate">else</span>{" + valBarre(btex 0 etex);"}else{" "}}+ if(mini!=-infinity or maxi!=+infinity){if(f((mini+maxi)*0.5>0)){"plus;"}else{"moins;"}}else{if(f(0)>0){"plus;"}else{"moins;"}}; -<span class="flyspell-duplicate">lf</span>:=if(member(maxi,F)!=0){"nonDefBarre;"}else{if(maxi!=+infinity and f(maxi)==0){" - valBarre(btex 0 etex);"}<span class="flyspell-duplicate">else</span>{" +lf:=if(member(maxi,F)!=0){"nonDefBarre;"}else{if(maxi!=+infinity and f(maxi)==0){" + valBarre(btex 0 etex);"}else{" "}}; } else{pour j de 0 jusque size(S)-1 faire @@ -2659,40 +2662,40 @@ li:=if(mini!=-infinity and f(mini)==0){" if(f((mini+maxi)*0.5)>0){"plus;"}else{"moins;"}; lf:=if(maxi!=+infinity and f(maxi)==0){" valBarre(btex 0 etex);"}else{if(member(maxi,F)==0){" - "}else{"<span class="flyspell-duplicate">nonDefBarre</span>;"} + "}else{"nonDefBarre;"} }; }else{ l0:="val(btex <span class="font-latex-math">$"+latex(Z[0])+"$</span> etex);";li:=" "; pour m de 1 jusque nz-1 faire l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[m])+"$</span> etex); "; -<span class="flyspell-duplicate">fpour</span>; +fpour; li:= if(mini!=-infinity and f(mini)==0){" valBarre(btex 0 etex);"}else{if(member(mini,F)==0){" - "}else{"<span class="flyspell-duplicate">nonDefBarre</span>;"} + "}else{"nonDefBarre;"} } lm:=if(nz>2){for(r:=0; r<nz-2;r++){lm:=lm+if(Z[r]==-infinity){ if(f((Z[r+1]-1))>0){"plus;"}else{"moins;"} }else{if(f((Z[r]+Z[r+1])*.5)>0){"plus;"}else{"moins;"}} + - if(member(Z[r+1],F)==0){"valBarre(btex 0 etex);"}else{"<span class="flyspell-duplicate">nonDefBarre</span>;"} + if(member(Z[r+1],F)==0){"valBarre(btex 0 etex);"}else{"nonDefBarre;"} }}else{" "}; -lf:=if(f(Z[nz-2]+0.1)>0){"plus;"}else{"moins;"}+if(maxi!=+infinity and f(<span class="flyspell-duplicate">maxi</span>)==0){"valBarre(btex 0 etex);"}else{if(member(maxi,F)==0){" - "}else{"<span class="flyspell-duplicate">nonDefBarre</span>;"} +lf:=if(f(Z[nz-2]+0.1)>0){"plus;"}else{"moins;"}+if(maxi!=+infinity and f(maxi)==0){"valBarre(btex 0 etex);"}else{if(member(maxi,F)==0){" + "}else{"nonDefBarre;"} }; }}; -<span class="flyspell-duplicate">MetaLfc</span>:=" +MetaLfc:=" beginTableau("+nmr+") -newLigneVariables(btex <span class="font-latex-math">$\\displaystyle {x}$</span> <span class="flyspell-duplicate">etex</span>); +newLigneVariables(btex <span class="font-latex-math">$\\displaystyle {x}$</span> etex); "+l0+lsic+latex(f(x))+"}<span class="font-latex-math">$ etex);"+ li+lm+lf +" @@ -2705,7 +2708,7 @@ endTableau; sortie:=fopen("XCasmpfc.mp"); -fprint(sortie,Unquoted,</span><span class="font-latex-math"><span class="flyspell-duplicate">MetaLfc</span></span><span class="font-latex-math">); +fprint(sortie,Unquoted,MetaLfc); fclose(sortie); }:; |