Circuit Theory/Simultaneous Equations/Example 2/ex2MuPad

v_1 := Symbol::subScript(v,1);
I_1 := Symbol::subScript(I,1);
R_1 := Symbol::subScript(R,1);
R_2 := Symbol::subScript(R,2);
i_R1 := Symbol::subScript(i, R . 1);
i_R2 := Symbol::subScript(i, R . 2);
linsolve ([I_1-i_R1-i_R2=0,v_1=i_R1*R_1,v_1=i_R2*R_2],[v_1,i_R1,i_R2]);
I_1:=1;R_1:=100;R_2:=50;
linsolve ([I_1-i_R1-i_R2=0,v_1=i_R1*R_1,v_1=i_R2*R_2],[v_1,i_R1,i_R2]);
numeric::linsolve ([I_1-i_R1-i_R2=0,v_1=i_R1*R_1,v_1=i_R2*R_2],[v_1,i_R1,i_R2]);