kill(all);

nu:1.004*10**-6;del:0.02*10**-3;

K1:0.679;K2:0.378;K3:0.679;

D1:0.25;D2:0.2;D3:0.25;

L1:400;L2:200;L3:500;

Q:100;

eq:Q1+Q2+Q3=Q;

eq1:Q1-Q2*(K1/K2)*sqrt(L2/L1)=0;

eq2:Q1-Q3*(K1/K3)*sqrt(L3/L1)=0;

solve([eq,eq1,eq2],[Q1,Q2,Q3]);

q1:-((sqrt(2)*(788549472*5^(7/2)-145409499000)-2903165768*5^(5/2)-92918579500)/3999761039),numer;

q2:(-(877972608*5^(7/2))+sqrt(2)*(1616195376*5^(5/2)+51727869000)+161899236000)/3999761039,numer;

q3:(sqrt(2)*(2326551984*5^(5/2)-197137368000)+1486697272*5^(5/2)+145158288400)/3999761039,numer;

q1+q2+q3;

V1:(q1/((%pi*D1**2)/4))*10**-3,numer;

V2:(q2/((%pi*D2**2)/4))*10**-3,numer;

V3:(q3/((%pi*D3**2)/4))*10**-3,numer;

Re1:(V1*D1)/nu;Re2:(V2*D2)/nu;Re3:(V3*D3)/nu;

Re1*del/D1;Re2*del/D2;Re3*del/D3;

# KRAMER

(K1/K2)*sqrt(L2/L1),numer;

(K1/K3)*sqrt(L3/L1),numer;

M:matrix([1,1,1],[1,-1.27,0],[1,0,-1.12]);

DET:determinant(M);

M1:matrix([100,1,1],[0,-1.27,0],[0,0,-1.12]);

M2:matrix([1,100,1],[1,0,0],[1,0,-1.12]);

DET2:determinant(M2)/DET;

M3:matrix([1,1,100],[1,-1.27,0],[1,0,0]);

DET3:determinant(M3)/DET;

TEST:DET1+DET2+DET3;

MTR: matrix(
 [1,1,1], 
 [1,-1.27,0], 
 [1,0,-1.12]
);

determinant(%);

# Gaussa

N1:[1,1,1,100];n1:[1,1,1,100];

N2:[1,-1.27,0,0];n2:[1,-1.27,0,0];

N3:[1,0,-1.12,0];n3:[1,0,-1.12,0];

for i:1 thru 4 step 1 do (a:N2[i]-N1[i],N2[i]:a)$

N2;

for i:1 thru 4 step 1 do (a:N3[i]-N1[i],N3[i]:a)$

N3;

for i:1 thru 4 step 1 do (a:N3[i]+(N2[i]/N2[2]),N3[i]:a)$

N3;

matrix([N1],[N2],[N3]);

Q3:N3[4]/N3[3];

Q2:(N2[4]-N2[3]*Q3)/N2[2];

Q1:(N1[4]-N1[3]*Q3-N1[2]*Q2)/N1[1];

test

Q1+Q2+Q3;