RE: Is mathematica able to transform formula
- To: mathgroup at smc.vnet.net
- Subject: [mg71879] RE: [mg71864] Is mathematica able to transform formula
- From: "David Park" <djmp at earthlink.net>
- Date: Sat, 2 Dec 2006 05:10:45 -0500 (EST)
pujo,
Do you mean that you want to do it in steps, like one might do it by hand?
Then you could use the following.
eqn1 = f == a b + 5;
eqn2 = c == a b;
Inner[Subtract, eqn1, eqn2, Equal]
# + c & /@ % giving
-c + f == 5
f == 5 + c
We first subtracted the two equations, and then used a pure function to add
c to both sides. If you wanted a more complicated combination of the two
equations, say 2 times the first equation minus three times the second
equation, then you could use a pure function in the Inner command rather
than Subtract. 2 #1 - 3 #2&.
You could also do it using Solve
Equal @@ Part[Solve[{eqn1, eqn2}, f, a], 1, 1]
f == 5 + c
David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/
From: ajikoe at gmail.com [mailto:ajikoe at gmail.com]
Hello,
I have a question:
if I have a symbolic expression:
f = a * b + 5
c = a * b
Can Mathematica builds f = c + 5 for me ?
Sincerely Yours,
pujo