Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #4058

Re: NIntegrate issue with symbolic parameters

From Heike Gramberg <heike.gramberg@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: NIntegrate issue with symbolic parameters
Date 2011-07-30 10:01 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <j10kq8$ope$1@smc.vnet.net> (permalink)
References <201107291201.IAA15650@smc.vnet.net>

Show all headers | View raw


You could prevent Mathematica from evaluating Curv in the symbolic stage 
by only defining your function Curv for numeric arguments, so for 
example

Clear[Curv];
Curv[{a_?NumericQ, b_?NumericQ, c_?NumericQ}] := With[{R = {a, b, c}}, <original definition> ]

Flux[0.9]

returns

12.5664

Heike.

On 29 Jul 2011, at 13:01, gopher wrote:

> The docs say that NIntegrate evaluates the integrand with the
> variables being symbolic, and then repeatedly evaluates the result
> numerically. This is a problem for me as my integrand calls
> Eigenvectors which results in a symbolic calculation of the
> eigenvectors. If the variables were passed numerically instead, there
> would be no problem.
>
> In the end, I get errors about oscillation and convergence, 'slwcon'
> and 'eincr', which should never occur since the integrand is actually
> constant! (theoretically and also confirmed by Plot3D).
>
> Is there a way out?  Since the details are a bit long, I am putting a
> link to the file below:
>
> https://netfiles.uiuc.edu/aroy2/www/nintegrate-issue.nb
>
> Thanks for any help,
> Abhishek
>

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: NIntegrate issue with symbolic parameters Heike Gramberg <heike.gramberg@gmail.com> - 2011-07-30 10:01 +0000

csiph-web