Re: simplifying a system of equations
- To: mathgroup at smc.vnet.net
- Subject: [mg105993] Re: [mg105983] simplifying a system of equations
- From: "David Park" <djmpark at comcast.net>
- Date: Wed, 30 Dec 2009 04:10:50 -0500 (EST)
- References: <6597453.1262068246045.JavaMail.root@n11>
Use the third argument of Solve to specify which variables you want to
eliminate.
eqns = {x == y + z, y == e + r, z == t + u};
Part[Solve[eqns, x, {y, z}], 1, 1]
x -> e + r + t + u
Or use Eliminate to eliminate y and z and Solve the result:
Eliminate[eqns, {y, z}]
Solve[%, x][[1, 1]]
-r - t - u + x == e
x -> e + r + t + u
Or manipulate the result with a pure function:
Eliminate[eqns, {y, z}]
# + r + t + u & /@ %
-r - t - u + x == e
x == e + r + t + u
Or treat the equations as a pure cascade of substitutions.
x == y + z /. y -> e + r /. z -> t + u
x == e + r + t + u
Usually you can use Solve (although it is meant primarily for linear and
multinomial equations) but sometimes it's worth manipulating equations "by
hand".
David Park
djmpark at comcast.net
http://home.comcast.net/~djmpark/
From: Maria Davis [mailto:arbiadr at gmail.com]
Hi!
I have a system of equations, that I want to solve symbolically and
not numerically how can I do this?
example: suppose I have the following system of equations:
x=y+z
y=e+r
z=t+u
I want to obtain x=e+r+t+u as a result.
I have tried the command
Solve[x == y + z && y == e + r && z == t + u, {x}]
but Solve returns :x=y+z
Can you please help me?
Thank you in advance