Re: express a quadratic, in the form (x+a)^2 + b

*To*: mathgroup at smc.vnet.net*Subject*: [mg84363] Re: express a quadratic, in the form (x+a)^2 + b*From*: Adriano Pascoletti <adriano.pascoletti at gmail.com>*Date*: Thu, 20 Dec 2007 00:09:24 -0500 (EST)*References*: <fkan3b$d6k$1@smc.vnet.net>

On Dec 19, 10:08 am, "Joseph Fagan" <noemailple... at nowhere.ru> wrote: > I'm a Mathematica beginner. > I wish to express a quadratic, in the form (x+a)^2 + b > eg to express x^2 + 4x + 7 as (x+2)^2 + 3 > Is there an easy way? > Thanks > Joe Take the Taylor expansion near the coefficient of x divided by 2: (Normal[Series[#1, {x, -Coefficient[#1, x, 1]/2, 2}]] & )[x^2 + 4*x + 7] gives 3 + (2 + x)^2. Adriano Pascoletti