Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

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




  • Prev by Date: Re: Convincing Mathematica that Sqrt[a+b]Sqrt[a-b]==Sqrt[a^2-b^2]
  • Next by Date: Re: "Alternating" function
  • Previous by thread: Re: Convincing Mathematica that Sqrt[a+b]Sqrt[a-b]==Sqrt[a^2-b^2]
  • Next by thread: Re: Convincing Mathematica that Sqrt[a+b]Sqrt[a-b]==Sqrt[a^2+b^2]