Question: Graph the function g(x) = x6 - 2x2 + x - 16
a. How many real roots does the graph reveal?
b. Find the roots of g(x) in table form.
Solution:
g[x_] := x^6 - 2x^2 + x - 16
Plot[g[x],{x,-4,4}, PlotStyle-> {Hue[.7], Thickness[.004]}];
SHIFT + ENTER
Part (a):
<<Miscellaneous`RealOnly`
NSolve[g[x]==0]
SHIFT + ENTER
Nonreal::warning:
Nonreal number encountered.
{{x -> -1.69139}, {x -> 1.64428}, {x -> Nonreal}, {x -> Nonreal}, {x -> \
Nonreal}, {x -> Nonreal}}
Hence we can comment this graph reveals 2 real roots.
Part (b):
TableForm[N[Solve[g[x]==0,x],9]]
SHIFT + ENTER
See the result yourself!!!