Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Manipulate Series Expansions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg112998] Re: Manipulate Series Expansions
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Sun, 10 Oct 2010 06:42:16 -0400 (EDT)

Use Evaluate (see the More Information section in the help for Plot).

Manipulate[Plot[
  Evaluate[{Normal[Series[Sin[x], {x, 0, n}]], Sin[x]}],
  {x, -10 Pi, 10 Pi},
  PlotRange -> 2],
 {n, 1, 100, 1, Appearance -> "Labeled"}]


Bob Hanlon

---- Daniel <bridges2 at gmail.com> wrote: 

=============
I'm new to Mathemtica and have been searching the net for a while
regarding using Manipulate to compare a series expansion to the
original function, but haven't found an adequate solution to my
errors.

Why doesn't this work:

Manipulate[
 Plot[{Normal[Series[Sin[x], {x, 0, n}]], Sin[x]}, {x, -10 Pi,
   10 Pi}, PlotRange -> 2], {n, 1, 100, 1}]

I can do this to make it work as intended:

p[x_, n_] := Normal[Series[Sin[y], {y, 0, n}]] /. y -> x
Manipulate[
 Plot[{p[x, n], Sin[x]}, {x, -10 Pi, 10 Pi}, PlotRange -> 2], {n, 1,
  100, 1}]

Any information would be helpful.




  • Prev by Date: Shading in Plot3D
  • Next by Date: Re: Generation of polynomials
  • Previous by thread: Manipulate Series Expansions
  • Next by thread: Re: Manipulate Series Expansions