Re: problems with parameter lumping using ReplaceAll
- To: mathgroup at smc.vnet.net
- Subject: [mg105887] Re: [mg105871] problems with parameter lumping using ReplaceAll
- From: Bob Hanlon <hanlonr at cox.net>
- Date: Wed, 23 Dec 2009 02:42:15 -0500 (EST)
- Reply-to: hanlonr at cox.net
sol /. {V1 -> w + V2, V3 -> x + V4} // Simplify
Bob Hanlon
---- sean <sean_incali at yahoo.com> wrote:
=============
Hello Group,
I have a pretty nasty expression that I'm trying the lump the
parameters for.
I'm having problems making mathematica perform the following
replacement.
Like I said it's pretty nasty and hope it pastes ok.
sol = {{C[0]->p/(-4 a+4 b)+(Sqrt[l^2-m] vd)/(-4 a+4 b)-Sqrt[u-v-2 Sqrt
[l^2-m] q vd-2 Sqrt[l^2-m] r vd]/(-4 a+4 b),M[0]->-(i/(2 V1-2 V2))-j/
(2 V1-2 V2)+Sqrt[s^2-4 t]/(2 V1-2 V2)+V1/(2 V1-2 V2)-V2/(2 V1-2 V2),X
[0]->l/(2 V3-2 V4)+Sqrt[l^2-m]/(2 V3-2 V4)},{C[0]->p/(-4 a+4 b)+(Sqrt
[l^2-m] vd)/(-4 a+4 b)-Sqrt[u-v-2 Sqrt[l^2-m] q vd-2 Sqrt[l^2-m] r vd]/
(-4 a+4 b),M[0]->i/(-2 V1+2 V2)+j/(-2 V1+2 V2)+Sqrt[s^2-4 t]/(-2 V1+2
V2)-V1/(-2 V1+2 V2)+V2/(-2 V1+2 V2),X[0]->l/(2 V3-2 V4)+Sqrt[l^2-m]/(2
V3-2 V4)},{C[0]->p/(-4 a+4 b)+(Sqrt[l^2-m] vd)/(-4 a+4 b)+Sqrt[u-v-2
Sqrt[l^2-m] q vd-2 Sqrt[l^2-m] r vd]/(-4 a+4 b),M[0]->-(i/(2 V1-2 V2))-
j/(2 V1-2 V2)+Sqrt[s^2-4 t]/(2 V1-2 V2)+V1/(2 V1-2 V2)-V2/(2 V1-2 V2),X
[0]->l/(2 V3-2 V4)+Sqrt[l^2-m]/(2 V3-2 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 V2),X[0]->f/(-2 V3+2 V4)+g/(-2 V3+2
V4)+Sqrt[l^2-m]/(-2 V3+2 V4)-V3/(-2 V3+2 V4)+V4/(-2 V3+2 V4)},{C[0]->p/
(-4 a+4 b)-(Sqrt[l^2-m] vd)/(-4 a+4 b)+Sqrt[u-v+2 Sqrt[l^2-m] q vd+2
Sqrt[l^2-m] r vd]/(-4 a+4 b),M[0]->i/(-2 V1+2 V2)+j/(-2 V1+2 V2)+Sqrt
[s^2-4 t]/(-2 V1+2 V2)-V1/(-2 V1+2 V2)+V2/(-2 V1+2 V2),X[0]->f/(-2
V3+2 V4)+g/(-2 V3+2 V4)+Sqrt[l^2-m]/(-2 V3+2 V4)-V3/(-2 V3+2 V4)+V4/
(-2 V3+2 V4)}}
sol//. 2 V1-2 V2-> 2w/. 2 V3-2 V4 -> 2x//Simplify
If you try it, 2 V1- 2 V2 is only replaced in every other denominator
in the solutions. (There are 8 equilibrium points in the sol up there)
It also fails to recognize that -V1 + V2 is -w.
Similarly, 2 V3-2 V4 -> 2x fails to replace in some of the
expressions.
It seems like it has to do with - sign in front of the expression that
mathematica is trying to make the replacements into. If the expression
contains the - sign, it doesn't replace the expression.
Question is how do I make the replacements regardless the sign?
Thanks much in advance.
Sean