1

Can anyone plot the degree-8 Maclaurin polynomial for the function $(x+1)/((x^2)-9)$ and function $(x+1)/((x^2)-9)$ on the same plot.

Please help, I've tried everything I could think of.

m_goldberg
  • 107,779
  • 16
  • 103
  • 257
nik
  • 19
  • 1

1 Answers1

6

The problem is probably that Series returns a SeriesData object. It must be converted to a polynomial with Normal before it can be plotted.

f = (x + 1)/((x^2) - 9);
p = Normal[Series[f, {x, 0, 8}]]
Plot[{f, p}, {x, -2, 2}]

enter image description here

Henrik Schumacher
  • 106,770
  • 7
  • 179
  • 309
  • 1
    Plotting over a wider range will highlight the differences.

    Plot[{f, p}, {x, -4, 4}, PlotRange -> {-3, 3}, PlotLegends -> Placed[{"function", "polynomial"}, {.7, .7}]]

    – Bob Hanlon Apr 22 '19 at 03:04