开发者

How do you flip an equation (exchange LHS with RHS) in Maple?

I have an equation whic开发者_StackOverflow中文版h has been reduced to the form

eqn1 := f(x,y,z) = T;

Now I have another equation that involves T as a variable

eqn2 := g(T,x,y,z);

I want to replace T with f(x) in eqn2. If I had eqn1 in the form

eqn1better := T = f(x,y,z);

Then the following command would do what I want.

algsubs(eqn1better, eqn2);

So how do I swap the left-hand side and the right-hand side of an equation to turn eqn1 into eqn1better?


Maple gives you the functions lhs and rhs, have you tried using them.

eqn1 := f(x,y,z) = T;
eqn1better := rhs(eqn1) = lhs(eqn1)


I stumbled upon another function to do what I want. It only works in the specific case of

eqn1 := f(x) = T

but using the isolate function will also solve the problem I have specified.

eqn1better := isolate(eqn1, T);

adamse's answer is better because it solves the general case of reversing any equation, regardless of whether or not one side is a single variable.


To solve the bigger problem, you should consider eliminate. You can just to eliminate({eqn1,eqn2},T) and get as a result both the substitution and the result.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜