Re: SetDelayed
- To: mathgroup at smc.vnet.net
- Subject: [mg92895] Re: SetDelayed
- From: "Kevin J. McCann" <Kevin.McCann at umbc.edu>
- Date: Fri, 17 Oct 2008 05:23:49 -0400 (EDT)
- Organization: University System of Maryland
- References: <gd7068$iba$1@smc.vnet.net>
Itzhak, Try replacing your function definition with this: Clear[f] f[x_?NumericQ] := NIntegrate[... Kevin Itzhak wrote: > Why does Mathematica reply with: > > .."Integrand [(x-Cos[y])/(1+x^2-2*x*Cos[y])^1.5 is not numerical at {y}={1.5708}", to the following: > > Clear[f] > f[x_]:=NIntegrate[(x-Cos[y])/(1+x^2-2*x*Cos[y])^1.5,{y,0,Pi}]; > Plot[Evaluate[f[x],{x,0,2}] > > How should it be written? > > Thank you. >