Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #12416
| From | dsmirnov90@gmail.com |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | question about NIntegrate |
| Date | 2012-11-22 09:33 +0000 |
| Message-ID | <k8krhj$83k$1@smc.vnet.net> (permalink) |
| Organization | Time-Warner Telecom |
Hi,
I want to use function NIntegrate to integrate a rather complicated function which should be calculated numerically and returns a Table. However, when I write something of the kind:
Clear[f]
f[(a_)?NumericQ] := {a^2};
NIntegrate[f[x], {x, -1, 1}]
I get an error: "Integrand f[x] is not numerical at {x} = {-0.984085}"
Strangely, the following code works fine:
NIntegrate[f[1], {x, -1, 1}]
giving the result {2.}
What am I doing wrong?
Dmitry
Back to comp.soft-sys.math.mathematica | Previous | Next — Next in thread | Find similar | Unroll thread
question about NIntegrate dsmirnov90@gmail.com - 2012-11-22 09:33 +0000 Re: question about NIntegrate "Nasser M. Abbasi" <nma@12000.org> - 2012-11-23 08:29 +0000
csiph-web