Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Re: Why are the functions different?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg55648] Re: Why are the functions different?
  • From: yehuda ben-shimol <bsyehuda at gmail.com>
  • Date: Fri, 1 Apr 2005 05:36:20 -0500 (EST)
  • References: <200503310624.BAA15126@smc.vnet.net>
  • Reply-to: yehuda ben-shimol <bsyehuda at gmail.com>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,
I believe this was already discuss on Mathgroup.
You need to "Evaluate" f1[x] as the following
Plot[Evaluate[f1[x]], {x, 0, 12}]
The attributes of the Plot[] function are 
(note that Attributes[Plot]
are 
{HoldAll, Protected}
)
yehuda


On Thu, 31 Mar 2005 01:24:00 -0500 (EST), Helge Stenstroem
<helge.stenstrom.NOSPAM at nospamericsson.com> wrote:
> How are these two functions (f0 and f1) different? f0 can be plotted,
> but f1 cannot.
> 
> f1[x_] := Normal[Series[Tanh[x], {x, 0, 5}]]
> f0[x_] := x - x^3/3 + (2*x^5)/15
> 
> When evaluated like this:
>  f0[x]
>  f1[x]
> they look the same.
> 
> The following gives error messages if f0 is replaced by f1.
>  Plot[{Tanh[z], f0[z]}, {z, -1, 1}]
> 
> (Mathematica 4.1 on Windows 2000)
> -- 
> Helge Stenström
> 
>


  • Prev by Date: Re: Simplifying Jacobian elliptic functions
  • Next by Date: Re: Need to be able to diff 2 pieces of text.
  • Previous by thread: Re: Why are the functions different?
  • Next by thread: Re: Why are the functions different?