Nicolas.Thiery@math.u-psud.fr http://Nicolas.Thiery.name/ 1 Objectifs *=*=*=*=*=*= L'art des mathématiques consiste à trouver le cas particulier qui contient tous les germes de la généralité David Hilbert - Outil d'exploration: - Manipulation d'exemples de taille conséquente - Évacuation des détails des calculs sans intérêt pédagogique - Possibilité de refaire les calculs et d'explorer autour - Quelles mathématiques peut faire un ordinateur? 2 Systèmes de Calcul Formel: que peut-t'on faire avec? *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* 2.1 Quelques systèmes de calcul formel ======================================= Axiom, Maple, Mathématica, Maxima, MuPAD, XCAS, ... 2.2 Calculette / interpréteur ============================== > > 1+1 > > x := 1+1 > > 2 * x > > for i from 1 to 10 do print(i); end_for > > f := proc(n) begin if n = 0 then 1 else f(n-1) * n; end_if; end_proc: > > f(0) > > f(1) > > f(2), f(3), f(4) > > // debug(f(4)) 2.3 Calcul exact / calcul numérique (multiprécision) ===================================================== > > 1 + 7 / 3 > > 1.0 + 7 / 3 > > 100! > > float(100!) > > float(PI) > > DIGITS := 1000: > > float(PI) > > DIGITS := 10: 2.4 Logique ============ > > TRUE and FALSE > > 1 < 2 > > bool(%) > > A and not A > > A and (A ==> B) > > simplify(%, logic) 2.5 Combinatoire ================= > > combinat::permutations([a,b,c,d]) > > combinat::cartesianProduct( [1,2,3,4,5,6,7,8,9,Valet,Roi,Dame], [Coeur,Carreau,Pique,Trefle]) > > combinat::trees(6) > > plot(plot::Dodecahedron()) 2.6 Algèbre linéaire ===================== > > A := matrix([[1,3],[2,7]]) > > B := matrix([[1,5,7],[-1,5,1]]) > > A * B > > linalg::gaussElim(A); > > A^-1; > > equations := [ 2*x + m*y = 1, x - y = -1 ]; > > solve(equations,[x, y]); 2.7 Calcul algébrique plus avancé ================================== > > Q := Dom::Rational: > > Q::allCategories() > > 1/3 > > Qx := Dom::Fraction(Dom::UnivariatePolynomial(x, Q)): > > Qx( (1+x) / (1-x) ) > > F := Dom::AlgebraicExtension(Qx, poly(z^2 - x, [z])): > > F(x), F(z), F(z^2) > > F(1/(1+z)/(1-z)) > > P := Dom::UnivariatePolynomial(u, F): > > P(u*z)*P(z) > > P(u + x*z) * P(u - x*z) > > factor(P(u^2 - x^3)) 2.8 Visualisation mathématique =============================== > > plot(plot::Implicit2d(x^2 - y^2 = (x - a*y)*(x^2 + y^2), x = -2..2, y = -2..2, a = -2..2)) 2.9 Calcul symbolique ====================== > > A := matrix([[a11, a12], [a21, a22]]) > > B := matrix([[b11, b12], [b21, b22]]) > > A*B > > linalg::det(A) > > 1/A 2.10 Calcul différentiel / intégral ==================================== > > diff(cos(x), x) > > int(sin(x), x) > > diff(f(x) * g(x), x) > > f := ln((x - 1)/(3+x*cos(x^3 + 1))) > > diff(f, x) > > simplify(%) > > hold(sum)(1/i^2, i=1..infinity) > > sum(1/i^2, i=1..infinity) 2.11 Utilisation typique du calcul symbolique: prétraitement avant un ====================================================================== calcul numérique ================ On veut calculer: / |2pi | sin(10x)dx /0 > > monplot := plot::Function2d(sin(10*x), x = 0..2*PI): plot(monplot); > > plot(monplot, plot::Hatch(monplot)): > > numeric::int(sin(10*x), x = 0..2*PI) > > int(sin(10*x), x=0..2*PI) 2.12 Composants d'un Système de Calcul Formel (Computer Algebra ================================================================ System): ======== - Arithmétique: entiers longs, corps finis, ... - Polynômes, fractions rationnelles, matrices, ... - Sommations, intégration, dérivation, limites symboliques, ... - Solveurs (linéaire, polynômiaux, équations différentielles, ...) - Lien calcul numérique - Bases de données (nombres premiers, groupes classiques, ...) - Langage de programmation et structures de données (pourquoi programmer?) - Gestion de mémoire - Interface avec d'autres systèmes - Interface utilisateur 3 Quelques références *=*=*=*=*=*=*=*=*=*=*= - MuPAD: - http://www.mupad.com/ - http://www.mupad.de/support/doc/40/en/ - Tutorial MuPAD: - Bouquin (traduit en français!) - Sur place: C:\Program Files\Sciface\MuPAD-4.0.0/share/doc/en/tutorium.pdf - Poly d'introduction à la programmation scientifique avec MuPAD: http://www-lih.univ-lehavre.fr/~olivier/Enseignement/l1/cours/M uPAD/support/Programmation_scientifique_polyp.pdf - Axiom http://wiki.axiom-developer.org/ - Maple http://www.maplesoft.com/ - Mathematica http://www.wolfram.com/ - Maxima http://maxima.sourceforge.net/ - XCAS http://www-fourier.ujf-grenoble.fr/~parisse/giac_fr.html ----------------------------------------------------------------------- This document was translated from LaTeX by HeVeA (1).