Re: Separating square roots

*To*: mathgroup at smc.vnet.net*Subject*: [mg127236] Re: Separating square roots*From*: Bob Hanlon <hanlonr357 at gmail.com>*Date*: Wed, 11 Jul 2012 02:15:42 -0400 (EDT)*Delivered-to*: l-mathgroup@mail-archive0.wolfram.com*Delivered-to*: mathgroup-newout@smc.vnet.net*Delivered-to*: mathgroup-newsend@smc.vnet.net*References*: <20120710044231.0F717683F@smc.vnet.net>

The proposed approach will introduce some extraneous roots A = 3 + 5 x^2 + 7 x + Sqrt[5 + x] + 7 x Sqrt[5 + x]; nosqrt = Select[A, FreeQ[#, Power[_, 1/2]] &] 3 + 7*x + 5*x^2 withsqrt = A - nosqrt Sqrt[5 + x] + 7*x*Sqrt[5 + x] sol1 = Solve[nosqrt^2 == withsqrt^2, x] // Simplify; sol1 // N // Chop {{x -> 0.0891586}, {x -> 2.37923}, {x -> -3.06206}, {x -> -0.246324}} However, the first two of these values are not roots of the original equation. A /. sol1 // N // Chop {7.32771, 95.9166, 0, 0} Direct use of Solve provides the desired results. sol2 = Solve[A == 0, x] // Simplify; sol2 // N // Chop {{x -> -3.06206}, {x -> -0.246324}} A /. sol2 // N // Chop {0, 0} Bob Hanlon On Tue, Jul 10, 2012 at 12:42 AM, <rhartley.anu at gmail.com> wrote: > I have an expression which is a sum of terms, some monomials > and others involving square roots, such as > A = 3 + 5 x^2 + 7 x + Sqrt[5+x] + 7 x Sqrt[5+x] (but much more complicated). > I want to solve this, which involves separating terms with the square root > from those that do not have a square root, then squaring each. > > I can not work out how to separate out those terms that have the square > root. I do not want to hard code, such as nosqrt = A[[1]] + A[[2]] , etc. > Can anyone help? > > r >

**References**:**Separating square roots***From:*rhartley.anu@gmail.com