Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

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

Search the Archive

Re: calculate vertex of a parabola

  • To: mathgroup at smc.vnet.net
  • Subject: [mg112715] Re: calculate vertex of a parabola
  • From: Murray Eisenberg <murray at math.umass.edu>
  • Date: Tue, 28 Sep 2010 06:03:48 -0400 (EDT)

In his "Presentations" add-on application, David Park has a function 
CompleteTheSquare that can save you the effort of carrying out the 
manipulations:

   <<Presentations`

   CompleteTheSquare[a x^2 + b x + c, x] // InputForm
-b^2/(4*a) + c + a*(b/(2*a) + x)^2

(I used InputForm so as to produce linear output suitable for e-mail.)


On 9/27/2010 5:47 AM, Helen Read wrote:
> On 9/26/2010 2:43 AM, Sjoerd C. de Vries wrote:
>> On Sep 25, 8:21 am, Momo K<momok1... at googlemail.com>   wrote:
>>>
>>> What I wanna do is to calculate the vertex of a parabola or its mathematic
>>> equoation of its vertex.
>>> E. g. if I have a equation of the form "a*x^2 + b*x + c = f(x)", I want an
>>> output like the following:
>>> "a*(x-g)+h = f(x)"
>>
>> I'm not sure that I understand you correctly. The vertex, or minimum
>> or maximum value of a parabola can be found by setting the derivative
>> of its equation equal to zero and solving for x:
>>>
>>> In[8]:= D[a*x^2 + b*x + c, x]
>>>
>>> Out[8]= b + 2 a x
>>>
>>> In[9]:= Solve[b + 2 a x == 0, x]
>>
>
>>> So the vertex doesn't depend on x as you seem to assume. Your problem
>>> is not really a Mathematica problem, it's more a problem of
>>> mathematics (or actually your grasp of it).
>
> A more elementary (non-calculus) method of finding the vertex is to
> complete the square, which is what the OP asked about. I think the OP
> meant to write
> a*(x-g)^2+h = f(x) and accidentally left off the square.
>
> Here's one way to do it.
>
> If we want to write y=a x^2 + b x + c
> in the form y=a (x - u)^2 + v
>
> Try expanding the second form, than match coefficients.
>
> Expand[a (x - u)^2 + v]
>
> This gives:
>
> a u^2 + v - 2 a u x + a x^2
>
> Now match coefficients and solve for u and v.
>
> Solve[{-2 a u == b, a u^2 + v == c}, {u, v}]
>
>

-- 
Murray Eisenberg                     murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305


  • Prev by Date: Re: Mathematica calculates RSquared wrongly?
  • Next by Date: Question on Solve
  • Previous by thread: calculate vertex of a parabola
  • Next by thread: Re: calculate vertex of a parabola