1
$\begingroup$

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.

$\endgroup$
1

1 Answer 1

6
$\begingroup$

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

$\endgroup$
1
  • 1
    $\begingroup$ Plotting over a wider range will highlight the differences. Plot[{f, p}, {x, -4, 4}, PlotRange -> {-3, 3}, PlotLegends -> Placed[{"function", "polynomial"}, {.7, .7}]] $\endgroup$
    – Bob Hanlon
    Apr 22, 2019 at 3:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.