30 Reputation

One Badge

0 years, 142 days

MaplePrimes Activity

These are questions asked by pik1432

Hello all, 

I know this question is a little bit of stretch but is there any way to shuffle terms in an equation set, making those equations written in a standard form?

For example, here are three equations:

eq1:=(L1/n12 + n12*L2)*diff(i2(t), t) + L1*diff(i3(t), t)/n13 = -v1(t) - R1*i3(t)/n13 - R1*i2(t)/n12 + n12*v2(t) - n12*R2*i2(t);

eq2:=L1*diff(i2(t), t)/n12 + (L1/n13 + n13*L3)*diff(i3(t), t) = -v1(t) - R1*i3(t)/n13 - R1*i2(t)/n12 + n13*v3(t) - n13*R3*i3(t);

eq3:=-L2*diff(i2(t), t) + L1*diff(i1(t), t)/n12 = -v2(t) + R2*i2(t) + v1(t)/n12 - R1*i1(t)/n12;

In this equation set, it can be inferred that 'i1(t)', 'i2(t)' and 'i3(t)' would be the state variables and 'v1(t)', 'v2(t)' and 'v3(t)' are external input variables. 

Then, probably the set can be rewritten in the state space equation form, i.e., diff(X) = A*X + B*U, where X is the state variables vector and U is a vector of external input variables. 

Is there any chance to make Maple to rewrite the equations in this way?

Thank you in advance. 


Hello all, 

Would you teach me how to cancel a denominator term by multiplying the same term?

For example, I got this expression:

-L2*diff(i2(t), t) + L1*diff(i1(t), t)/n12

Then, I want to come to this expression by multiplying the expression with 'n12'

-L2*n12*diff(i2(t), t) + L1*diff(i1(t), t), 

But the result from my simple attempt was this:

(-L2*diff(i2(t), t) + L1*diff(i1(t), t)/n12)*n12

Thank you in advance!


Would you teach me how to collect and isolate specific terms in an equation?

For example, this is a given equation:

v1(t) - R1*(-i3(t)/n13 - i2(t)/n12) - L1*diff(-i3(t)/n13 - i2(t)/n12, t) = n12*(v2(t) - R2*i2(t) - L2*diff(i2(t), t))

From this equation, I wonder if there is a way to collect and isolate the derivative terms at the RHS, like this:

(- L1/n12+(n12 * L2))*diff(i2(t), t) + (L1/n13)*diff(i3(t), t) = -v1(t) + R1*(-i3(t)/n13 - i2(t)/n12) + n12*v2(t) - n12*R2*i2(t)

Thank you in advance!


Would you tell me how to achieve this?

> eqn1 := e1*i1 + e2*i2 + e3*i3 = 0

solve( { eqn1 } , { i1 } , explicit ) ;
                     /       e2 i2 + e3 i3\ 
                    { i1 = - ------------- }
                     \            e1      / 
Then, I want to replace 'e2/e1' with this expression:

> eqn2 := n12 = e1/e2;

In other words, I want to express the following:

                       /       e2 i2 + e3 i3\ 
                    { i1 = - ------------- }
                     \            e1      / 

as this:

                      /          -i2     - e3 i3\ 
                    { i1 =  ------   + ------ }
                     \            n12        e1   / 


Thank you in advance!


Here are two matrices:

Ts:=matrix([[cos(omega*t), cos(omega*t-2/3*Pi), cos(omega*t+2/3*Pi)], [sin(omega*t), sin(omega*t-2/3*Pi), sin(omega*t+2/3*Pi)],[1/2, 1/2, 1/2]]);

Then, if I attempt this operation, 'simplify(multiply(Ts, Xin));', this becomes the result:

Matrix(3, 1, [[cos(omega*t)*cos(omega*t+alpha)+cos(omega*t+(1/3)*Pi)*cos(omega*t+alpha+(1/3)*Pi)+sin(omega*t+(1/6)*Pi)*sin(omega*t+alpha+(1/6)*Pi)], [sin(omega*t)*cos(omega*t+alpha)+sin(omega*t+(1/3)*Pi)*cos(omega*t+alpha+(1/3)*Pi)-cos(omega*t+(1/6)*Pi)*sin(omega*t+alpha+(1/6)*Pi)], [(1/2)*cos(omega*t+alpha)-(1/2)*cos(omega*t+alpha+(1/3)*Pi)-(1/2)*sin(omega*t+alpha+(1/6)*Pi)]])

However, if I attempt to reduce each row, the previous result is reduced much further. 

For example, this shows the expand operation applied to the first row and its result.  

expand(3*cos(alpha)*(1/2)+(1/2)*cos(2*omega*t+alpha)-(1/2)*sin(2*omega*t+(1/6)*Pi+alpha)-(1/2)*cos(2*omega*t+(1/3)*Pi+alpha), trig);


Is there any way to reduce the entire matrix in a similar way, instead of using this element by element operation?


Page 1 of 1