Pivot et compagnie

Mise au point prétaupinale

1.5 Résolution de systèmes linéaires

1.5.1

> solve({2*x+2*y-3*z=2,y-6*z=-3,z=4});

{z = 4, y = 21, x = -14}

> solve({2*x+2*y-3*z=2,-6*z=-3,z=4});

L'absence de réponse signifie en fait qu'il n'y a pas de solution.

> solve({2*x+2*y-3*z=2,6*z=24,z=4});

{z = 4, x = 7-y, y = y}

1.5.2

> solve({2*x+2*y-3*z=2,-2*x-y-3*z=-5,6*x+4*y+4*z=16});

{z = 4, y = 21, x = -14}

1.5.4

> solve({2*x+y=4,x-3*y=9});

{x = 3, y = -2}

> solve({x+y+z=-4,2*x-y+2*z=-2,-3*x+y-z=-2,-3*x+y-z=-2});

{y = -2, z = -3, x = 1}

> solve({x-y+z-t=-2,2*x-3*y+z+t=1,x+y+z+t=0,-x-y+3*z+2*t=-5});

{y = 0, x = 1, t = 1, z = -2}

> solve({x+y=2,2*x+2*y=17});

> solve({x+y=2,2*x+2*y=4});

{y = y, x = 2-y}

> solve({x+y+z=3,2*x-y+4*z=2,4*x+y+6*z=8});

{z = -2+3/2*y, x = 5-5/2*y, y = y}

> solve({x+y+z+t=4,-x+y+2*z+t=2,2*x+y+3*z-t=-1,y+4*z-t=-3});

{x = 1+1/2*z, y = -11/4*z, z = z, t = 3+5/4*z}

> solve({x+y+z+t=4,-x+y+2*z+t=2,2*x+y+3*z-t=-1,y+4*z-t=4});

Pas de solution...

> solve({x+y-z-t=2,2*x+3*y+z+t=4,3*x+5*y+3*z+3*t=6,4*x+5*y-z-t=8});

{z = z, x = 2+4*z+4*t, t = t, y = -3*z-3*t}

> solve({x+y=3,alpha*x+2*y=4},{x,y});

{x = -2*1/(alpha-2), y = (3*alpha-4)/(alpha-2)}

Il a fallu direà Maple quelles étaientles inconnues. Par ailleurs, Maple ne distinguepas le cas alpha=2...

> alpha:=2:solve({x+y=3,alpha*x+2*y=4},{x,y});

Pas de solution

> restart;

Pour lui faire oublier la valeur de alpha (il y avait plus léger, mais bon...)

> solve({x+y=3,alpha*x+2*y=6},{x,y});

{x = 0, y = 3}

> alpha:=2:solve({x+y=3,alpha*x+2*y=6},{x,y});

{x = 3-y, y = y}

Comme quoi c'est perfide : il peut ne pas y avoir de division par alpha-2 dans le résultat, bien que le cas alpha=2 soit traité de façon fausse par Maple (en fait, Maple répond correctement à une question qui n'est pas celle qu'on croit...

> restart;

> solve({x+y+z=1,2*x+alpha*y-z=4,x-y+z=6},{x,y,z});

{x = 5/2+5/6*alpha, y = -5/2, z = 1-5/6*alpha}

En fait, Maple ne considère pas alpha comme un paramètre au sens où nous on l'entend... avec du métier (après le cours d'algèbre linéaire !) vous pourrez comprendre ce qui suit : on y détecte les alpha qui posent problème, puis on traite éventuellement à part les cas particuliers.

> with(linalg):

Warning, the protected names norm and trace have been redefined and unprotected

> det(matrix([[1,1,1],[2,alpha,-1],[1,-1,1]]));

-6

on sait alors qu'il y a toujours une unique solution...

> solve({x+y+z=1,2*x+alpha*y-z=4,x-y-z=6},{x,y,z});

{z = -1/2*(5*alpha-6)/(alpha+1), y = -11/2*1/(alpha...

> det(matrix([[1,1,1],[2,alpha,-1],[1,-1,-1]]));

-2-2*alpha

> alpha:=-1:solve({x+y+z=1,2*x+alpha*y-z=4,x-y-z=6},{x,y,z});

Pas de solution.

> solve({x+2*y-z+t=0,x+y+z-3*t=0,x+3*y-3*z+5*t=0});

{x = -3/2*y+t, z = 1/2*y+2*t, y = y, t = t}

> solve({9*c+7*fr+3*h+2*fe+5*m=140,7*c+6*fr+4*h+5*fe+3*m=128,3*c+5*fr+7*h+6*fe+4*m=116,2*c+5*fr+3*h+9*fe+4*m=112,c+3*fr+2*h+8*fe+5*m=95});

{c = 7, fr = 4, fe = 5, h = 3, m = 6}

4. Etudier une fonction

4.2 Limites

> limit((x^2+1)/(4+3*x^2+5*sqrt(x)),x=infinity);

1/3

> limit((1+x)*exp(x),x=infinity),limit((1+x)*exp(x),x=-infinity);

infinity, 0

> limit(x^(1/x),x=0);

undefined

> limit(x^(1/x),x=0,right);

0

Capito ?

> limit(x^(1/x),x=infinity);

1

> limit((1+x)^(1/x),x=0);

exp(1)

> limit((1+2/n)^n,n=infinity);

exp(2)

4.4 Graphes

> plot((1+x)*exp(x^3));

Plotting error, empty plot

> plot((1+x)*exp(x^3),x=-2..2);

[Maple Plot]

> plot((1+x)*exp(x^3),x=-2..0.1);

[Maple Plot]

C'est mieux, non ? Il semblerait qu'il y ait une inflexion, non ? Sauriez-vous le prouver ?

> plot((x^2+1)/(4+x));

Plotting error, empty plot

> plot((x^2+1)/(4+x),x=-8..2);

[Maple Plot]

> plot((x^2+1)/(4+x),x=-8..2,y=-3..3);

[Maple Plot]

> plot((x^2+1)/(4+x),x=-10..2,y=-20..20,discont=true);

[Maple Plot]

> plot((x^2+1)/(4+x),x=-15..10,y=-40..20,discont=true);

[Maple Plot]

> asympt((x^2+1)/(4+x),x);

x-4+17/x-68/x^2+272/x^3-1088/x^4+4352/x^5+O(1/(x^6)...

C'est ce qu'on appelle un développement asymptotique : les premiers termes fournissent l'asymptote.

5.4 Dériver/primitiver

> int(sin(3*t+5),t);

-1/3*cos(3*t+5)

> diff(2*cos(3/t^2),t);

12*sin(3*1/(t^2))/t^3

> diff(1/exp(sin(x/2)),x);

-1/2/exp(sin(1/2*x))*cos(1/2*x)

> diff(ln(1+cos(x)),x);

-sin(x)/(1+cos(x))

> diff(tan(1+sqrt(1+x^2)),x);

(1+tan(1+sqrt(1+x^2))^2)/(1+x^2)^(1/2)*x