# how to express one expression in terms of other expressions symbolically?

Discussion in 'Mathematica' started by walala, Jan 23, 2004.

1. ### walalaGuest

Dear all,

I want to ask how to express the following terms into the form of (x1+x8),
(x1-x8), (x2+x7), (x2-x7), etc. This is variable substitution. How can do
this manipulation in mathematica symbolically?

[ a01*x1+a02*x2+a03*x3+a04*x4+a04*x5+a03*x6+a02*x7+a01*x8]
[ a05*x1+a06*x2+a07*x3+a08*x4-a08*x5-a07*x6-a06*x7-a05*x8]
[ a09*x1+a10*x2-a11*x3-a12*x4-a12*x5-a11*x6+a10*x7+a09*x8]
[ a13*x1-a14*x2-a15*x3-a16*x4+a16*x5+a15*x6+a14*x7-a13*x8]
[ a17*x1-a18*x2-a19*x3+a20*x4+a20*x5-a19*x6-a18*x7+a17*x8]
[ a21*x1-a22*x2+a23*x3+a24*x4-a24*x5-a23*x6+a22*x7-a21*x8]
[ a25*x1-a26*x2+a27*x3-a28*x4-a28*x5+a27*x6-a26*x7+a25*x8]
[ a29*x1-a30*x2+a31*x3-a32*x4+a32*x5-a31*x6+a30*x7-a29*x8]

Thank you!

-Walala

walala, Jan 23, 2004

2. ### Jens-Peer KuskaGuest

Hi,

Eliminate[
{x^2 - z^2 == s,
(* equations for the substitution *)
q == x - z, r == x + z}, {x, z}]

as equations and elimimate the unwanted variables.

Regards
Jens

Jens-Peer Kuska, Jan 24, 2004

3. ### Bob HanlonGuest

{{a01*x1 + a02*x2 + a03*x3 + a04*x4 +
a04*x5 + a03*x6 + a02*x7 + a01*x8},
{a05*x1 + a06*x2 + a07*x3 + a08*x4 -
a08*x5 - a07*x6 - a06*x7 - a05*x8},
{a09*x1 + a10*x2 - a11*x3 - a12*x4 -
a12*x5 - a11*x6 + a10*x7 + a09*x8},
{a13*x1 - a14*x2 - a15*x3 - a16*x4 +
a16*x5 + a15*x6 + a14*x7 - a13*x8},
{a17*x1 - a18*x2 - a19*x3 + a20*x4 +
a20*x5 - a19*x6 - a18*x7 + a17*x8},
{a21*x1 - a22*x2 + a23*x3 + a24*x4 -
a24*x5 - a23*x6 + a22*x7 - a21*x8},
{a25*x1 - a26*x2 + a27*x3 - a28*x4 -
a28*x5 + a27*x6 - a26*x7 + a25*x8},
{a29*x1 - a30*x2 + a31*x3 - a32*x4 +
a32*x5 - a31*x6 + a30*x7 - a29*x8}} //
FullSimplify

Bob Hanlon

<< I want to ask how to express the following terms into the form of (x1+x8),
(x1-x8), (x2+x7), (x2-x7), etc. This is variable substitution. How can do
this manipulation in mathematica symbolically?

[ a01*x1+a02*x2+a03*x3+a04*x4+a04*x5+a03*x6+a02*x7+a01*x8]
[ a05*x1+a06*x2+a07*x3+a08*x4-a08*x5-a07*x6-a06*x7-a05*x8]
[ a09*x1+a10*x2-a11*x3-a12*x4-a12*x5-a11*x6+a10*x7+a09*x8]
[ a13*x1-a14*x2-a15*x3-a16*x4+a16*x5+a15*x6+a14*x7-a13*x8]
[ a17*x1-a18*x2-a19*x3+a20*x4+a20*x5-a19*x6-a18*x7+a17*x8]
[ a21*x1-a22*x2+a23*x3+a24*x4-a24*x5-a23*x6+a22*x7-a21*x8]
[ a25*x1-a26*x2+a27*x3-a28*x4-a28*x5+a27*x6-a26*x7+a25*x8]
[ a29*x1-a30*x2+a31*x3-a32*x4+a32*x5-a31*x6+a30*x7-a29*x8]

Bob Hanlon, Jan 24, 2004