MathGroup Archive 1998

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

Search the Archive

Re: What is this doing...?...

  • To: mathgroup at smc.vnet.net
  • Subject: [mg14812] Re: What is this doing...?...
  • From: "Allan Hayes" <hay at haystack.demon.co.uk>
  • Date: Wed, 18 Nov 1998 01:29:15 -0500
  • References: <72je0h$3ep@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Mitch Padua wrote in message <72je0h$3ep at smc.vnet.net>...
>I've having some trouble interpreting a graph I receive in mathematica,
>maybe someone can help?  Here's what I have:
>
>Normal[Series[Sin[x], {x,0,#}]]& /@ {1,3,5,7}
>f[#]& /@ {arg1, arg2, arg3}
>Join[{a,b,c}, {d,e}]
>plotts[fx_, a0_: 0, {x_,a_,b_}, k_List, opt___]
>:=Plot[Evaluate[Join[Normal[Series[fx,{x,a0,#}]]& /@ k, {fx}]], {x,a,b},
>opt]
>
>now I type the command to graph:
>
>plotts[Log[x+1], {x, -.99,2}, {1,3,25}, PlotRange->{-5,2}]
>
>and all is well however when I change the 25 to 30 I get a different
>graph, why?  What is going on here?  I believe this is a Taylor series
>or something, but can someone explain to me when I change the
>plotts[Log[x+1], {x, -.99,2}, {1,3,25}, PlotRange->{-5,2}] to
>plotts[Log[x+1], {x, -.99,2}, {1,3,30}, PlotRange->{-5,2}] I get a
>different graph?  I must admit I've only used mathematica for about 15
>minutes...so an explanation as to why this graph is changing would
>really help.
>
>Thanks,
>
>--
>____/|  Vincent M. Padua  (vpadua at csufresno.edu) \ o.O|
> =(_)=  "Thou shalt not follow the NULL pointer for
>   U     chaos and madness await thee at its end."
>
>
>

Vincent,

plotts[Log[x+1], {x, -.99,2}, {1,3,25}, PlotRange->{-5,2}]

plots the original function and its power series in x (actually in x-a0,
but in the code, a0_: 0 means that if you do not put a0 in, then the
default value 0 is used) up to the term in x^1, x^3 and x^25.

plotts[Log[x+1], {x, -.99,2}, {1,3,30}, PlotRange->{-5,2}]

plots the original function and its power series in x up to the term in
x^1, x^3 and x^30

so we get a different plot.

To see all the power series that are shown in the previous two plots try

plotts[Log[x+1], {x, -.99,2}, {1,3,25, 30}, PlotRange->{-5,2}]

Allan

---------------------
Allan Hayes
Mathematica Training and Consulting
www.haystack.demon.co.uk
hay at haystack.demon.co.uk
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565









  • Prev by Date: FEM
  • Next by Date: SystemFiles alert with NEXTSTEP FE
  • Previous by thread: Re: What is this doing...?...
  • Next by thread: Contour plot from (x,y,z) numerical data?