Why can't NIntegrate integrate this well-behaved function?
- To: mathgroup at smc.vnet.net
- Subject: [mg42342] Why can't NIntegrate integrate this well-behaved function?
- From: "John Leland Roberts" <jrobe151 at concentric.net>
- Date: Tue, 1 Jul 2003 08:45:47 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
[contact the author to get his attachement - moderator] I am using Mathematica 4.1. I generated an expression called trigfunc (see below) containing terms with Sine and Cosine functions of the single variable theta. As you can see from the plot below, trigfunc is a smooth function with no discontinuities or poles in the range of interest. When I tried to integrate trigfunc numerically with respect to theta using NIntegrate, the integration failed, producing the error message " NIntegrate::inum: Integrand {5.6012} is not numerical at {theta} = {3.14}" . I tried changing the integration limits, but this just produced the same error message with different values. If anyone knows whats wrong and/or how to make NIntegrate work with expressions like this, I would greatly appreciate your help.