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: [mg112697] Re: calculate vertex of a parabola
  • From: Helen Read <readhpr at gmail.com>
  • Date: Mon, 27 Sep 2010 05:47:36 -0400 (EDT)
  • References: <i7k4ch$lgl$1@smc.vnet.net> <i7mq3c$out$1@smc.vnet.net>

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}]


-- 
Helen Read
University of Vermont


  • Prev by Date: Re: How do I test for existence of a list element? Clarified
  • Next by Date: Re: How do I test for existence of a list element? Clarified
  • Previous by thread: Re: calculate vertex of a parabola
  • Next by thread: calculate vertex of a parabola