Jump to content

Circuit Theory/Simultaneous Equations/Example 6/ex5MuPad

From Wikibooks, open books for an open world
R_1 := Symbol::subScript(R,1):
R_2 := Symbol::subScript(R,2):
L_5 := Symbol::subScript(L,5):
L_6 := Symbol::subScript(L,6):
C_4 := Symbol::subScript(C,4):
i_1 := Symbol::subScript(i,1):
i_2 := Symbol::subScript(i,2):
i_S := Symbol::subScript(i,S):
v_1 := Symbol::subScript(v,1):
v_2 := Symbol::subScript(v,2):
v_3 := Symbol::subScript(v,3):
v_4 := Symbol::subScript(v,4):
v_5 := Symbol::subScript(v,5):
v_6 := Symbol::subScript(v,6):

s := {
v_1(t) = i_1(5)*R_1, 
v_2(t) = i_2(t)*R_2,
i_1(t)=C_4(t)*v_4'(t),
v_5(t)=L_5*i_2'(t),
v_6(t)=L_6*i_S'(t),
v_4(t) + v_1(t) - v_3(t) + v_6(t) = 0,
v_5(t) + v_2(t) - v_4(t) = 0,
i_1(t) - i_2(t) - i_S(t) = 0};

ode::solve(s, {i_1(t),i_2(t),v_1(t),v_2(t),v_3(t),v_4(t),v_5(t),v_6(t)})