Jump to content

Circuit Theory/Simultaneous Equations/Example 5/ex5MuPad

From Wikibooks, open books for an open world
R_1 := Symbol::subScript(R,1):
R_2 := Symbol::subScript(R,2):
R_3 := Symbol::subScript(R,3):
R_4 := Symbol::subScript(R,4):
R_5 := Symbol::subScript(R,5):
I_1 := Symbol::subScript(I,1):
I_2 := Symbol::subScript(I,2):
V_1 := Symbol::subScript(V,1):
i_R1 := Symbol::subScript(i,R1):
i_R2 := Symbol::subScript(i,R2):
i_R3 := Symbol::subScript(i,R3):
i_R4 := Symbol::subScript(i,R4):
v_R1 := Symbol::subScript(v,R1):
v_R2 := Symbol::subScript(v,R2):
v_R3 := Symbol::subScript(v,R3):
v_R4 := Symbol::subScript(v,R4):
v_R5 := Symbol::subScript(v,R5):
v_I1 := Symbol::subScript(v,I1):
v_I2 := Symbol::subScript(v,I2):

linsolve([
v_R1 = i_R1 * R_1,
v_R2 = i_R2 * R_2,
v_R3 = i_R3 * R_3,
v_R4 = i_R4 * R_4,
v_R5 = -I_2 * R_5,
v_R2 + v_R1 - V_1 = 0,
v_R3 + v_R4 + v_I1 - v_R2 = 0,
v_R5 + v_I2 - v_R4 = 0,
i_R1 - i_R2 - i_R3 = 0,
i_R3 + I_2 - i_R4 = 0,
i_R4 - I_2 - I_1 =0
],[
i_R1, i_R2, i_R3, i_R4, v_R1, v_R2, v_R3, v_R4, v_R5, v_I1, v_I2]);