{\rtf1\mac\deff2 {\fonttbl{\f0\fswiss Chicago;}{\f2\froman New York;}{\f3\fswiss Geneva;}{\f4\fmodern Monaco;}{\f6\fdecor London;}{\f8\fdecor San Francisco;}{\f11\fnil Cairo;}{\f12\fnil Los Angeles;}{\f13\fnil Zapf Dingbats;}{\f14\fnil Bookman;} {\f16\fnil Palatino;}{\f18\fnil Zapf Chancery;}{\f20\froman Times;}{\f21\fswiss Helvetica;}{\f22\fmodern Courier;}{\f23\ftech Symbol;}{\f24\fnil Mobile;}{\f33\fnil Avant Garde;}{\f34\fnil New Century Schlbk;}{\f101\fnil Wartburg;}{\f118\fnil Warwick S;} {\f128\fnil Moscow;}{\f129\fnil Russian;}{\f135\fnil MATH-BES;}{\f140\fnil Lovell;}{\f149\fnil Detroit;}{\f171\fnil XB Futura ExtraBold;}{\f176\fnil H Futura Heavy;}{\f201\fnil ¡Math;}{\f512\fnil Alexandrie;}{\f2500\fnil Konstanz;}} {\colortbl\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;}{\stylesheet{\s243\qj\tqc\tx4320\tqr\tx8640 \f20 \sbasedon0\snext243 footer;}{\s247\qj\li720 \i\f20\fs20 \sbasedon0\snext0 heading 9;}{\s248\qj\li720 \i\f20\fs20 \sbasedon0\snext0 heading 8;}{\s249\qj\li720 \i\f20\fs20 \sbasedon0\snext0 heading 7;}{\s250\qj\li720 \f20\fs20\ul \sbasedon0\snext0 heading 6;}{\s251\qj\li720 \b\f20\fs20 \sbasedon0\snext0 heading 5;}{\s252\qj\li354\sb40\sa40 \f20\ul \sbasedon0\snext0 heading 4;}{\s253\qj\li354\sb120\sa80 \b\f20 \sbasedon0\snext0 heading 3;}{\s254\qj\sb200\sa140 \b\f20\fs36\ul \sbasedon0\snext0 heading 2;}{\s255\qc\sb240 \b\f20\fs48 \sbasedon0\snext0 heading 1;}{\qj \f20 \sbasedon222\snext0 Normal;}{\s2\sb120\keep\keepn \b\f22 \sbasedon0\snext2 input;}{\s3 \f22\fs20 \sbasedon0\snext3 output;}{\s4\qj\li1120 \f20\fs20 \sbasedon0\snext4 commentaire;}}{\info{\title chap3.doc}{\author EBM}}\paperw11880\paperh16820\margl1701\margr1701\margt1418\margb1418\deftab709\widowctrl\ftnbj\pgnstart14 {\*\nextfile disque dur:chap4.doc}\sectd \sbknone\linemod0\linex0\headery1077\footery1077\cols1\colsx709\endnhere {\footer \pard\plain \s243\qj\tqc\tx4320\tqr\tx8640 \f20 \par \pard \s243\qc\tqc\tx4320\tqr\tx8640 {\fs20 Calcul formel avec Maple page }{\fs20 \chpgn }\par \pard \s243\qj\tqc\tx4320\tqr\tx8640 \par }\pard\plain \s255\qc\sb240 \b\f20\fs48 Calculer avec des symboles\par \pard\plain \qj \f20 \par \par \pard\plain \s254\qj\sb200\sa140 \b\f20\fs36\ul I.Expressions alg\'8ebriques\par \pard\plain \s253\qj\li354\sb120\sa80 \b\f20 1.Transformations d'expressions alg\'8ebriques\par \pard\plain \qj \f20 Les expressions alg\'8ebriques (et en particulier les polyn\'99mes et les fractions rationnelles) sont manipul\'8ees par un grand nombre de fonctions de Maple. Leur affichage peut parfois surprendre (et en particulier l'ordre que retient Maple pour les mon\'99mes). Pour cette raison, une des premi\'8fres fonctions \'88 conna\'94tre est celle qui permettra un affichage "plus classique"\par \pard\plain \s2\sb120\keep\keepn \b\f22 ?sort\par \pard\plain \s4\qj\li1120 \f20\fs20 FUNCTION: sort - sort a list of values or a polynomial\par CALLING SEQUENCE: (for polynomials)\par sort(A) \par sort(A, V) \par PARAMETERS:\par A - an algebraic expression\par V - (optional) variables\par SYNOPSIS: \par \pard \s4\qj\li1120 - In Maple, polynomials are not automatically stored in sorted order. They are stored in the order they were first created and printed in the order they are stored. The sort function can be used to sort polynomials. But please note that sorting polynomials is a destructive operation: the input polynomial will be sorted "in-place". \par - If V is given it specifies the variable ordering to be used when sorting polynomials. It can be a list or set of names (for the multivariate case). All polynomials in the expression A are sorted into decreasing order in V. If V is not specified, the in dets appearing in A will be used. \par - An additional 3rd argument, either the string plex or tdeg can be given to fine the ordering for the multivariate case. If tdeg is specified (default) then polynomials in V are sorted in total degree with ties broken by lexicographical order. If plex i s specified, polynomials in V are sorted in pure lexicographical order.\par \pard\plain \qj \f20 Ensuite on peut d\'8evelopper, factoriser, simplifier, combiner des expressions alg\'8ebriques \'88 l'aide des fonctions \par \pard \qj suivantes.\par \pard\plain \s2\sb120\keep\keepn \b\f22 ?expand\par \pard\plain \s4\qj\li1120 \f20\fs20 FUNCTION: expand - expand an expression\par CALLING SEQUENCE:\par expand(expr, expr_1, expr_2, . . ., expr_n) \par PARAMETERS:\par expr - any algebraic expression\par expr_1, expr_2, ..., expr_n - (optional) expressions \par SYNOPSIS: \par \pard \s4\qj\li1120 - The primary application of expand is to distribute products over sums. This is done for als polynomials. For quotients of polynomials, only sums in the numerator are expanded \par \pard \s4\qj\li1120 products and powers are left alone. \par - expand also knows how to expand most of the mathematical functions including\par \pard \s4\qj\li1120 sin, cos, tan, sinh, cosh, tanh, det, erf, exp, factorial, GAMMA, ln, max, min, Psi, binomial, sum, product, int, limit, bernoulli, euler, BesselJ, BesselY, BesselI, BesselK, etc. \par \pard \s4\qj\li1120 - The optional arguments expr_1, expr_2, ..., expr_n are used to prevent particular sub-expressions in expr (expr_1, expr_2, ..., expr_n) from being expanded.\par \pard\plain \s2\sb120\keep\keepn \b\f22 ?factor\par \pard\plain \s4\qj\li1120 \f20\fs20 FUNCTION: factor - factor a multivariate polynomial \par CALLING SEQUENCES:\par factor(a); or factor(a,K);\par PARAMETERS:\par a - an expression\par K - an algebraic extension\par SYNOPSIS: \par \pard \s4\qj\li1120 - The function factor computes the factorization of a multivariate polynomial with integer, rational or algebraic number coefficients.\par \pard \s4\qj\li1120 - If the input is a rational function, then a is first ``normalized'' (see normal) and the numerator and denominator of the resulting expression are then factored. This provides a ``fully-factored form'' which can be used to simplify in the same way the n ormal function is used. However, it is more expensive to compute than normal\par \pard \s4\qj\li1120 - If the input a is a list, set, equation, range, series, relation, or function, then factor is applied recursively to the components of a. \par - The call factor(a,K) factors a over the algebraic number field defined by K. K must be a single RootOf or a list or set of RootOf's or a single radical or a list or set of radicals.\par - If the 2nd argument K is not given, the polynomial is factored over the rationals. Note that any integer content (see first example below) is not factored.\par \pard\plain \qj \f20 Pour factoriser un polyn\'99me en utilisant des radicaux (et en particulier des nombres complexes) vous devez sp\'8ecifier les radicaux \'88 utiliser:\par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet factor(x^4+1);\par \pard\plain \s3 \f22\fs20 4\par x + 1\par \pard\plain \qj \f20 \par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet factor(x^4+1,sqrt(2));\par \pard\plain \s3 \f22\fs20 2 1/2 2 1/2\par (x + 2 x + 1) (x - 2 x + 1)\par \pard\plain \qj \f20 \par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet factor(x^4+1,I);\par \pard\plain \s3 \f22\fs20 2 2\par (x - I) (x + I)\par \par \pard\plain \qj \f20 Un certain nombre de simplifications \'8el\'8ementaires sont faites automatiquement, mais pour des simplifications plus \'8elabor\'8ees vous devrez mettre en oeuvre la fonction {\b simplify}.\par \pard\plain \s2\sb120\keep\keepn \b\f22 ?simplify\par \pard\plain \s4\qj\li1120 \f20\fs20 FUNCTION: simplify - apply simplification rules to an expression\par CALLING SEQUENCE:\par simplify(expr)\par simplify(expr, n1, n2, ...)\par PARAMETERS:\par expr - any expression\par n1, n2,... - (optional) names or sets or lists\par SYNOPSIS: \par \pard \s4\qj\li1120 - The simplify function is used to apply simplification rules to an expression. If only one argument is present, then simplify will search the expression for function calls, square roots, radicals, and powers. Next it will invoke the appropriate simplification procedures, which include: exp, ln, sqrt, trig (for trig functions), radical (occurrence of fractional powers), power (occurrence of powers, exp, ln). Further information on particular simplification procedures is available for\par \pard \s4\qj\li1120 the subtopics simplify[] where is one of: power, radical, RootOf, sqrt, trig .\par - In the case of two or more arguments where the additional arguments are names, simplify will only invoke the simplification procedures specified by the additional arguments.\par \pard\plain \qj \f20 Nous verrons plus loin que la fonction {\b simplify} a \'8egalement d'autres utilit\'8es. Pour mettre un peu d'ordre dans les expressions alg\'8ebriques, on utilise la fonction {\b collect} qui regroupe ensemble des mon\'99 mes correspondnat aux m\'90mes puissances des variables indiqu\'8ees.\par \pard\plain \s2\sb120\keep\keepn \b\f22 ?collect\par \pard\plain \s4\qj\li1120 \f20\fs20 FUNCTION: collect - collect coefficients of like powers\par CALLING SEQUENCE:\par collect(a, x)\par collect(a, x, form) \par PARAMETERS:\par a - an expression\par x - an indeterminate, or a list or set of indeterminates\par form - (optional) name \par SYNOPSIS: \par \pard \s4\qj\li1120 - The collect function views a as a polynomial in x and collects all the coefficients with the same power of x . \par \pard \s4\qj\li1120 - The second argument x can be a single indeterminate (univariate case) or a list or set of indeterminates x_1, x_2, ..., x_n (multivariate case) . The indeterminates can be names or unevaluated function calls but not sums or products. \par \pard \s4\qj\li1120 - Two forms for the result are available. The form is specified by the thirdirdgument. It may be the name recursive (the default) or the name distributed. \par \pard \s4\qj\li1120 - The recursive form is obtained by first collecting the coefficients in x_1, then for each coefficient in x_1, collecting the coefficients in x_2 and so on. The distributed form is the form obtained by collecting the coefficients of x_1^e1 * x_2^e2 * ... * x_n^eN together.\par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet collect(y (sin(x) + 1) + sin(x), sin(x));\par \pard\plain \s3 \f22\fs20 y(sin(x) + 1) + sin(x)\par \pard\plain \qj \f20 Dans le m\'90me ordre d'id\'8ee, la fonction {\b combine }fait pour la plupart des fonctions les op\'8erations inverses de la fonction {\b expand}.\par \pard\plain \s2\sb120\keep\keepn \b\f22 ?combine\par \pard\plain \s4\qj\li1120 \f20\fs20 FUNCTION: combine - combine terms into a single term \par CALLING SEQUENCE:\par combine(f)\par combine(f, n) \par PARAMETERS:\par f - any expression\par n - a name \par SYNOPSIS: \par \pard \s4\qj\li1120 - The combine function applies transformations which combine terms in sums, products, and powers into a single term. This function is applied recursively to the components of lists, sets, and relations; that is, f and n may be lists/sets of expressions and names, respectively. . \par \pard \s4\qj\li1120 - For many functions, the transformations applied by combine are the inverse of the transformations that are applied by expand. \par - Subexpressions involving Int, Sum, and Limit are combined into one expression where possible using linearity; that is, c1*f(a,range) + c2*f(b,range) ==> f(c1*a+c2*b,range).\par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet combine(sin(x)^3,trig);\par \pard\plain \s3 \f22\fs20 - 1/4 sin(3 x) + 3/4 sin(x)\par \pard\plain \qj \f20 \par \pard \qj Enfin les fonctions suivantes permettent d'extraire des composantes des expressions alg\'8ebriques, coefficients, num\'8erateurs ou d\'8enominateurs.\par \pard\plain \s2\sb120\keep\keepn \b\f22 ?coeff, lcoeff, tcoeff\par \pard\plain \s4\qj\li1120 \f20\fs20 FUNCTION: coeff - extract a coefficient of a polynomial \par CALLING SEQUENCE:\par coeff(p,x)\par coeff(p,x,n)\par coeff(p,x^n) \par PARAMETERS:\par p - a polynomial in x\par x - the variable (an expression)\par n - (optional) an integer \par \pard \s4\qj\li1120 \page SYNOPSIS: \par \pard \s4\qj\li1120 - The coeff function extracts the coefficient of x^n in the polynomial p. Note that the input expression p must be collected in x. Use the function collect(p,x) prior to calling coeff, if necessary. \par \pard \s4\qj\li1120 - If the third argument is omitted, it is determined by looking at the second argument. Thus coeff(p,x^n) is equivalent to coeff(p,x,n) for n <> 0. \par - The related functions lcoeff, tcoeff extract the leading coeffi- cient, trailing coefficient of p in x respectively.\par \pard\plain \s2\sb120\keep\keepn \b\f22 ?coeffs\par \pard\plain \s4\qj\li1120 \f20\fs20 FUNCTION: coeffs - extract all coefficients of a multivariate polynomial \par CALLING SEQUENCE:\par coeffs(p, x, 't'); \par PARAMETERS:\par p - multivariate polynomial\par x - (optional) indeterminate or list/set of indetermina\par testes - (optional) name \par SYNOPSIS: \par \pard \s4\qj\li1120 - The coeffs function returns an expression sequence of all the coefficients of the polynomial p with respect the indeterminate(s) x. - If x is not specified, coeffs computes the coefficients with respect to all\par the indeterminates of p (see the indets function). If a third argument t is specified (call by name), it is assigned an expression sequence of the terms of p. There is a one to one correspondence between the coefficients and the terms of p. \par \pard \s4\qj\li1120 - Note that p must be collected with respect to the appropriate indeterminates.\par \pard\plain \s2\sb120\keep\keepn \b\f22 ?numer, denom\par \pard\plain \s4\qj\li1120 \f20\fs20 FUNCTION: numer - numerator of an expression\par FUNCTION: denom - denominator of an expression\par CALLING SEQUENCE:\par PARAMETERS:\par e - any algebraic expression\par SYNOPSIS: \par \pard \s4\qj\li1120 - The procedures numer and denom are typically called after first using the normal function. The procedure normal is used to put an expression in ``normal form'' which is the form numerator/denominator where both the numerator and denominator are polynomials. In this case, numer simply picks off the nummerator of e and denom picks off the denominator of e. Note that if e is in normal form, the numerator and denominator will have integer coefficients.\par \pard \s4\qj\li1120 - If e is not in normal form (e contains a subexpression which has one or more terms which are quotients of expressions), it is first converted into a normal form. A common denominator is found so that e can be expressed in the form numerator/denominato r.\par \pard \s4\qj\li1120 \par \pard\plain \qj \f20 Pour d\'8ecomposer en \'8el\'8ements simples, il faut un peu plus se creuser la t\'90te. Pour Maple, il s'agit en fait d'une conversion\par \pard\plain \s2\sb120\keep\keepn \b\f22 ?convert[parfrac]\par \pard\plain \s4\qj\li1120 \f20\fs20 FUNCTION: convert/parfrac - convert to partial fraction form\par CALLING SEQUENCE:\par convert(f, parfrac, x)\par PARAMETERS:\par f - rational function\par x - main variable name\par SYNOPSIS: \par \pard \s4\qj\li1120 - Convert to parfrac performs a partial fraction decomposition of the rational function f in the variable x.\par \pard\plain \qj \f20 Etudiez les exemples ci dessous et soyez s\'9er de bien les comprendre. Les fonctions que nous venons d'\'8etudier sont celles que l'on utilise tous les jours dans le calcul alg\'8ebrique\par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet exp:=expand((1+sin(x))^10);\par \pard\plain \s3 \f22\fs20 2 3 4\par \pard \s3 exp := 1 + 10 sin(x) + 45 sin(x) + 120 sin(x) + 210 sin(x)\page 5 6 7 8 9\par \pard \s3 + 252 sin(x) + 210 sin(x) + 120 sin(x) + 45 sin(x) + 10 sin(x)\par 10\par + sin(x)\par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet coeff(exp,sin(x)^5);\par \pard\plain \s3 \f22\fs20 252\par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet coeffs(exp);\par \pard\plain \s3 \f22\fs20 1, 10, 45, 120, 210, 252, 210, 120, 45, 10, 1\par \pard\plain \qj \f20 \par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet factor(exp);\par \pard\plain \s3 \f22\fs20 10\par (sin(x) + 1)\par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet collect(y (sin(x) + 1) + sin(x), sin(x));\par \pard\plain \s3 \f22\fs20 y(sin(x) + 1) + sin(x)\par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet convert(1/(x^4-1),parfrac,x);\par \pard\plain \s3 \f22\fs20 1 1 1\par --------- - --------- - ----------\par 4 (x - 1) 4 (x + 1) 2\par 2 (x + 1)\par \pard\plain \s253\qj\li354\sb120\sa80 \b\f20 2.Calculs modulo un nombre premier\par \pard\plain \qj \f20 Un certain nombre des fonctions ci dessus peuvent s'effectuer d'une mani\'8fre sp\'8ecifique modulo un nombre premier c'est \'88 dire dans l'anneau des polyn\'99mes \'88 coefficients dans Z/pZ. Pour cela il suffit d'utiliser une forme inerte de la fonction (c'est \'88 dire une fonction qui ne sera pas \'8evolu\'8e e dans un premier temps) qui se distingue de la fonction active par le fait qu'elle commence par une majuscule, et de faire suivre par un mod p.\par \pard\plain \s2\sb120\keep\keepn \b\f22 factor(x^4+1) mod 3;\par \pard\plain \s3 \f22\fs20 4\par x + 1\par \pard\plain \qj \f20 L'expression a \'8et\'8e \'8evalu\'8ee, mais le polyn\'99me n'a pas \'8et\'8e factoris\'8ee car il est irr\'8eductible sur les entiers. C'est apr\'8fs sa tentative de factorisation sur les entiers que Maple l'a r\'8eduit modulo 3. \par \pard \qj \par \pard\plain \s2\sb120\keep\keepn \b\f22 Factor(x^4+1);\par \pard\plain \s3 \f22\fs20 4\par Factor(x + 1)\par \pard\plain \qj \f20 La fonction Factor (contrairement \'88 la fonction factor) est inerte. Elle ne fait rien (\'88 moins qu'elle ne soit suivie d'un mod \'c9 ).\par \pard \qj \par \pard\plain \s2\sb120\keep\keepn \b\f22 Factor(x^4+1) mod 3;\par \pard\plain \s3 \f22\fs20 2 2\par (x + 2 x + 2) (x + x + 2)\par \pard\plain \s253\qj\li354\sb120\sa80 \b\f20 3.Racines communes, racines multiples\par \pard\plain \qj \f20 Deux fonctions de Maple vous seront particuli\'8frement utiles pour le calcul alg\'8ebrique et la manipulation des \'8equations polynomiales, ce sont celles qui calculent le r\'8esultant de deux polyn\'99 mes et le discriminant d'un polyn\'99me. Rappelons que le dsicriminant de deux polyn\'99mes en la variable x est une expression polynomiale en les coefficients des deux polyn\'99mes qui est nulle si et seulement si les deux polyn\'99mes ont une r acine commune en x. Quant au discriminant d'un polyn\'99me en x, c'est une expression polynomiale en les coefficients du polyn\'99me qui est nulle si et seulement si ce polyn\'99me a une racine multiple en x.\par \pard\plain \s2\sb120\keep\keepn \b\f22 ?resultant\par \pard\plain \s4\qj\li1120 \f20\fs20 FUNCTION: resultant - compute the resultant of two polynomials \par CALLING SEQUENCE:\par resultant(a, b, x) \par PARAMETERS:\par a,b - polynomials in x\par x - a name \par SYNOPSIS: \par - The function resultant computes the resultant of the two polynomials a and b\par with respect to the indeterminate x.\par \pard\plain \s2\sb120\keep\keepn \b\f22 ?discrim\par \pard\plain \s4\qj\li1120 \f20\fs20 FUNCTION: discrim - discriminant of a polynomial \par CALLING SEQUENCE:\par discrim(p, x) \par PARAMETERS:\par p - polynomial in x\par x - independent variable \par SYNOPSIS: \par - If d=degree(p,x) and a=lcoeff(p,x) then the discriminant is \par (-1)^(d*(d 1)/2)*resultant(p,diff(p,x),x)/a\par \pard\plain \s254\qj\sb200\sa140 \b\f20\fs36\ul II.Substitutions, affectations\par \pard\plain \s253\qj\li354\sb120\sa80 \b\f20 1.Substitutions\par \pard\plain \qj \f20 La substitution est un op\'8eration essentielle du calcul formel. La mani\'8fre la plus simple de proc\'8eder est d'utiliser la fonction {\b subs}:\par \pard\plain \s2\sb120\keep\keepn \b\f22 ?subs\par \pard\plain \s4\qj\li1120 \f20\fs20 FUNCTION: subs - substitute subexpressions into an expression \par CALLING SEQUENCE:\par subs(s_1,s_2,...,s_n,expr) \par PARAMETERS:\par s_1,... - equations or sets or lists of equations\par expr - any exp\par ssion \par SYNOPSIS: \par \pard \s4\qj\li1120 - The function subs returns an expression resulting from applying the substitutions specified by the first arguments to the last argument expr. \par \pard \s4\qj\li1120 - The substitutions are performed sequentially starting with s1. \par The substitutions within a set or list are performed simultaneously. \par \pard \s4\qj\li1120 - Every occurrence of the left hand side of a substitution equation that appears in expr is replaced by the right hand side of the equation. \par \pard \s4\qj\li1120 - The action of substitution is not followed by evaluation. In cases where full evaluation is desired, it is necessary to use the eval function to force an evaluation. For example, subs( y=ln(x), exp(y) ), as shown below.\par \pard\plain \qj \f20 Il faut distinguer soigneusement les substitutions successives (s\'8epar\'8ees par des virgules) des substitutions simultan\'8ees (regroup\'8ees par des accolades):\par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet subs(x=y,y=x,sin(x)+y^4);\par \pard\plain \s3 \f22\fs20 4\par sin(x) + x\par \pard\plain \qj \f20 \par \pard \qj La variable x a d'abord \'8et\'8e remplac\'8ee par y, puis dans l'expression ainsi obtenue, la variable y a \'8et\'8e remplac\'8ee par x. Par contre, si on met des accolades on obtient un \'8echange des variables.\par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet subs(\{x=y,y=x\},sin(x)+y^4);\par \pard\plain \s3 \f22\fs20 4\par sin(y) + x\par \pard\plain \qj \f20 \par \pard \qj La substitution a plusieurs utilit\'8es. D'une part remplacer des variables par des valeurs symboliques:\par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet subs(\{x=3,y=1-a\},(x+y)*(x-y)^2);\par \pard\plain \s3 \f22\fs20 2\par (4 - a) (2 + a)\par \pard\plain \qj \f20 En particulier, les substitutions permettent d'\'8evaluer des expressions pour des valeurs num\'8eriques des param\'8ftres\par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet subs(x=1,sin(x)/(x+1));\par \pard\plain \s3 \f22\fs20 1/2 sin(1)\par \pard\plain \qj \f20 \par \pard \qj Les substitutions ne se contentent pas de porter sur des variables. Elles peuvent porter \'8egalement sur des expressions alg\'8ebriques\par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet subs(\{cos(x)=(1-t^2)/(1+t^2),sin(x)=2*t/(1+t^2)\},\par sin(x)+cos(x));\par \pard\plain \s3 \f22\fs20 2\par t 1 - t\par 2 ------ + ------\par 2 2\par 1 + t 1 + t\par \pard\plain \qj \f20 \par \pard \qj Mais la fonction simplify peut aussi permettre des substitutions beaucoup plus complexes. C'est ainsi que dans le calcul ci dessous, nous rempla\'8dons x+y et x*y par s et p en r\'8eexprimant compl\'90tement l'expression \'88 l'aide de ces nouvelles variables.\par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet simplify(x^7+y^7,\{s=x+y,p=x*y\},[x,y,s,p]);\par \pard\plain \s3 \f22\fs20 7 5 2 3 3\par s - 7 p s + 14 p s - 7 s p\par \pard\plain \s2\sb120\keep\keepn \b\f22 ?simplify[siderels]\par \pard\plain \s4\qj\li1120 \f20\fs20 FUNCTION: simplify/siderels - simplify with respect to side relations \par CALLING SEQUENCE:\par simplify(expr, eqns)\par simplify(expr, eqns, vars) \par PARAMETERS:\par expr - an expression\par eqns - a set or list of equations (an expression e is understood as the\par equation e=0)\par vars - (optional) a set or list of variables \par SYNOPSIS: \par - Simplification of expr with respect to the side relations eqns is performed.\par The result is an expression which is mathematically equivalent to expr but\par which is in ``normal form'' with respect to the specified side relations. \par - If vars is not specified then it is determined using indets. There are two\par reasons for pre-specifying vars: \par (i) perhaps some indeterminates are meant to be considered as parameters\par rather than variables; \par (ii) the precise form of simplification to be performed can be controlled by\par specifying vars as a list (see below).\par \pard\plain \qj \f20 \par \pard \qj Les \'8equations pr\'8ecisent les relations entre les variables, la liste des variables (entre crochets car c'est une liste) pr\'8ecise l'ordre de priorit\'8e des variables: les premi\'8fres sont celles qui doivent \'90tre \'8elimin\'8e es en priorit\'8e, les derni\'8fres celles qui doivent \'90tre conserv\'8ees en priorit\'8e. Dans cette \'8elimination, le mot de variable doit \'90tre compris au sens large. Ce peut \'90tre \'8egalement un appel de fonction non \'8evalu\'8e . C'est ainsi que pour simplifier une expression trigonom\'8etrique en tenant compte de la relation bien connue comme ci dessous, les variables seront cos(x) et sin(x).\par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet eqn:=\{sin(x)^2+cos(x)^2=1\}:\line e:=sin(x)^3-11*sin(x)^2*cos(x)+3*cos(x)^3-sin(x)*cos(x)+2:\line simplify(e, eqn);\par \pard\plain \s3 \f22\fs20 3 2\par sin(x) - 14 sin(x) cos(x) - sin(x) cos(x) + 2 + 3 cos(x)\par \pard\plain \qj \f20 Maple a \'8elimin\'8e le maximum de cosinus (qui se trouve avant sinus dans l'ordre alphab\'8etique). Si vous voulez \'8eliminer le maximum de sinus, il vous faut donner la liste de priorit\'8e.\par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet simplify(e,eqn,[sin(x),cos(x)]);\par \pard\plain \s3 \f22\fs20 3 2\par \pard \s3 14 cos(x) - sin(x) cos(x) + 2 - sin(x) cos(x) + sin(x) - 11 cos(x)\par \pard\plain \qj \f20 \par \pard \qj Remarquez que cette substitution \'88 l'aide de simplify est beaucoup plus performante que les b\'90tes substitutions\par \pard\plain \s2\sb120\keep\keepn \b\f22 subs(cos(x)^2=1-sin(x)^2,e);\par \pard\plain \s3 \f22\fs20 3 2 3\par sin(x) - 11 sin(x) cos(x) + 3 cos(x) - sin(x) cos(x) + 2\par \pard\plain \s2\sb120\keep\keepn \b\f22 subs(cos(x)=sqrt(1-sin(x)^2),e);\par \pard\plain \s3 \f22\fs20 3 2 2 1/2 2 3/2\par sin(x) - 11 sin(x) (1 - sin(x) ) + 3 (1 - sin(x) )\par 2 1/2\par - sin(x) (1 - sin(x) ) + 2\par \pard\plain \qj \f20 cette derni\'8fre substitution ayant en outre l'inconv\'8enient d'\'90tre math\'8ematiquement incorrecte pour un x g\'8en\'8eral.\par \pard\plain \s253\qj\li354\sb120\sa80 \b\f20 2.Affectation imm\'8ediate, affectation diff\'8er\'8ee\par \pard\plain \qj \f20 En Maple, l'affectation ressemble \'88 ce qu'elle est dans des langages de programmation comme Pascal ou C. Son symbole est le m\'90me qu'en Pascal, {\b :=}.\par \pard\plain \s2\sb120\keep\keepn \b\f22 ?:=\par \pard\plain \s4\qj\li1120 \f20\fs20 SYNOPSIS: \par - := ; \par \pard \s4\qj\li1120 - The assignment operator := assigns the to the value of . The left hand side of the assignment operator must evaluate to a name, or a subscript, or a function call. \par \pard \s4\qj\li1120 - First, the left hand side is evaluated to a name (see the evaln function), second the right hand side is evaluated as an expression, then the assignment is performed. The value of the assignment statement is the right hand side. \par \pard \s4\qj\li1120 \par \pard\plain \qj \f20 Il faut bien comprendre la signification de tout ceci. D'une part le terme de droite est \'8evalu\'8e compl\'90tement (c'est \'88 dire que l'expression qui sera assign\'8ee au terme de gauche est la valeur du terme de droite {\b au moment o\'9d l'affectation est r\'8ealis\'8ee}), d'autre part le terme de gauche (qui peut \'90tre un nom, un nom indic\'8e ou un appel de fonction) n'est pas \'8evalu\'8e et on lui affecte la valeur du terme de droite. Il s'agit d'une {\b affectation imm\'8ediate}, ou encore d'une affectation par {\b valeur} (analogue au passage de param\'8ftre par valeur). Un exemple:\par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet x:=2; y:=x+1; x:=100; y;\par \pard\plain \s3 \f22\fs20 x := 2\par y := 3\par x := 100\par 3\par \pard\plain \qj \f20 Si par contre on souhaite indiquer que \'88 tout moment l'expression {\b y} doit valoir {\b x+1}, il faut emp\'90cher l'\'8evaluation du terme de droite. Pour cela, il suffit de le mettre entre apostrophes. On r\'8ealise ainsi une { \b affectation diff\'8er\'8ee }(tout se passe comme si l'affectation de x+1 \'88 y n'\'8etait r\'8ealis\'8ee qu'au moment o\'9d la variable y est uilis\'8ee (et \'88 ce moment x vaut 100 et non plus 3).\par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet x:=2; y:='x+1'; x:=100; y;\par \pard\plain \s3 \f22\fs20 x := 2\par y := x + 1\par x := 100\par 101\par \pard\plain \qj \f20 Exemple: comparez les effets de l'affectation imm\'8ediate (\'88 la Pascal)\par \pard\plain \s2\sb120\keep\keepn \b\f22 x:=3; x:=x+1; x;\par \pard\plain \qj \f20 \par et de l'affectation diff\'8er\'8ee\par \pard\plain \s2\sb120\keep\keepn \b\f22 x:=3;x:='x+1'; x;\par \pard\plain \qj \f20 \par Vous pouvez \'8egalement affecter les valeurs d'une fonction:\par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet f(1):=1; f(1)+2;\par \pard\plain \s3 \f22\fs20 f(1) := 1\par 3\par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet f(x):=0; f(x); f(t);\par \pard\plain \s3 \f22\fs20 f(x) := 0\par 0\par f(t)\par \pard\plain \qj \f20 Attention \'88 ce dernier exemple. On a d\'8efini le fait que f(x) devait valoir 0. Mais {\b t} n'est pas {\b x}, et f(t) reste donc non \'8evalu\'8e. On peut m\'90me faire des choses baroques du type\par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet sin(1):=2: sin(1)+2;\par \pard\plain \s3 \f22\fs20 4\par \pard\plain \qj \f20 et Maple ne proteste m\'90me pas. Comme quoi l'affectation de valeurs d'une fonction est \'88 manier avec pr\'8ecaution. On en verra l'utilit\'8e principale avec la d\'8efinition de fonctions en liaison avec l'option {\b remember}. \par \pard\plain \s253\qj\li354\sb120\sa80 \b\f20 3. Suppression d'une affectation\par \pard\plain \qj \f20 Pour supprimer une affectation de la variable x, il suffit de lui affecter la variable x elle m\'90me non \'8evalu\'8ee, c'est \'88 dire mise entre apostrophes.\par \pard\plain \s2\sb120\keep\keepn \b\f22 x:='x';\par \pard\plain \qj \f20 On peut aussi utiliser la fonction unassign qui est particuli\'8frement commode si l'on veut supprimer d'un seul coup plusieurs affectations.\par \pard\plain \s2\sb120\keep\keepn \b\f22 ?unassign\par \pard\plain \s4\qj\li1120 \f20\fs20 FUNCTION: unassign - unassign names\par CALLING SEQUENCE:\par unassign(name1, name2, ...)\par PARAMETERS:\par name1, name2, ... - names\par SYNOPSIS: \par - This procedure unassigns all the unevaluated names given as input. The value\par returned by unassign is NULL. \par - This function should be defined by the command readlib(unassign) before it is\par used. \par \pard\plain \qj \f20 Cette fonction doit \'90tre pr\'8ealablement charg\'8ee depuis la librairie par un {\b readlib(unassign)}.\par \pard\plain \s254\qj\sb200\sa140 \b\f20\fs36\ul III. Sommation, d\'8erivation, integration\par \pard\plain \s253\qj\li354\sb120\sa80 \b\f20 1. Sommes et produits\par \pard\plain \qj \f20 Maple dispose de deux fonctions qui servent \'88 la fois \'88 calculer des sommes ou des produits ou \'88 construire des types sommes ou produits. Ce sont les fonctions {\b sum} et {\b product} (et leurs formes inertes {\b Sum} et { \b Product} que Maple n'essaye pas d'\'8evaluer)\par \pard\plain \s4\qj\li1120 \f20\fs20 \page FUNCTION: sum - definite and indefinite summation\par \pard \s4\qj\li1120 FUNCTION: Sum - inert form of summation\par CALLING SEQUENCES:\par sum('f', 'k'); sum('f', 'k'=m..n); sum('f', 'k'=alpha);\par Sum('f', 'k'); Sum('f', 'k'=m..n); Sum('f', 'k'=alpha);\par PARAMETERS:\par f - an expression\par k - a name, the summation index\par m, n - integers or arbitrary expressions\par alpha - a RootOf expression\par SYNOPSIS: \par \pard \s4\qj\li1120 - The call sum('f', 'k') computes the indefinite sum of f(k) with respect to k. Thus it computes a formula g such that g(k+1)-g(k)=f(k) for all k.\par \pard \s4\qj\li1120 - The call sum('f', 'k'=m..n) computes the definite sum of f(k) over the given range m..n, so it computes f(m) + f(m+1) + ... + f(n). The definite sum is equivalent to g(n+1)-g(m) where g is the indefinite sum. For example, sum(n, n) = sum('k', k=0..n -1) = (n^2-n)/2.\par \pard \s4\qj\li1120 - If m = n+1 then the value returned is 0. If m > n+1 then the value returned is -sum('f', 'k'=n+1..m-1).\par - The call sum('f', 'k'=alpha) computes the definite sum of f(k) summed over the roots of a polynomial alpha where alpha must be a RootOf.\par \pard \s4\qj\li1120 - Note: It is recommended (and often necessary) that both f and k be enclosed in single quotes to prevent premature evaluation. (For example, k may have a previous value.) Thus the common format is sum('f', 'k'=m..n) . \par - For definite sums, if n-m is a small integer, the sum is computed directly. Otherwise it is computed via indefinite summation and taking limits, and/or using various hypergeometric summation identities.\par \pard \s4\qj\li1120 - If Maple cannot find a closed form for the summation, the function call itself is returned. (The prettyprinter displays the sum function using a stylized summation sign.)\par \pard \s4\qj\li1120 - The capitalized function name Sum is the inert sum function, which simply returns unevaluated. The prettyprinter understands Sum to be equivalent to sum for printing purposes.\par \pard \s4\qj\li1120 \par \pard\plain \qj \f20 Une remarque est n\'8ecessaire \'88 ce propos. Supposons que Maple rencontre l'\'8evaluation d'une expression du type {\b sum(expr,i=m..n)}. Il va alors proc\'8eder de la mani\'8fre suivante: \'8evaluer {\i expr}, puis {\i i} puis {\i m} et {\i n} et enfin \'8evaluer la somme. Plusieurs difficult\'8es peuvent alors surgir:\par \tab - {\i expr} peut n'\'90tre pas \'8evaluable au sens de Maple lorsque {\i i }est un symbole; c'est ainsi que si on veut calculer la somme des \'8el\'8ements d'une liste, l'\'8evaluation de l'expression {\b sum(l[i],i=1..nops(l))} va bloquer au niveau de l'\'8evaluation de {\b l[i]} alors que {\i i } est encore un symbole\par \pard \qj \tab - au contraire {\i i} peut s'\'8evaluer en un objet qui n'est pas un symbole (en particulier si l'on a d\'8ej\'88 affect\'8e \'88 {\i i} une valeur au cours des calculs pr\'8ec\'8e dents) et qui ne peut donc pas servir d'indice de sommation.\par \pard \qj \tab La solution \'88 ces deux types de probl\'8fme est de toujours inclure aussi bien l'expression \'88 sommer que le nom de l'indice de sommation entre apostrophes; en effet l'\'8e valuation d'une expression entre apostrophes consiste simplement \'88 enlever un niveau d'apostrophes. Cela emp\'90chera Maple d'essayer d'\'8evaluer {\i expr} de mani\'8fre pr\'8ematur\'8ee alors que {\i i} est encore un symbole et cela garantirua d'autre part que c'est bien le symbole {\i i} qui est utilis\'8e comme indice de sommation, et non une quelconque valeur r\'8esiduelle de ce symbole. C'est ainsi que la somme des \'8el\'8ements d'une liste est obtenue par {\b sum('l[i]','i'=1..nops(l))}.\par \pard \qj \tab En dehors de ces contraintes, le fonction {\b sum} fait aussi bien de la sommation ind\'8efinie (trouver une "primitive discr\'8fte"), que de la sommation d\'8efinie sur un ensemble fini ou infini.\par \pard \qj \page Exemples:\par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet sum(k^n,n);\par \pard\plain \s3 \f22\fs20 n\par k\par -----\par k - 1\par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet sum(i^3,i=2..n);\par \pard\plain \s3 \f22\fs20 4 3 2\par 1/4 (n + 1) - 1/2 (n + 1) + 1/4 (n + 1) - 1\par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet sum(x^i,i=0..4);\par \pard\plain \s3 \f22\fs20 2 3 4\par 1 + x + x + x + x\par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet sum(1/n^4,n=1..infinity);\par \pard\plain \s3 \f22\fs20 4\par 1/90 Pi\par \pard\plain \qj \f20 La fonction inerte {\b Sum} est une structure qui repr\'8esente une somme que Maple ne tentera pas de calculer, soit que l'on sache a priori qu'elle n'est pas calculable et que l'on ne veuille pas que Maple perde du temps \'88 essayer successivement ses divers algorithmes, soit que l'on veuille en retarder le calcul pour des raisons diverses.\par \pard \qj \tab L'analogue multiplicatif est la fonction {\b product} qui utilise exactement la m\'90me syntaxe.\par \pard\plain \s253\qj\li354\sb120\sa80 \b\f20 2. Derivation\par \pard\plain \qj \f20 La d\'8erivation \'8etant purement algorithmique ne pr\'8esente aucune difficult\'8e pour Maple. La fonction que vous utiliserez le plus souvent est la fonction {\b diff} qui est un op\'8erateur de d\'8eriv\'8ee partielle par rapport \'88 une ou plusieurs variables\par \pard\plain \s2\sb120\keep\keepn \b\f22 ?diff\par \pard\plain \s4\qj\li1120 \f20\fs20 FUNCTION: diff or Diff - partial differentiation\par CALLING SEQUENCE:\par diff(a, x1, x2, ..., xn)\par Diff(a, x1, x2, ..., xn) \par PARAMETERS:\par a - an algebraic expression\par x1, ... - names \par SYNOPSIS: \par - diff computes the partial derivative of a with respect to x1, x2, ..., xn, respectively. \par \pard \s4\qj\li1120 - Note that where n is greater than 1, the call to diff is the same as diff called recursively. I.e. diff(f(x), x, y); is equivalent to the call diff(diff (f(x), x), y);\par \pard \s4\qj\li1120 - The sequence operator $ is useful for forming higher-order derivatives. E.g., diff(f(x),x$4); is equivalent to diff(f(x),x,x,x,x); and diff(g(x,y),x$2,y$3); is equivalent to diff(g(x,y),x,x,y,y,y); \par - If the derivative cannot be expressed (e.g. if the expression is an undefined function), the diff function call itself is returned. (The prettyprinter displays the diff function in a two-dimensional d/dx format.) \par - The capitalized function name Diff is the inert diff function, which simply returns unevaluated. The prettyprinter understands Diff to be equivalent to diff for printing purposes.\par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet diff(BesselJ(2,x),x);\par \pard\plain \s3 \f22\fs20 BesselJ(2, x)\par BesselJ(1, x) - 2 -------------\par x\par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet Diff(BesselJ(2,x),x);\par \pard\plain \s3 \f22\fs20 d\par ---- BesselJ(2, x)\par dx\par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet diff(1/(x^2+1),x$2);\par \pard\plain \s3 \f22\fs20 2\par x 2\par 8 --------- - ---------\par 2 3 2 2\par \pard \s3 (x + 1) (x + 1)\par \pard\plain \qj \f20 Bien entendu, Maple peut \'8egalement traiter les d\'8eriv\'8ees de fa\'8don purement symbolique (tr\'8fs utilie pour faire des changements de fonctions inconnues dans des \'8equations diff\'8erentielles)\par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet diff(g(x)*exp(x),x$2);\par \pard\plain \s3 \f22\fs20 / 2 \\\par | d | / d \\\par |----- g(x)| exp(x) + 2 |---- g(x)| exp(x) + g(x) exp(x)\par | 2 | \\ dx /\par \\ dx /\par \pard\plain \qj \f20 Vous pouvez \'8egalement d\'8eriver \'88 l'aide de formes diff\'8erentielles \'88 l'aide de la fonction {\b D\par }\pard\plain \s2\sb120\keep\keepn \b\f22 ?D\par \pard\plain \s4\qj\li1120 \f20\fs20 FUNCTION: D - Differential operator\par CALLING SEQUENCE:\par D(f) \par D[i](f) \par PARAMETERS:\par f - expression which can be applied as a function\par i - positive integer or expression or sequence of such \par SYNOPSIS: \par - Let f be a function of one argument. The call D(f) computes the derivati ve of the function f. The derivative is a function of one argument such that D(f)(x) = diff(f(x), x). That is, D(f) = unapply(diff(f(x), x), x). Thus D is a mapping from unary functions to unary functions. \par - Let f be a function of n arguments. The call D[i](f) computes the partial derivative of f with respect to its i-th argument. More generally, D[i,j](f) is equivalent to D[i](D[j](f)), and D[](f) = f. Thus D[i] is a mapping from n-ary functions to n- ary functions. \par - The argument f must b e an algebraic expression which can be treated as a function. It may contain constants, known function names (e.g. exp, sin), unknown function names (e.g. f, g), arrow operators (e.g. x -> x^2), and the arithmetic and functional operators. For example , f+g, f*g, and f@g are valid since (f+g)(x) = f(x)+g(x), (f*g)(x) = f(x)*g(x) and (f@g)(x) = f(g(x)) where f@g denotes functional composition. \par - The usual rules for differentiation hold. In addition, it is assumed that partial derivatives commute. Hence D(f+g) = D(f) + D(g), D(f*g) = D(g*f) = D(f)*g + D(g)*f, D(f@g) = D(f)@g * D(g) etc.\par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet D(sin);\par \pard\plain \s3 \f22\fs20 cos\par \pard\plain \qj \f20 \par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet D(tan);\par \pard\plain \s3 \f22\fs20 2\par 1 + tan\par \pard\plain \qj \f20 \par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet D(sin@cos);\par \pard\plain \s3 \f22\fs20 (2)\par - cos sin\par \par \pard\plain \qj \f20 Comprenez vous ce dernier r\'8esultat? L'op\'8erateur {\b @} est l'op\'8erateur de composition des fonctions. Quant \'88 la puissance entre parenth\'8fses, elle d\'8esigne une puissance au sens de cet te composition des fonctions, c'est \'88 dire cos@cos (que Maple note encore cos@@2).\par \pard\plain \s253\qj\li354\sb120\sa80 \b\f20 \page 3. Int\'8egrales ind\'8efinies (ou primitives)\par \pard\plain \qj \f20 Maple est capable de calculer des primitives de fonctions usuelles lorsque celles-ci peuvent s'exprimer avec des fonctions usuelles. Au dire de ses auteurs, Maple a impl\'8ement\'8e l'algorithme de Risch qui est un algorithme complet au sens o\'9d, pour les fonctions ne d\'8ependant pas d'un param\'8ftre\par * soit il existe une primitive pouvant s'exprimer avec des fonctions usuelles et Maple la trouve\par * soit il n'existe pas de primitive pouvant s'exprimer avec des fonctions usuelles.\par le sens \'88 donner \'88 {\i fonctions usuelles} est assez large puisque Maple y inclut les fonctions classiques comme le logarithme int\'8egral, le sinus int\'8egrale, la fonction d'erreur, et ainsi de suite.\par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet int(1/(x^3+1),x);\par \pard\plain \s3 \f22\fs20 2 1/2 1/2\par 1/3 ln(x + 1) - 1/6 ln(x - x + 1) + 1/3 3 arctan(1/3 (2 x - 1) 3 )\par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet int(sin(x)/x^2,x);\par \pard\plain \s3 \f22\fs20 sin(x)\par - ------ + Ci(x)\par x\par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet int(E^(-x^2),x);\par \pard\plain \s3 \f22\fs20 1/2\par 1/2 Pi erf(x)\par \pard\plain \qj \f20 Pour les int\'8egrales d\'8ependant d'un param\'8ftre, Maple fait de son mieux, mais il faut parfois le guider pour lui indiquer dans quel domaine se trouve le param\'8ftre\par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet int(1/(1+a*cos(x)),x);\par \pard\plain \s3 \f22\fs20 1/2\par (- 1 + a) tan(1/2 x)\par arctanh(-----------------------)\par 1/2\par (1 + a)\par 2 --------------------------------\par 1/2 1/2\par (1 + a) (- 1 + a)\par \pard\plain \qj \f20 Ce n'est probablement pas la r\'8eponse que vous auriez trouv\'8ee "\'88 la main" car vous auriez implicitement suppos\'8e que |a|<1, contrairement \'88 Maple. Par contre\par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet int(1/(1+a^2+cos(x)),x);\par \pard\plain \s3 \f22\fs20 a tan(1/2 x)\par arctan(------------)\par 2 1/2\par (2 + a )\par 2 --------------------\par 2 1/2\par a (2 + a )\par \pard\plain \s253\qj\li354\sb120\sa80 \b\f20 4. Int\'8egrales d\'8efinies\par \pard\plain \qj \f20 Maple est capable de calculer un certain nombre d'int\'8egrales d\'8efinies (c'est \'88 dire entre deux bornes fix\'8ees). Il y parvient \'88 coup s\'9e r lorsque l'algorithme de Risch lui permet de trouver une primitive de la fonction sur l'intervalle en question. Par contre, dans le cas contraire, il peut \'8echouer \'88 calculer certaines int\'8egrales "calculables" par des m\'8ethodes classiques. \par \pard\plain \s4\qj\li1120 \f20\fs20 FUNCTION: int or Int \par - definite and indefinite integration \par CALLING SEQUENCES: \par \tab int(f,x); int(f,x=a..b); int(f,x=a..b,continuous); \par \tab Int(f,x); Int(f,x=a..b); Int(f,x=a..b,continuous);\par PARAMETERS: f \par - an algebraic expression or a procedure, the integrand x \par - a name a,b \par - interval on which integral is taken continuous \par - (optional) indication that f is continuous\par SYNOPSIS: \par - The function int computes the indefinite or definite integral of f with respect to the variable x. The name integrate is a synonym for int.\par - Indefinite integration is performed if the second argument x is a name. Note that no constant of integration appears in the result. Definite integration is performed if the second argument is of the form x=a..b where a and b are the end points of th e interval of integration. \par - If Maple cannot find a closed form for the integral, the function call itself is returned. (The prettyprinter displays the int function using a stylized integral sign.) \par - The capitalized function name Int is the inert int function, which simply returns unevaluated. The prettyprinter understands Int to be equivalent to int for printing purposes. \par - In the case of a definite integral which returns unevaluated, numerical integration may be invoked by applying evalf to the unevaluated integral. To invoke numerical integration wit hout first invoking symbolic integration, use the inert function Int as in: evalf( Int(f,x=a..b) ). \par - For symbolic definite integration, iscont is invoked to ensure the integrand is continuous before taking limits at the endpoints. This check can be disabled by calling int with the third option continuous (a global name).\par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet int(1/(x^3+1),x=0..infinity);\par \pard\plain \s3 \f22\fs20 1/2\par 2/9 Pi 3\par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet int(1/(x^3+a),x=0..1);\par \pard\plain \s3 \f22\fs20 1/2\par 1/3 2/3 1/3 1/2 3\par 2 ln(- 1 - a ) - ln(1 + a - a ) + 2 3 arctan(----------)\par 1/3\par 2 a - 1\par 1/6 ------------------------------------------------------------------\par 2/3\par a\par \pard\plain \qj \f20 (que pensez vous de la validit\'8e de ce dernier r\'8esultat, doit-on l'accepter les yeux ferm\'8es?).\par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet int(sin(x)^4/x^4,x=0..infinity);\par \pard\plain \s3 \f22\fs20 1/3 Pi\par \pard\plain \qj \f20 Le mot {\b continuous} permet de passer outre \'88 certains tests (et donc d'obtenir n'importe quoi)\par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet int(1/x^2,x=-1..1), int(1/x^2,x=-1..1,continuous); \par \pard\plain \s3 \f22\fs20 1\par /\par | 1\par | ---- dx, -2\par | 2\par / x\par -1\par \pard\plain \qj \f20 \par La fonction {\b Int} est inerte. Sa premi\'8fre utilit\'8e est de calculer num\'8eriquement des int\'8egrales en conjonction avec {\b evalf}. En effet, si vous faites {\b evalf(int(\'c9))}, Maple cherchera d'abord \'88 calculer l'int\'8e grale, puis en cherchera une approximation num\'8erique; si vous faites {\b evalf(Int(\'c9))}, la r\'8eponse sera beaucoup plus rapide puisque Maple utilisera directement une m\'8ethode d'int\'8egration num\'8erique pour trouver une valeur approch\'8e e de l'int\'8egrale. Cette fonction inerte sert \'8egalement, en conjonction avec le package {\b student} \'88 faire des changements de variables ou des int\'8egrations par parties dans des int\'8egrales.\par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet evalf(Int(BesselJ(2,x),x=0..1));\par \pard\plain \s3 \f22\fs20 .03962923860\par \pard\plain \qj \f20 \par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet evalf(Int(exp(-x^2),x=0..infinity));\par \pard\plain \s3 \f22\fs20 .8862269255\par \pard\plain \s254\qj\sb200\sa140 \b\f20\fs36\ul IV. Resoudre des \'8equations\par \pard\plain \s253\qj\li354\sb120\sa80 \b\f20 1. Solutions symboliques\par \pard\plain \qj \f20 Maple sait r\'8esoudre symboliquement un grand nombre d'\'8equations ou de syst\'8fmes d'\'8equations. La fonction essentielle \'88 conna\'94tre est la fonction {\b solve\par }\pard\plain \s2\sb120\keep\keepn \b\f22 ?solve\par \pard\plain \s4\qj\li1120 \f20\fs20 FUNCTION: solve \par \tab - solve equations\par CALLING SEQUENCE: \par \tab - solve(eqns, vars) \par PARAMETERS: \par \tab eqns : an equation or set of equations \par \tab vars (optional): an unknown or set of unknowns \par SYNOPSIS: \par - The most common application of solve is to solve a single equation, or to solve a system of equations in some unknowns. A solution to a single equation eqns solved for the unknown vars is returned as an expression. To solve a system of equations eqns for unknowns vars, the system is specified as a set of equations and a set of unknowns. The solution is returned as a set of equations.\par - Multiple solutions are returned as an expression sequence. Wherever an equation is expected, if an expression expr is specified then the equation expr = 0 is understood. If vars is not specified, indets(eqns,name) is used in place of vars. \par - When solve is unable to find any solutions, the expression NULL is returned. This may mean that there are no solutions or that solve was unable to find the solutions. \par - To assign the solutions to the variables, use the command assign.\par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet solve(x^3-3*x+2,x);\par \pard\plain \s3 \f22\fs20 -2, 1, 1\par \pard\plain \qj \f20 \par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet solve(x^3-4*x+3,x);\par \pard\plain \s3 \f22\fs20 1/2 1/2\par 1, - 1/2 + 1/2 13 , - 1/2 - 1/2 13\par \pard\plain \qj \f20 \par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet solve(tan(x)=1,x);\par \pard\plain \s3 \f22\fs20 1/4 Pi\par \pard\plain \qj \f20 \par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet solve(sinh(x)=2,x);\par \pard\plain \s3 \f22\fs20 arcsinh(2)\par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet solve(\{2*x+3*y-z=1,4*x+y-z=a,x-z=b\},\{x,y,z\});\par \pard\plain \s3 \f22\fs20 \{z = - 5/4 b + 3/8 a - 1/8, y = - 1/4 b - 1/8 a + 3/8,\par \par x = - 1/4 b + 3/8 a - 1/8\}\par \pard\plain \qj \f20 \par Un certain nombre de points sont \'88 remarquer sur les exemples pr\'8ec\'8edents. D'une part quand il y a plusieurs solutions, celles ci sont retourn\'8ees dans une s\'8equence (c'est \'88 dire une suite d'expressions s\'8epar\'8e es par des virgules). D'autre part Maple peut r\'8esoudre des \'8equations comportant des fonctions transcendantes mais avec des risques \'8evidents li\'8es \'88 l'inversion de ces fonctions (Maple n'a donn\'8e qu'une seule solution de l'\'8e quation tan(x)=1). Enfin le r\'8esultat n'est pas fourni de la m\'90me fa\'8don suivant qu'il y a une ou plusieurs inconnues:\par \tab - dans le cas d'une seule inconnue, le r\'8esultat est fourni sous sa forme brute\par \tab - dans le cas de plusieurs inconnues, le r\'8esultat est fourni sous la formes d'\'8egalit\'8es entre les variables et les solutions; dans ce cas, on peut transformer les \'8egalit\'8es en affectations \'88 l'aide de la fonction {\b assign.}\par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet solve(\{2*x+3*y=a,x+y=a^2\},\{x,y\});\par \pard\plain \s3 \f22\fs20 2 2\par \{y = - 2 a + a, x = 3 a - a\}\par \pard\plain \qj \f20 \par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet assign(");\par \bullet x+y;\par \pard\plain \s3 \f22\fs20 2\par a\par \pard\plain \qj \f20 Enfin, dans les syst\'8fmes d'\'8equations alg\'8ebriques, Maple fait syst\'8ematiquement emploi d'extension de corps introduites par la fonction {\b RootOf.\par }\pard\plain \s4\qj\li1120 \f20\fs20 FUNCTION: RootOf - a representation for roots of equations\par CALLING SEQUENCE:\par RootOf(expr)\par RootOf(expr, x)\par PARAMETERS:\par expr - an algebraic expression or equation\par x - a variable name \par SYNOPSIS: \par - The function RootOf is a place holder for representing all the roots of an equation in one variable.\par - If x is not specified, then expr must be either a univariate expression or an expression in _Z. In this case, the RootOf represents the roots of expr with respect to its single variable or _Z, respectively. If the first argument is not an equation, th en the equation expr = 0 is assumed. \par - The RootOf function checks the validity of its arguments, and solves it for polynomials of degree one. The RootOf is expressed in a single\par -argument canonical form, obtained by making the argument primitive and expressing the RootOf in terms of the global variable _Z. \par - If expr is an irreducible polynomial over a field F then alpha = RootOf(expr) represents an algebraic extension field K over F of degree degree(expr, x) where elements of K are represented as polynomials in alpha. Maple automatically generates RootOf' s to express the solutions to polynomial equations and systems of equations, eigenvalues, and rational function integrals. \par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet solve(\{x^2+y^2=1,4*x+3*y=1\},\{x,y\});\par \pard\plain \s3 \f22\fs20 2\par \{y = RootOf(25 _Z - 6 _Z - 15),\par \par 2\par x = - 3/4 RootOf(25 _Z - 6 _Z - 15) + 1/4\}\par \par \pard\plain \qj \f20 Une fonction compl\'8ementaire de la fonction {\b RootOf} est la fonction {\b allvalues} qui retourne des r\'8esultats num\'8eriques (exacts ou approch\'8es) \'88 partir d'expressions contenant des RootOf.\par \pard\plain \s4\qj\li1120 \f20\fs20 FUNCTION: allvalues - evaluate all possible values of expressions involving\par RootOf's\par CALLING SEQUENCE:\par allvalues(expr)\par allvalues(expr, 'd')\par PARAMETERS:\par expr - any expression or table, list, or set of expressions\par 'd' - the character 'd'\par SYNOPSIS: \par - The most common application of allvalues is to evaluate expressions returned from solve involving RootOf's.\par - Typically, a RootOf represents more than one value. Thus, expressions involving RootOf's will generally evaluate to more than one value or expression. The procedure allvalues will return all such values (or expressions) generated by the combinations of d ifferent values of the RootOf's, in an expresion sequence.\par - The procedure allvalues will attempt to evaluate expressions exactly using solve. The roots of nth degree polynomial equations where n <= 4 can be obtained exactly. Where roots cannot be obtained exactly, allvalues will use fsolve to obtain a numeric al solution. In this case, no symbolic constants can be used in the particular RootOf argument.\par {\b - The optional second parameter 'd' is used to specify that RootOf's of the same equation represent the same value and they should not be evaluated independently of one another.}\par - Nested RootOf's are supported by allvalues.\par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet solve(\{x^2+y^2=1,4*x+3*y=1\},\{x,y\});\par \pard\plain \qj \f20 2\par \pard\plain \s3 \f22\fs20 \{x = - 3/4 RootOf(25 _Z - 6 _Z - 15) + 1/4,\par \par 2\par y = RootOf(25 _Z - 6 _Z - 15)\}\par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet allvalues(");\par \pard\plain \s3 \f22\fs20 1/2 1/2\par \{y = 3/25 + 8/25 6 , x = 4/25 - 6/25 6 \},\par \par 1/2 1/2\par \{y = 3/25 - 8/25 6 , x = 4/25 - 6/25 6 \},\par \par 1/2 1/2\par \{y = 3/25 + 8/25 6 , x = 4/25 + 6/25 6 \},\par \par 1/2 1/2\par \{y = 3/25 - 8/25 6 , x = 4/25 + 6/25 6 \}\par \pard\plain \qj \f20 Le r\'8esultat obtenu n'est pas raisonnable (quatre points d'intersection pour un cercle et une droite). C'est parce que Maple a consid\'8er\'8e que les deux RootOf \'8etaient ind\'8ependants, alors qu'ils repr\'8esentent en fait la m \'90me valeur. Le deuxi\'8fme param\'8ftre optionnel {\b 'd'} va r\'8esoudre ce probl\'8fme et indiquer \'88 Maple que les deux repr\'8esentent la m\'90me valeur:\par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet allvalues("",'d');\par \pard\plain \s3 \f22\fs20 1/2 1/2\par \{y = 3/25 + 8/25 6 , x = 4/25 - 6/25 6 \},\par \par 1/2 1/2\par \{y = 3/25 - 8/25 6 , x = 4/25 + 6/25 6 \}\par \par \pard\plain \qj \f20 Bien entendu n'attendez pas de miracle de la fonction {\b solve}. Seules les solutions qui sont calculables de mani\'8fre algorithmique sont trouv\'8ees par Maple. Des solutions "\'8evidentes" peuvent ainsi ne pas \'90tre trouv\'8e es.\par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet solve(sin(x)=3*x/Pi,x);\par \pard\plain \s3 \f22\fs20 0\par \pard\plain \qj \f20 alors que "bien entendu" \'b9/6 est aussi solution.\par \pard\plain \s253\qj\li354\sb120\sa80 \b\f20 2. Solutions num\'8eriques\par \pard\plain \qj \f20 Lorsque des solutions formelles ne peuvents pas \'90tre trouv\'8ees, Maple peut tenter de d\'8eterminer des solutions num\'8eriques approch\'8ees. La fonction \'88 utiliser dans ce cas est la fonction {\b fsolve}.\par \pard\plain \s2\sb120\keep\keepn \b\f22 \page ?fsolve\par \pard\plain \s4\qj\li1120 \f20\fs20 FUNCTION: fsolve - solve using floating-point arithmetic\par CALLING SEQUENCE:\par fsolve( , , );\par PARAMETERS:\par - an equation or set of equations\par - (optional) an unknown or set of unknowns\par - (optional) parameters controlling solutions\par SYNOPSIS: \par - The conventions for passing equations and variables, and returning the answers, are the same for fsolve as for solve.\par - For a general equation, fsolve attempts to compute a single real root. However for polynomials it will compute all real (non-complex) roots, although exceptionally ill-conditioned polynomials may cause fsolve to miss some roots. \par - To compute all roots of a polynomial over the field of complex numbers, use the complex option.\par - The options available are:\par \tab - complex\par \tab \tab -Find one root (or all roots, for polynomials) over the complex floating-point numbers.\par \tab - fulldigits\par \tab \tab -This option prevents fsolve from decreasing Digits for intermediate calculations at high settings of Digits. With this option fsolve may escape ill-conditioning problems, but the routine slows down.\par \tab - maxsols=n\par \tab \tab -Find only the n least roots. This option is only meaningful for polynomials, where more than one root is computed.\par \tab - \par \tab \tab - a..b or x = a..b or \{x=a..b, y=c..d, ...\} . Search for roots in the given interval only. The ranges are open intervals, i.e. the endpoints are not included in the range. Note that an fsolve computation may fail to find a root even though one exists , in which case specifying appropriate range information may result in a successful computation.\par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet fsolve(\{x^2+y^2=1,4*x+3*y=1\},\{x,y\});\par \pard\plain \s3 \f22\fs20 \{x = -.4278775383, y = .9038367177\}\par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet f := sin(x+y) - exp(x)*y = 0:\line g := x^2 - y = 2:\line fsolve(\{f,g\},\{x,y\},\{x=-1..1,y=-2..0\});\par \pard\plain \s3 \f22\fs20 \{y = -1.552838698, x = -.6687012050\}\par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet fsolve(x^5-x+2,x,complex);\par \pard\plain \s3 \f22\fs20 \tab -1.267168305, - .2609638804 + 1.177226153 I,\par \par - .2609638804 - 1.177226153 I, .8945480327 - .5341485462 I,\par \par .8945480327 + .5341485462 I\par \par \pard\plain \s253\qj\li354\sb120\sa80 \b\f20 3. Equations diff\'8erentielles\par \pard\plain \qj \f20 Maple est capable de r\'8esoudre formellement un certain nombre d'\'8equations diff\'8erentielles classiques d'ordre 1 ou 2 \'88 l'aide de la fonction {\b dsolve\par }\pard\plain \s2\sb120\keep\keepn \b\f22 ?dsolve\par \pard\plain \s4\qj\li1120 \f20\fs20 FUNCTION: dsolve - solve ordinary differential equations\par CALLING SEQUENCE:\par dsolve(deqns, vars)\par dsolve(deqns, vars, option)\par PARAMETERS:\par deqns - ordinary differential equation in vars, or set of equations and/or\par initial conditions\par vars - variable or set of variables to be solved for\par option - one of: explicit, laplace, series, numeric\par SYNOPSIS: \par - dsolve is able to find clo sed-form solutions to many differential equations. The solution is returned either as an equation in y(x) and x (or whatever variables were specified) or in parametric form [x=f(_T),y(x)=g(_T)] where _T is the parameter. Any arbitrary constants are rep resented as _C1, _C2, ..., _Cn. \par - The explicit option forces the solution to be returned explicitly in terms of the dependent variable, if possible.\par - The laplace option causes dsolve to solve using Laplace transforms. One advantage to using this option is that differential equations may contain the Dirac or Heaviside functions. These functions are not recognized by the rest of dsolve.\par - The series option causes dsolve to solve using a series method. The order of the solution can be specified by setting Order.\par - The initial conditions must be specified at x=0 if the laplace or series option is being used. Otherwise, the conditions may be initial or boundary conditions specified at any points. Derivatives in conditions are specified by applyin g D to the function name, e.g. the second derivative of y at 0 is given as D(D(y))(0) or (D@@2)(y)(0). \par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet dsolve(diff(y(x),x$2)+y(x)=x^2*cos(x),y(x));\par \pard\plain \s3 \f22\fs20 2 3\par y(x) = 1/4 x cos(x) + 1/6 sin(x) x - 1/4 cos(x) - 1/4 sin(x) x\par \par + _C1 sin(x) + _C2 cos(x)\par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet dsolve(\{diff(x(t),t)=x(t)+y(t)+cos(t),diff(y(t),t)=-x(t)+y(t)+sin(t)\},\{x(t),y(t)\});\par \pard\plain \qj \f20 2 3\par \pard\plain \s3 \f22\fs20 \{x(t) = 1/5 sin(t) cos(t) - 2/5 cos(t) + 2/5 cos(t) + 2/5 sin(t)\par \par - 1/10 cos(t) sin(2 t) - 1/5 cos(t) cos(2 t) + _C1 exp(t) sin(t)\par \par + _C2 exp(t) cos(t),\par \par y(t) = 1/10 sin(t) sin(2 t) + 1/5 sin(t) cos(2 t) - 3/5 cos(t)\par \par 3 2\par + 1/5 cos(t) - 2/5 sin(t) cos(t) - _C2 exp(t) sin(t)\par \par + _C1 exp(t) cos(t) \}\par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet dsolve(\{diff(y(t),t$2)+sin(y(t))=0\},y(t));\par \pard\plain \s3 \f22\fs20 y(t)\par /\par | 2\par t = | ---------------------- dy2 - _C2,\par | 1/2\par / (8 cos(y2) + 4 _C1)\par 0\par \par y(t)\par /\par | 2\par t = | - ---------------------- dy1 - _C2\par | 1/2\par / (8 cos(y1) + 4 _C1)\par 0\par \pard\plain \qj \f20 \par La fonction {\b dsolve} utilis\'8ee avec l'option {\b numeric} renvoie (si les conditions initiales sont pr\'8ecis\'8ees) une fonction qui fournira en chaque point une \'8evaluation num\'8erique de la solution\par \pard\plain \s2\sb120\keep\keepn \b\f22 ?dsolve[numeric]\par \pard\plain \s4\qj\li1120 \f20\fs20 - If the numeric option is specified then the differential equations must be specified with initial-value conditions. In this case, a procedure is returned as the result of the dsolve function. If this procedure is assigned to the name F, for example, then invoking F(t) for a numeric value of the independent variable t invokes a numerical method to solve the differential equation (or system of equations), yielding the numerical solution at t. The numerical solution is returned as an expression sequence consisting of the value of t, followed by the values of the dependent variables at the point t.\par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet f:=dsolve(\{diff(y(t),t$2)+sin(y(t))=0,y(0)=Pi/2,D(y)(0)=0\},y(t),numeric);\par \pard\plain \s3 \f22\fs20 f := proc(t) `dsolve/numeric/result2`(t,2359752,[2]) end\par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet f(1);\par \pard\plain \s3 \f22\fs20 1.0000000000, 1.074911685\par \pard\plain \s253\qj\li354\sb120\sa80 \b\f20 4. Suites r\'8ecurrentes\par \pard\plain \qj \f20 L'usage de la fonction {\b rsolve} pour r\'8esoudre les r\'8ecurrences est tout \'88 fait similaire \'88 celui de la fonction {\b dsolve} pour les \'8equations diff\'8erentielles.\par \pard\plain \s2\sb120\keep\keepn \b\f22 ?rsolve\par \pard\plain \s4\qj\li1120 \f20\fs20 FUNCTION: rsolve - recurrence equation solver\par CALLING SEQUENCE:\par rsolve(eqns, fcn)\par rsolve(eqns, fcn, ztrans)\par PARAMETERS:\par eqns - a single equation or a set of equations\par fcn - function to solve for\par ztrans - (optional) solve using Z-transforms\par SYNOPSIS: \par - The function rsolve attempts to solve the recurrence relation specified in eqns, returning an expression for the general term of the function.\par - The first argument should be a single recurrence relation or a set of recurrence relations and boundary conditions. Any expressions in eqns which are not equations will be understood to be equal to zero.\par - The second argument fcn indicates what rsolve should solve for. This expression should be either an unevaluated function call (or calls) of the form f(n), indicating that rsolve should return a general solution for f(n), or simply a function f, in whi ch case the arguments to f are deduced from the variables that occur in the calls to f in eqns.\par - First order linear difference equations are handled; in addition, certain classes of first order nonlinear difference equations are recognized.\par - The ztrans option causes rsolve to solve the difference equations using Z-Transforms.\par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet rsolve(\{x(n+1)=2*x(n)-x(n-1)\},x(n));\par \pard\plain \s3 \f22\fs20 x(0) + (- x(0) + x(1)) n\par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet rsolve(x(n+1)=2*x(n)+n,x(n));\par \pard\plain \s3 \f22\fs20 n n\par - n - 1 + 2 + 2 x(0)\par \pard\plain \s2\sb120\keep\keepn \b\f22 \bullet rsolve(\{x(n+1)=n*x(n)-1\},x(n));\par \pard\plain \s3 \f22\fs20 // n - 1 \\ \\\par || ----- | |\par || \\ 1 | |\par \{x(n) = GAMMA(n) || ) - --------------| - 1|, x(0) = x(0)\}\par || / GAMMA(_n2 + 1)| |\par || ----- | |\par \\\\_n2 = 1 / /\par \pard\plain \s254\qj\sb200\sa140 \b\f20\fs36\ul \page V.Exercices\par \pard\plain \s253\qj\li354\sb120\sa80 \b\f20 Exercice 1\par \pard\plain \qj \f20 On sait que \|i\|su({\dn4 k=1};{\up6 n}; k^p) est de la forme P{\dn4 p}(n), o\'9d P{\dn4 p} est un polyn\'99me de degr\'8e p+1. Construire une liste des P{\dn4 p} sous forme factoris\'8ee pour p allant de 0 \'88 10. On trouvera par exemple P{\fs20\dn4 0}(n)=n, P{\fs20\dn4 1}(n)=n(n+1)/2. Mots Maple \'88 utiliser : {\i map, list, sum, factor}.\par \pard\plain \s253\qj\li354\sb120\sa80 \b\f20 Exercice 2\par \pard\plain \qj \f20 R\'8esoudre l'\'8equation diff\'8erentielle yy"-y'{\fs20\up6 2}= 1 de mani\'8fre explicite (attention: la premi\'8fre r\'8eponse fournie par Maple n'est pas forc\'8ement la bonne).\par \pard\plain \s253\qj\li354\sb120\sa80 \b\f20 Exercice 3\par \pard\plain \qj \f20 Etudier l'\'8evolution d'un oscillateur double dont le sch\'8ema est le suivant les deux masses \'8etant relach\'8ees sans vitesse initale avec des d\'8ecalages initiaux x{\fs20\dn4 1,0} et x{\fs20\dn4 2,0} par rapport \'88 leurs positions de repos (axe orient\'8e vers la droite).\par \pard \qj\li-560 {{\pict\macpict\picw475\pich143 031300000000008f01db1101a10064000c574f524400000000008f01db01000a00000000008f01db70004a003f0024005f00a800510024005100340041003e005f0046003f0051005f005900410065005e006f0040007a005c00860040009100510099005100a7005200a8005100a70051002470004a004000b10060013500 5200b1005200c1004200cb006000d3004000de006000e6004200f2005f00fc00410107005d01130041011e00520126005201340053013500520134005200b170004a003e013e005e01c20050013e0050014e00400158005e0160003e016b005e01730040017f005d0189003f0194005b01a0003f01ab005001b3005001c100 5101c2005001c10050013e0a882288228822882234000500090083002909ff000000ff0000003834000501ba007f01da38a10096000c0200000001000000000000000300140d000c2b591e08726573736f72740d28002a00480f636f656666696369656e74206465202b0e0c0972617070656c206b0da00097a10096000c02 000000010000000000000028002000e308726573736f72740d28002c00d20f636f656666696369656e74206465202b0c0c0972617070656c204b0da00097a10096000c02000000010000000000000028001b017308726573736f72740d28002701620f636f656666696369656e74206465202b0e0c0972617070656c206b0d a00097a10096000c01000000010000000000000028006c0099076d61737365206da00097a10096000c01000000010000000000000028006a0127076d61737365206da00097a000ac09ffffffffffffffff6100290088004300a20042003061002900b7004300d100f60030220036009b2300a000ada000ac61002701190041 01330042003061002701460041016000f60030220034012c2100a000ad07000300030988228822882288222000500028005001b90aaa55aa55aa55aa55540044012e005e0148070001000109ffffffffffffffff5854004400a1005e00bb58a10096000c0100000001000000000000002b971d036d7572a00097a10096000c 01000000010000000000000028008b000e036d7572a00097ff}}\par \pard\plain \s253\qj\li354\sb120\sa80 \b\f20 Exercice 4\par \pard\plain \qj \f20 \sect \sectd \sbknone\linemod0\linex0\headery1077\footery1077\cols2\colsx709\endnhere \pard\plain \s253\qj\li354\sb120\sa80 \b\f20 \par \pard\plain \qj \f20 Etudier l'\'8evolution du double pendule pesant dans le champ de pesanteur, les deux masses \'8etant relach\'8ees sans vitesse initiale avec des angles initiaux {\f23 q}{\fs20\dn4 1,0} et {\f23 q}{\fs20\dn4 2,0}.\par {{\pict\macpict\picw230\pich254 027300000000014b00e61101a10064000c574f524400000000014b00e601000a00000000014b00e609aaaaaaaaaaaaaaaa60000bffd1008700510000005a60004e001c014a008a0000005a09ff00ff00ff00ff0020000c000f00dd000f070004000409ffffffffffffffff22000c000f3d3c20004a004d00ce007f0ab13003 1bd8c00c8d54004300450056005809b130031bd8c00c8d585400c2007100e6009358070001000109ffffffffffffffff600027ffe800410036005a005a09aa55aa55aa55aa5520004c004e00da004e09ffffffffffffffff60007c0039008e0063005a005aa10096000c0100000001000000000000000300170d000c2b214c 0171a00097a10096000c0100000001000000000000002b344d0171a00097a10096000c01000000010000000000000003001628005300270131a00097a10096000c0100000001000000000000002b354e0132a00097a10096000c0100000001000000000000002800180041014ca00097a10096000c01000000010000000000 00002b476e014ca00097a10096000c01000000010000000000000028002000460131a00097a10096000c0100000001000000000000002b496d0132a00097a10096000c0100000001000000000000002800440057016da00097a10096000c0100000001000000000000002b3c88016da00097a10096000c0100000001000000 0000000028004c005e0131a00097a10096000c0100000001000000000000002b3b880132a000970affffffffffffffff540006000a0016001a09aaaaaaaaaaaaaaaa58a10096000c02000000010000000000000028002700810f446f75626c652070656e64756c650d2b1c0c06706573616e74a00097ff}}\sect \sectd \sbknone\linemod0\linex0\headery1077\footery1077\cols1\colsx709\endnhere \pard\plain \s253\qj\li354\sb120\sa80 \b\f20 \page Exercice 5\par \pard\plain \qj \f20 La formule de Taylor Lagrange \'88 l'ordre 2 garantit que\par \pard \qc f(x)=f(0)+x f'(0)+x^2 f''(x{\f23 q}(x))/2\par \pard \qj pour un certain {\f23 q}(x){\f23 \'ce}[0,1]. Trouver un d\'8eveloppement limit\'8e de la fonction {\f23 q} en 0 \'88 l'ordre 2.\par Mots Maple \'88 utiliser: {\i series},{\i solve}.\par \pard\plain \s253\qj\li354\sb120\sa80 \b\f20 Exercice 6\par \pard\plain \qj \f20 Trouver un d\'8eveloppement asymptotique de la suite d\'8efinie par x{\fs20\dn4 n+1} = sin(x{\fs20\dn4 n}). Mots Maple \'88 utiliser: {\i rsolve, asympt}.\par \pard\plain \s253\qj\li354\sb120\sa80 \b\f20 Exercice 7\par \pard\plain \qj \f20 Evaluer la somme de k=1 \'88 10^6 de 1/x log(x). Utiliser la fonction {\i eulermac} que l'on chargera par un {\i rreadlib(eulermac)}.\par \pard\plain \s253\qj\li354\sb120\sa80 \b\f20 Exercice 8\par \pard\plain \qj \f20 Chercher les valeurs de {\i a} pour lesquelles le polyn\'99me X{\fs20\up6 5} +5a X{\fs20\up6 3}+a{\fs20\up6 2}X+1 a 5 racines r\'8eelles par les diff\'8erentes m\'8ethodes suivantes\par \tab a) poser T=X/\'c3|a| \par \tab b) introduire la suite de polyn\'99mes P{\fs20\dn4 0}(X), P{\fs20\dn4 1}(X)=P'(X) et P{\fs20\dn4 i+2}(X)=P{\fs20\dn4 i}(X) mod P{\fs20\dn4 i+1}(X) et n(x) le nombre de changement de signes dans la suite (P{\fs20\dn4 0}(x),P{\fs20\dn4 1}(x),P{ \fs20\dn4 2}(x),\'c9); alors le nombre de racines de P est \'8egal \'88 n(+\'b0)-n(-\'b0) (m\'8ethode de Sturm)\par \tab c) introduire la forme quadratique \|i\|su(i,j;;s{\fs20\dn4 i+j-2} x{\fs20\dn4 i}x{\fs20\dn4 j}) = \|i\|su(i;;(x{\fs20\dn4 1}+a{\fs20\dn4 i}x{\fs20\dn4 2}+a\|s({\fs20 2;i}) x{\fs20\dn4 3}+\'c9){\fs20\up6 2) }o\'9d les a{\fs20\dn4 i} sont les racines complexes de P et s{\fs20\dn4 k} = a\|s({\fs20 k;1}) + a\|s({\fs20 k;2)} + \'c9 ; tester si cette forme quadratique est d\'8efinie positive.\par }