Quadratics in Standard form

MAT119
Andy Long, Fall, 2016.

Clear["Global`*"]

#13, p. 230

xmin=-5;
xmax=5;
ymin=-10;
ymax=10;
a=1;
b=4;
c=3;
h=-b/(2a);
k=c-a* h^2;
vertex={h,k}
disc=b^2-4a c;
roots={h+Sqrt[disc]/(2a),h-Sqrt[disc]/(2a)}
fp=(1-disc)/(4a);
p1=Plot[a*x^2+b*x+c,{x,xmin,xmax},PlotRange->{ymin,ymax}]
p2=ListPlot[{{h,k},{h,fp}}];
p3=Plot[fp,{x,xmin,xmax},PlotRange->{ymin,ymax}];
Show[p1,p2,p3]

xmin=-10;
xmax=10;
Manipulate[
f[x_]:=a(x-h)^2+k;
Plot[f[x],{x,xmin,xmax},PlotRange->{-20,20},PlotLabel->{"a=",a,"h=",h,"and k=",k}]
,{a,-3,3}
,{h,xmin,xmax}
,{k,-10,10} 
]