Demandes associées au chapitre-notebook: 
"Systèmes d'équations"

Pour accéder au code relatif à un exemple, double-cliquer sur le triangle du crochet icônique à droite.

Exemple 1

Solve[{x - 2 y + z - t == 1, x - 3 y - 3 z - t == 2, 
        3 x + 5 y - 3 z + t == 3, -x + y - z + 3 t == 0}, {x, y, z, 
        t}]

Exemple 2

Solve[{x - 2 y + z - t == 1, x - 3 y - 3 z - t == 2, 
        3 x + 5 y - 3 z + t == 3, -x + y - z + 3 t == 0}]

Exemple 3

Solve[{x + 2 y - z - t == 1, x - 3 y - 3 z - t == 2, 
        3 x + 6 y - 3 z - 3 t == 3, x + 2 y - 3 z - t == 0}, {x, y, z, 
        t}]

Exemple 4

Reduce[{x + 2 y - z - t == 1, x - 3 y - 3 z - t == 2, 
        3 x + 6 y - 3 z - 3 t == 3, x + 2 y - 3 z - t == 0}, {x, y, z, 
        t}]

Exemple 5

Solve[{x + 2 y - z - t == 1, x + 3 y - 3 z - t == 2, 
        x + 2 y - z - t == 0, -x - y - z + 3 t == 0}]

Exemple 6

Solve[{x + 2 y - z - a t == 1, 
        x + 3 y + (a - 3) z - (a - b) t == 2, 
        3 x + 6 y + (a - b - 3) z + (b - 3 a - 2) t == 3, 
        -x - y + (b - 1) z + (2 a - b + 2) t == 0}, {x, y, z, 
        t}]

x + 2 y - z - a t == 1 /. %

{x + 2 y - z - a t /. %%, 
      x + 3 y + (a - 3) z - (a - b) t /. %%, 
      3 x + 6 y + (a - b - 3) z + (b - 3 a - 2) t /. %%, 
      -x - y + (b - 1) z + (2 a - b + 2) t /. %%}

Exemple 7

Reduce[{x + 2 y - z - a t == 1, 
        x + 3 y + (a - 3) z - (a - b) t == 2, 
        3 x + 6 y + (a - b - 3) z + (b - 3 a - 2) t == 3, 
        -x - y + (b - 1) z + (2 a - b + 2) t == 0}, {x, y, z, 
        t}]

x == -1 + 6 t + z et y == 1 - 2 t et b == 2 et a == 2

-2 + a ≠ 0 et b == a et x == 
      -1 - 3 z + 2 a z ety == 1 + 2 z - a z et t == 0

-a + b ≠ 0 et x == -et y == et z == 0 et t == 0

Reduce[{x + 2 y - z - a t == 1, 
          x + 3 y + (a - 3) z - (a - b) t == 2, 
          3 x + 6 y + (a - b - 3) z + (b - 3 a - 2) t == 3, 
          -x - y + (b - 1) z + (2 a - b + 2) t == 0}, {x, y, 
          z, t}] /. {b -> a, a -> 4}

x == -1 + 5 z , y == 1 - 2 z , t == 0

x == -1 + 6 t + z && y == 1 - 2 t && b == 2 && a == 2 || 
        -2 + a ≠ 0 && b == a && x == -1 - 3 z + 2 a z && 
          y == 1 + 2 z - a z && t == 0 || 
        -a + b ≠ 0 && x == -1 && y == 1 && z == 0 && 
          t == 0 /. {b -> a, a -> 4}

x == -1 + 5 z , y == 1 - 2 z , t == 0

Exemple 8

Solve[3 a - 2 b == -8, a]

5 a + 7 b == 17 /. %

Solve[%, b]

{{a -> -(2/3) (4 - b)}} /. %

Flatten[%]

Solve[5 a + 7 b == 17 /. Solve[3 a - 2 b == -8, a], b]

Solve[{3 a - 2 b == -8, 5 a + 7 b == 17}, {a, b}]

N[a /. %]

N[b /. %%]

Needs["Graphics`ImplicitPlot`"]

ImplicitPlot[{3 a - 2 b == -8, 5 a + 7 b == 17}, {a, -5, 
        5}, {b, 0, 5}];

{-0.706068, 2.93829}

Exemple 9

relation1 = (y^2) + (z^2) == (x^2);

relation2 = x - y == 1;

relation3 = y - z == 1;

relation1 /. Solve[relation2, x] /. Solve[relation3, z]

Solve[Flatten[%], y]

relation2 /. %

relation3 /. %%

Solve[-4 + x == 1, x]

Solve[4 - z == 1, z]

{{y -> 0, x -> 1, z -> -1}, {y -> 4, 
        x -> 5, z -> 3}}

relation1
       /. {{y -> 0, x -> 1, z -> -1}, {y -> 4, 
          x -> 5, z -> 3}}

relation2
       /. {{y -> 0, x -> 1, z -> -1}, {y -> 4, 
          x -> 5, z -> 3}}

relation3
       /. {{y -> 0, x -> 1, z -> -1}, {y -> 4, 
          x -> 5, z -> 3}}

relation1
       /. {{y -> 0, x -> 5, z -> -1}, {y -> 4, 
          x -> 1, z -> 3}}

relation1
       /. {{y -> 0, x -> 5, z -> 3}, {y -> 4, 
          x -> 1, z -> -1}}

Solve[{relation1, relation2, relation3}, {x, y, z}]

ImplicitPlot[
      Evaluate[{relation1, relation2, relation3} /. z -> -1], {x, 
        -10, 10}, {y, -10, 10}];

relation1 /. z -> -1

relation2 /. z -> -1

relation3 /. z -> -1

ImplicitPlot[
      Evaluate[{relation1, relation2, relation3} /. z -> 3], {x, 
        -10, 10}, {y, -10, 10}];

relation1 /. z -> 3

relation2 /. z -> 3

relation3 /. z -> 3

Exemple 10

E1 = {x + 2 y - z - a t, 1};

E2 = {x + 3 y + (a - 3) z - (a - b) t, 2};

E3 = {3 x + 6 y + (a - b - 3) z + (b - 3 a - 2) t, 3};

E4 = {-x - y + (b - 1) z + (2 a - b + 2) t, 0};

E12 = Simplify[E2 - E1]

E13 = Simplify[E3 - 3 E1]

E14 = Simplify[E4 + E1]

E142 = E14 - E12

Print/@{E1, E12, E13, E142};

E1423 = E142 + E13

{-2 t + b t + a z - b z, 0} /. t -> 0

{b t + y - 2 z + a z, 1} /. {z -> 0, t -> 0}

{x + 2 y - z - a t, 1} /. {z -> 0, t -> 0, y -> 1}

E12 /. b -> a

E13 /. b -> a

E1 /. b -> a /. a -> 2

E12 /. b -> a /. a -> 2

Solve[{2 t + y == 1, -2 t + x + 2 y - z == 1}, {x, y}]

Simplify[%]

E1 /. {t -> 0}

E12 /. {t -> 0}

Solve[{x + 2 y - z == 1, y - 2 z + a z == 1}, {x, y}]

Simplify[%]

Clear [E1, E2, E3, E4, E12, E13, E14, E1423, E142]

Exemple 11

?NSolve

NSolve[{x + 2 y - z - (t/(10^3)) == 1, 
        x + 5 y + (π - 3) z - (t/(10^4)) == 2, 
        3 x + 6 y + 200 z - 2 t == 3, -x - y + z + 0.001 t == 0}, {
        x, y, z, t}]