Linear Algebra/Topic: Computer Algebra Systems/Solutions

From Wikibooks, open books for an open world
< Linear Algebra‎ | Topic: Computer Algebra Systems
Jump to navigation Jump to search


Answers for this Topic use Maple as the computer algebra system. In particular, all of these were tested on Maple V running under MS-DOS NT version 4.0. (On all of them, the preliminary command to load the linear algebra package along with Maple's responses to the Enter key, have been omitted.) Other systems have similar commands.

Problem 1

Use the computer to solve the two problems that opened this chapter.

  1. This is the Statics problem.
  2. This is the Chemistry problem.
  1. The commands
    > A:=array( [[40,15],
    [-50,25]] );
    > u:=array([100,50]);
    > linsolve(A,u);

    yield the answer .
  2. Here there is a free variable:
    > A:=array( [[7,0,-7,0],
    [0,3,-6,-1]] );
    > u:=array([0,0,0,0]);
    > linsolve(A,u);

    prompts the reply .
Problem 2

Use the computer to solve these systems from the first subsection, or conclude "many solutions" or "no solutions".


These are easy to type in. For instance, the first

> A:=array( [[2,2],
[1,-4]] );
> u:=array([5,0]);
> linsolve(A,u);

gives the expected answer of . The others are entered similarly.

  1. The answer is and .
  2. The answer is and .
  3. This system has infinitely many solutions. In the first subsection, with as a parameter, we got and . Maple responds with , for some reason preferring as a parameter.
  4. There is no solution to this system. When the array and vector are given to Maple and it is asked to linsolve(A,u), it returns no result at all, that is, it responds with no solutions.
  5. The solutions is .
  6. There are many solutions. Maple gives .
Problem 3

Use the computer to solve these systems from the second subsection.


As with the prior question, entering these is easy.

  1. This system has infinitely many solutions. In the second subsection we gave the solution set as
    and Maple responds with .
  2. The solution set has only one member
    and Maple has no trouble finding it .
  3. This system's solution set is infinite
    and Maple gives .
  4. There is a unique solution
    and Maple gives .
  5. This system has infinitely many solutions; in the second subsection we described the solution set with two parameters
    as does Maple .
  6. The solution set is empty and Maple replies to the linsolve(A,u) command with no returned solutions.
Problem 4

What does the computer give for the solution of the general system?


In response to this prompting

> A:=array( [[a,c],
[b,d]] );
> u:=array([p,q]);
> linsolve(A,u);

Maple thought for perhaps twenty seconds and gave this reply.