Re: Simplfying inside Sqrt
- To: mathgroup at smc.vnet.net
- Subject: [mg55120] Re: [mg55106] Simplfying inside Sqrt
- From: Bob Hanlon <hanlonr at cox.net>
- Date: Sun, 13 Mar 2005 04:57:38 -0500 (EST)
- Reply-to: hanlonr at cox.net
- Sender: owner-wri-mathgroup at wolfram.com
You have to assume x to be nonnegative expr=Sqrt[x^2+x^4]; Simplify[expr,x>=0, ComplexityFunction->(Count[{#1},_^_,Infinity]&)] x*Sqrt[x^2 + 1] However, FullSimplify goes too far with this ComplexityFunction FullSimplify[expr,x>=0, ComplexityFunction->(Count[{#1},_^_,Infinity]&)] x*Sqrt[(x - I)*(x + I)] To prevent FullSimplify from factoring over Gaussian integers use a different ComplexityFunction FullSimplify[expr, x >= 0, ComplexityFunction -> (Count[{#1}, _^_, Infinity] + Count[{#1}, Complex[__], Infinity] &)] x*Sqrt[x^2 + 1] Bob Hanlon > > From: billkavanagh at gmail.com To: mathgroup at smc.vnet.net > Date: 2005/03/12 Sat AM 02:36:58 EST > To: mathgroup at smc.vnet.net > Subject: [mg55120] [mg55106] Simplfying inside Sqrt > > Hi > > I'm wondering how to tell mathematica that I want terms like > Sqrt[x^2+x^4] to be x*Sqrt[1+x^2]. I have an expression with a few > terms like this in it so manually inserting a > PowerExpand[Sqrt[Expand[x^2+x^4]] is no good to me. > > I've tried a general PowerExpand and Simplify with a Im[x]==0 around > the whole expression but with no luck. > > Does anybody know how to do this? > > Thanks, > Bill > > -- > William R. Kavanagh > http://www.physics.mun.ca/~wkavanag > >