# Plotting (Graphing) a Quadratic Function with Vertex and Roots

I'm new to Mathematica and I'm not really familiar to the Mathematica functions and the language. Could any of you help me plot a quadratic with the following characteristics:

• vertex at (1.5, 1.75)
• roots at

('i' means the imaginary number 'i') How would I be able to do this?

Thanks a lot!

• Is this what you want: r1 = 15/10 + I Sqrt[7]/2; p = Expand[(x - r1)*(x - Conjugate[r1])] Plot[p, {x, -3, 3}] which gives on V 10.01 !Mathematica graphics the poly is 4-3 x+x^2 Sep 25, 2014 at 3:49
• @Nasser Thanks, I think this is what I want, but how did you find this out? Is there a method to do this?
– user20012
Sep 25, 2014 at 3:52
• I added small description below Sep 25, 2014 at 3:56

You can use the definition that $p(x)=(x-r_1)(x-r_2)...(x-r_i)$ where $r_n$ is the root.

root = 15/10 + I Sqrt[7]/2;  (*given*)
p = Expand[(x - root)*(x - Conjugate[root])]
Plot[p, {x, -3, 3}, Frame -> True,
FrameLabel -> {{"y(x)", None}, {x, p}}, PlotTheme -> "Detailed"]


r = {1.5, Sqrt[7]/2};
p = {1.5, 1.75};
Plot[(x - r.{1, I}) (x - r.{1, -I}), {x, -3, 3},
Epilog -> {Red, PointSize[0.02], Point@p}]