1

Hello I want to Plot the Series of Exp(x) about x=0 to order 12 but it returns an error when i use the function Plot.

res = Series[Exp[x], {x, 0, 10}];
Plot[res, {x, -3, 3}]

How can I do? Are there many ways to plot them? If yes, which are they ? Thanks a lot.

bobbym
  • 2,628
  • 2
  • 15
  • 20
Robin
  • 31
  • 1
  • Show what you got so far. – corey979 Nov 05 '16 at 17:22
  • In[36]:= res = Series[Exp[x], {x, 0, 10}]

    In[38]:= Plot[res, {x, -3, 3}] During evaluation of In[38]:= SeriesData::ssdn: Attempt to evaluate a series at the number -2.99988. Returning Indeterminate. >>

    During evaluation of In[38]:= SeriesData::ssdn: Attempt to evaluate a series at the number -2.87743. Returning Indeterminate. >>

    During evaluation of In[38]:= SeriesData::ssdn: Attempt to evaluate a series at the number -2.75498. Returning Indeterminate. >>

    During evaluation of In[38]:= General::stop: Further output of SeriesData::ssdn will be suppressed during this calculation. >

    – Robin Nov 05 '16 at 17:25
  • 1
    Edit your question accordingly, don't post crucial yet lengthy pieces of code in the comments - it's unreadable. – corey979 Nov 05 '16 at 17:26
  • 2
    Moreover, read the docs. Specifically, in the help for Series, under Applications, you have examples showing how to deal with the output of Series, particularly how to plot it. – corey979 Nov 05 '16 at 17:31
  • In[36]:= res = Series[Exp[x], {x, 0,10}] ln[38]:=Plot[res, {x, -3, 3}] Attempt to evaluate a series at the number -2.9998774285714287`.
    Returning Indeterminate. >> Further output of SeriesData::ssdn will be suppressed during this calculation.
    – Robin Nov 05 '16 at 17:33
  • Please upvote tablecircle's answer and accept it if it is the perfect answer for you. – bobbym Nov 06 '16 at 03:14

2 Answers2

3

Please see Series first. I don't know which one do you want ... but your question probably duplicated.

Plot[Evaluate[Normal[Series[Exp[x], {x, 0, 12}]]], {x, 0, 100}]

or

Plot[Evaluate[Table[Normal[Series[Exp[x], {x, 0, n}]], {n, 12}]], {x, 0, 100}]
tablecircle
  • 312
  • 2
  • 13
1

You did not pay attention to Corey's comments. Your code can be made to not display the error messages by adding Normal to the end of the series.

res = Series[Exp[x], {x, 0, 10}]//Normal;
Plot[res, {x, -3, 3}]
bobbym
  • 2,628
  • 2
  • 15
  • 20