How do you graph the function #y=5x-x^2#?

1 Answer
Feb 23, 2015

graph{5x-x^2 [-14.24, 14.23, -7.12, 7.12]}

First you realise that #5x-x^2=x(5-x)# which will give the
#y=0# solutions #x=0# and #x=5# for #(0,0)# and #(5,0)#

Then, put the halfway-#x# (#2.5#) in the equation to get the top of the graph #y=5*2.5-2.5^2=6.25# for #(2.5,6.25)#

You now have the three most important points of your graph. You can put more #x#-values in, of course, so you get more points, but these three are essential.