1

I am desperatly looking for the mistake I did when completing the square.

I have a function $f(x)=-4.905x^2+5x+6$

Nothing special. So when I was trying to find the peak of the curve I ran into a problem and couldn't figure out why this happens, since I have repeated the task about 5 times.

I used the form: $(x+\frac{b}{2a})^2=(\frac{b}{2a})^2-\frac{c}{a}$

When I solve left hand side to get the value of -0.509683996 which seems to fit for the x value of the peak. When I put in this value for x into the original equation I also receive the correct value of about y=7.53 for the peak.

But when I try to read of the the peak by using the RHS my equation seems to crash: I received after serial trials always something that is not equal to the y values of the vertex :

https://www.symbolab.com/solver/step-by-step/%5Cfrac%7B5%5E%7B2%7D%7D%7B-9.81%5E%7B2%7D%7D-%5Cfrac%7B6%7D%7B-4.905%7D

what happened? Why is my right hand side not equal to 7.53?

I must do something extremely wrong when trying to calculate right hand side and receive the y value of the vertex.

J.Doe
  • 526
  • 1
    Should there really be $x^2$ inside the squared term in the form? I would have expected something more like $(x+b/a)^2.$ – coffeemath Jan 16 '18 at 12:07
  • @coffeemath I am quite certain that it's supposed to be $b/2a$, but I agree with your main concern. – Arthur Jan 16 '18 at 12:09
  • 1
    It should be $+0.509683996$ since $a$ is negative. – mathlove Jan 16 '18 at 12:10
  • I have corrected the formula – J.Doe Jan 16 '18 at 13:33
  • 1
    The vertex of the parabola $y=ax^2+bx+c$ is $(-\frac{b}{2a},c-\frac{b^2}{4a})$. So, in our case, the $y$-coordinate of the vertex is $6-\frac{5^2}{4\times (-4.905)}\approx 7.27421$. – mathlove Jan 16 '18 at 15:00
  • seems correct, but why is is it not c/a ? since I have just divided all terms by a it seems reasonable and correct. It is right there : http://tutorial.math.lamar.edu/Classes/Alg/SolveQuadraticEqnsII_files/eq0031P.gif – J.Doe Jan 16 '18 at 15:57
  • 1
    Please put @ to comment to someone. The vertex is $(-\frac{b}{2a},c-\frac{b^2}{4a})$ since we can write $y=ax^2+bx+c=a(x+\frac{b}{2a})^2+c-\frac{b^2}{4a}$ (see here). You are confusing finding the solutions of $ax^2+bx+c=0$ with finding the vertex of the parabola $y=ax^2+bx+c$. Your link is about the former, not about the latter. – mathlove Jan 16 '18 at 16:14
  • @mathlove Yees indeed that's exactly what I messed up here!! Thank you so much. I was just about to go crazy about this one. If you've had put it in an answer, I'd pick it – J.Doe Jan 16 '18 at 16:54
  • I've summarized my comments as an answer with some details. – mathlove Jan 17 '18 at 04:40

2 Answers2

2

It seems that you are confusing finding the solutions of $ax^2+bx+c=0$ where $a\not=0$ with finding the vertex of the parabola $y=ax^2+bx+c$.

In order to find the solutions, we have $$\begin{align}ax^2+bx+c=0&\implies x^2+\frac bax=-\frac ca\\\\&\implies x^2+\frac bax+\frac{b^2}{4a^2}=\frac{b^2}{4a^2}-\frac ca\\\\&\implies \left(x+\frac{b}{2a}\right)^2=\frac{b^2-4ac}{4a^2}\\\\&\implies x+\frac{b}{2a}=\pm\sqrt{\frac{b^2-4ac}{4a^2}}\\\\&\implies x=-\frac{b}{2a}\pm\sqrt{\frac{b^2-4ac}{4a^2}}\end{align}$$

In order to find the vertex of the parabola $y=ax^2+bx+c$, we have $$\begin{align}y&=ax^2+bx+c\\\\&=a\left(x^2+\frac bax\right)+c\\\\&=a\left(x^2+\frac bax+\frac{b^2}{4a^2}-\frac{b^2}{4a^2}\right)+c\\\\&=a\left(\left(x+\frac{b}{2a}\right)^2-\frac{b^2}{4a^2}\right)+c\\\\&=a\left(x+\frac{b}{2a}\right)^2+c-\frac{b^2}{4a}\end{align}$$ So, the vertex is $$\left(-\frac{b}{2a},c-\frac{b^2}{4a}\right)$$

mathlove
  • 139,939
  • 1
    Since I rushed into another mistake again at my maths book, I simply wanted to highlight how important it is, to set the brackets correctly and to multiply by a in the prelast step. Very useful step by step answer! Thank you – J.Doe Feb 17 '18 at 08:42
  • @Lurio Tabasco : You are welcome. – mathlove Feb 17 '18 at 10:15
0

Your formula does not seem to be right.$$(x^2+\frac{b}{2a})^2=(\frac{b}{2a})^2-\frac{c}{a}$$ It is not a quadratic equation as intended.The correct version is $$(x+\frac{b}{2a})^2=(\frac{b}{2a})^2-\frac{c}{a}$$ From your equation $$f(x)=-4.905x^2+5x+6$$

we get a positive value of $$x=.5096839959$$ because your $$ x=-b/2a$$ and your $a$ is a negative number.

With the given value of $x$ we get $f(x)=7.2742..$.

  • I have corrected my question. Yes but my right hand side should be equal to 7.53 which is not the case – J.Doe Jan 16 '18 at 13:34
  • Is your answer 7.27420 ? – Mohammad Riazi-Kermani Jan 16 '18 at 14:03
  • No that's where I got into trouble : My answer when I try to get it by just calculating the RHS of my equation is: 0.9... something which is not even close. https://www.symbolab.com/solver/step-by-step/%5Cfrac%7B5%5E%7B2%7D%7D%7B-9.81%5E%7B2%7D%7D-%5Cfrac%7B6%7D%7B-4.905%7D If I would just be in negative or positive or be close to it. But I am doing something extremely wrong, not knowing what it is. – J.Doe Jan 16 '18 at 14:08
  • I don't know what is going on. Good luck . – Mohammad Riazi-Kermani Jan 16 '18 at 14:42