1
$\begingroup$

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.

$\endgroup$
  • $\begingroup$ Show what you got so far. $\endgroup$ – corey979 Nov 5 '16 at 17:22
  • $\begingroup$ 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. > $\endgroup$ – Robin Nov 5 '16 at 17:25
  • 1
    $\begingroup$ Edit your question accordingly, don't post crucial yet lengthy pieces of code in the comments - it's unreadable. $\endgroup$ – corey979 Nov 5 '16 at 17:26
  • 2
    $\begingroup$ 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. $\endgroup$ – corey979 Nov 5 '16 at 17:31
  • $\begingroup$ 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. $\endgroup$ – Robin Nov 5 '16 at 17:33
3
$\begingroup$

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}]
| improve this answer | |
$\endgroup$
  • $\begingroup$ Thanx it works perfectly $\endgroup$ – Robin Nov 5 '16 at 17:34
1
$\begingroup$

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}]
| improve this answer | |
$\endgroup$

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