RE: Interactive simplifying

*To*: mathgroup at smc.vnet.net*Subject*: [mg31927] RE: [mg31913] Interactive simplifying*From*: "David Park" <djmp at earthlink.net>*Date*: Wed, 12 Dec 2001 04:14:12 -0500 (EST)*Sender*: owner-wri-mathgroup at wolfram.com

Steve, You are correct that cutting and pasting is not a great way to manipulate an equation. I think you can better do what you wish by mapping pure functions onto both sides of the equation. Here is a solution of a simpler version of your equation using this technique. I'll leave the more complicated case to you. Sqrt[a*z + b] + Sqrt[c*z + d] == g (#1^2 & ) /@ % //ExpandAll (#1 - g^2 - 2*Sqrt[b + a*z]*Sqrt[d + c*z] & ) /@ % (#1^2 & ) /@ % //ExpandAll %[[1]] - %[[2]] == 0 (Collect[#1, z] & ) /@ % Solve[%, z] I guess I shouldn't say that there was no copying and pasting. I did copy and paste the expressions to be shifted from one side of the equation to the other into the third line. David Park djmp at earthlink.net http://home.earthlink.net/~djmp/ > From: Steve Gray [mailto:stevebg at adelphia.net] To: mathgroup at smc.vnet.net > > I am trying to do something like this: > Solve[Sqrt[a*z+b] + Sqrt[c*z+d] + Sqrt[e*z+f] == g, z] , > which on first try gives an answer with about 10,000 terms. In > addition, the > output is all messed up. Totally useless. > Thinking to help it along, I used the common trick of putting > one of the > Sqrt's on the right side, squaring the whole thing, collecting > the Sqrt's on > one side, squaring, and doing it again until no sqrts are left. > This gives a > complicated but not impossible 4th degree polynomial in z (with about 400 > terms of a,...,g to various low powers), which with good substitutions of > new simplifying parameters is manageable. > I did this with Mathematica's help but in a very awkward way: I got a > partial answer, saw what the best next step would be, cut and > pasted part of > the expression onto a new line, added parentheses and squarings here and > there, manually transposed with proper sign changes, etc. This worked and > was not too painful but is very prone to error. > I thought that M. would have Transpose and other operators to help, or > even select-and-drag with automatic sign change and other "corrections." > There oughta be a better way. Anyone? Thanks in advance for any help. > >