Re: Convincing Mathematica that Sqrt[a+b]Sqrt[a-b]==Sqrt[a^2+b^2]
- To: mathgroup at smc.vnet.net
- Subject: [mg63272] Re: [mg63258] Convincing Mathematica that Sqrt[a+b]Sqrt[a-b]==Sqrt[a^2+b^2]
- From: Pratik Desai <pdesai1 at umbc.edu>
- Date: Thu, 22 Dec 2005 00:04:33 -0500 (EST)
- References: <200512210435.XAA14733@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Steven T. Hatton wrote: >Is there a way to convince Mathematica to multiply Sqrt[a+b]Sqrt[a-b] to >produce Sqrt[a^2+b^2]? > > You mean Sqrt[a^2-b^2] not Sqrt[a^2+b^2] To show the latter is beyond my capabilities :-) After trying to convince mathematica for about 15 minutes, I decided to take matters in to my own hands powexp = Sqrt[x__]*Sqrt[y__] -> Sqrt[x*y] Sqrt[a-b]*Sqrt[a+b]/.powexp//Simplify >>Sqrt[a^2-b^2] This is ofcourse assuming that a and b are real, which is why Mathematica is reluctant to carry out the expansion in the first place Hope this helps Pratik -- Pratik Desai ...Moderation, as well as Regularity of Thinking, so much to be wished for in the Heads of those who imagine they come into the World only to watch and govern it?s Motion Gulliver's Travels by Jonathan Swift
- References:
- Convincing Mathematica that Sqrt[a+b]Sqrt[a-b]==Sqrt[a^2+b^2]
- From: "Steven T. Hatton" <hattons@globalsymmetry.com>
- Convincing Mathematica that Sqrt[a+b]Sqrt[a-b]==Sqrt[a^2+b^2]