Re: Simplifying algebraic expr: howto?
- To: mathgroup@smc.vnet.net
- Subject: [mg11397] Re: Simplifying algebraic expr: howto?
- From: "Daniel G. Hyams" <dgh2@Ra.MsState.EDU>
- Date: Sun, 8 Mar 1998 20:13:20 -0500
- Organization: Mississippi State University
- References: <6dqqf0$rk0@smc.vnet.net>
On 7 Mar 1998, Daniel G. Hyams wrote: > > I apologize for the (probable) simpleness of this questions, but I am > new to mathamatica... > > I have an expression (for example): > > u*(nx*u + ny*v) ---- (1) > > and a definition: > > theta = nx*u+ny*v > > How do I get mathematica to simplify the expression (1) such that it > returns: > > u*theta ? Thanks to the couple of folks who responded to the questions, but I am afraid that I did not make it clear enough... The code that follows does indeed work: T = (nx*u+ny*v)*u T /. (nx*u+ny*v -> t) Mathematica: t*u But, this seems to do just a textual-type substitution. The following snippet does not work (like I want it to): T = (nx*u+ny*v)*u + (-nx*u-ny*v)*v T /. (nx*u+ny*v -> t) Mathematica: t*u + v(-nx*u - ny*v) Obviously, the solution that I want is: t*u-t*v The point is that the variable "t" is in a very complicated expression, which can be considerably simplified by factoring it out, if only I could tell Mathematica its identity. It also appears as v*nx*u + ny*v^2 = v(nx*u + ny*v) = v*t or nx^2*u + 2*nx*ny*u*v + ny^2*v = (nx*u+ny*v)^2 = t^2 and I would like Mathematica to identify occurances like these. ----------------------------------------------------------- Daniel G. Hyams email: dhyams@ebicom.net phone: (601) 323-4198 -----------------------------------------------------------
- Follow-Ups:
- Re: Re: Simplifying algebraic expr: howto?
- From: Daniel Lichtblau <danl@wolfram.com>
- Re: Re: Simplifying algebraic expr: howto?