Question: RE: rewriting an expression with substitution

Hello there, 

Would you allow me to ask this (perhaps simple) question?

My goal is to express an equation as 'desired', but with no success with algsubs()/subs()/simplify(). 

Would you please show me the correct way?

 

restart:

PowerBalanceEq := 0 = e1(t) * i1(t) + e2(t) * i2(t) + e3(t) * i3(t);

0 = e1(t)*i1(t)+e2(t)*i2(t)+e3(t)*i3(t)

(1)

eq_i1 := i1(t) = solve(PowerBalanceEq, i1(t));

i1(t) = -(e2(t)*i2(t)+e3(t)*i3(t))/e1(t)

(2)

n21eq := n21 = e2(t) / e1(t);

n21 = e2(t)/e1(t)

(3)

eq_i2 := algsubs(n21eq, eq_i1);

i1(t) = -(e2(t)*i2(t)+e3(t)*i3(t))/e1(t)

(4)

eq_i3 := subs(n21eq, eq_i1);

i1(t) = -(e2(t)*i2(t)+e3(t)*i3(t))/e1(t)

(5)

eq_i4 := simplify(eq_i1, {e2(t) / e1(t) = n21});

i1(t) = (-i2(t)*n21*e1(t)-e3(t)*i3(t))/e1(t)

(6)

desired := i1(t) = -n21*i2(t) - e3(t)*i3(t)/e1(t);

i1(t) = -n21*i2(t)-e3(t)*i3(t)/e1(t)

(7)

 


Best Regards, 

In Kwon Park 

Download Q20210316.mw

Please Wait...