From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Why am I unable to numerically integrate this?
Date: Thu, 22 Apr 2010 22:15:19 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 8
Message-ID: <hqqhpn$knl$>
References: <hqqciu$ip4$> <hqqdd9$491$> <hqqeb6$kg6$> <hqqevc$3gn$>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1271974519 21237 (22 Apr 2010 22:15:19 GMT)
NNTP-Posting-Date: Thu, 22 Apr 2010 22:15:19 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: comp.soft-sys.matlab:629036

"Roger Stafford" <> wrote in message <hqqevc$3gn$>...
>   I was too hasty and failed to notice the k^4 in the numerator. It is actually integrable with k = 0 as a lower limit, but the form of the function will cause matlab to create a NaN if it sends the value k = 0 to the function.  You will either have to move away from 0 by a tiny amount or, what is probably better, redefine the function in the immediate neighborhood of k = 0 by a Taylor expansion - probably only a single term would be needed if your neighborhood is sufficiently small.  It is analogous to having a function like sin(x)/x in your integrand at the point x = 0.
> Roger Stafford
  When I talked about a "single term" in the Taylor expansion, I should have made clear that this term would be a certain constant times k-squared.  The first two Taylor series terms will actually be zero.

Roger Stafford