Решение систем линейных уравнений
Выполните простое задание. Заодно потренируетесь в английском.
There are three friends, Alice, Bob, and Chuck. The sum of Alice's and Bob's ages are 1.5 times Chuck's age. Chuck's age minus Bob's age is 6. Alice's age added to Chuck's age is 2.25 as large as Bob's age. If Bob used to date Alice, but is now far away in a foreign country, and if Chuck thinks Alice is really cute, is Bob in big trouble? The mathematical part of this problem is just a problem in linear algebra of the form A*x = b, with the ages in the order [Alice, Bob, Chuck]. Here are A and b:
- restart;with(LinearAlgebra):
- A:=Matrix([[1,1,-3/2],[0,-1,1],[1,-2-1/4,1]]);
- b:=Vector([0,6,0]);
Надо решить относительно вектора x, составленного из возрастов трех друзей. В Maple есть команда LinearSolve, которая делает эту задачу простой:
- LinearSolve(A,b);
Так можно решить любую линейную систему. Позже мы посмотрим, как можно применить команду solve для решения уравнений.