3
$\begingroup$

I am pretty sure I have made an obvious mistake. I want to plot a Taylor polynomial of a degree 4 around the point (0, 0). So I have defined a function

f[x_, y_] := Cos[x + y]

Then I write a Taylor series up to 4th degree

Series[f[x, y], {x, 0, 4}, {y, 0, 4}]

I can plot the function f, but when I try to plot series I get errors. I believe it is because. when computing the series, along from the terms I will also get a remainder, which can not be plotted.

Any help would be much appreciated.

$\endgroup$
  • $\begingroup$ Greetings! Make the most of Mma.SE and take the tour now. Help us to help you, write an excellent question. Edit if improvable, show due diligence, give brief context, include minimal working examples of code and data in formatted form. As you receive give back, vote and answer questions, keep the site useful, be kind, correct mistakes and share what you have learned. $\endgroup$ – rhermans May 15 '17 at 12:34
  • $\begingroup$ There are things to do after your question is answered. It's a good idea to stay vigilant for some time, better approaches may come later improving over previous replies. Experienced users may point alternatives, caveats or limitations. New users should test answers before voting and wait 24 hours before accepting the best one. Participation is essential for the site, please come back to do your part tomorrow $\endgroup$ – rhermans May 15 '17 at 12:34
10
$\begingroup$

Use Normal and Evaluate,e.g.:

t[n_] := Plot3D[
  Evaluate[Series[Cos[x + y], {x, 0, n}, {y, 0, n}] // Normal], {x, 0,
    2 Pi}, {y, 0, 2 Pi}]

An animation of truncated series: 1 to 20:

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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