MathGroup Archive 2007

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

Search the Archive

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


On Dec 19, 4: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

Another solution for quadratic polys

poly = x^2 + 4 x + 7;
tempPoly = PolynomialRemainder[poly, (x + a)^2, x];
temp = Flatten[Solve[D[tempPoly, x] == 0]];
ind = PolynomialRemainder[poly, (x + a)^2, x] /. temp;
(x + a)^2 + ind /. temp



  • Prev by Date: Problem with labeling Contour Lines
  • Next by Date: Re: express a quadratic, in the form (x+a)^2 + b
  • Previous by thread: Re: express a quadratic, in the form (x+a)^2 + b
  • Next by thread: Re: express a quadratic, in the form (x+a)^2 + b