POLYMATH Report          LEQ 
 Linear Equations 2016-May-30 

Linear Equations Solution
    Variable Value
1 c 0.652529
2 e 0.347471
3 b 0.163132
4 d 0.59217
5 a 0.231648

The equations
[1] c + e = 1
[2] -2·c + 3·b - 2·d = -2
[3] -0.27·c - 2·e - d + 2·a = -1
[4] -0.25·c + b = 0
[5] -e + 1.5·a = 0

Problem source text
# S. 2* - Linear Eqs.
# Biological Reactors
# Verified Solution: a=0.231648, b = 0.163132, c = 0.652529 # d=0.59217, e = 0.347471
# Ref.:Prob. 2.3 in Problem Solving in Chemical...
c+e=1
3*b-2*c-2*d=-2
2*a-0.27*c-d-2*e=-1
b=0.25*c
1.5*a = e

Coefficients matrix and beta vector
    c e b d a beta
1 1 1 0 0 0 1
2 -2 0 3 -2 0 -2
3 -0.27 -2 0 -1 2 -1
4 -0.25 0 1 0 0 0
5 0 -1 0 0 1.5 0

Matlab formatted problem
Create m file called PolyLEQ.m and paste the following text into it.
% S. 2* - Linear Eqs.
% Biological Reactors
% Verified Solution: a=0.231648, b = 0.163132, c = 0.652529 # d=0.59217, e = 0.347471
% Ref.:Prob. 2.3 in Problem Solving in Chemical...
clc;
A = [ 1 1 0 0 0 ;-2 0 3 -2 0 ;-0.27 -2 0 -1 2 ;-0.25 0 1 0 0 ; 0 -1 0 0 1.5 ];
beta = [ 1 ;-2 ;-1 ; 0 ; 0 ];
x = A \ beta;
fprintf('c = %16.6f \n',x(1));
fprintf('e = %16.6f \n',x(2));
fprintf('b = %16.6f \n',x(3));
fprintf('d = %16.6f \n',x(4));
fprintf('a = %16.6f \n',x(5));

General Settings
Number of equations: 5
Reporting digits: 8