MathGroup Archive 2012

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: question about NIntegrate

  • To: mathgroup at smc.vnet.net
  • Subject: [mg124977] Re: question about NIntegrate
  • From: Bob Hanlon <hanlonr357 at gmail.com>
  • Date: Wed, 15 Feb 2012 04:43:51 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <201202141138.GAA17746@smc.vnet.net>

$Version

"8.0 for Mac OS X x86 (64-bit) (October 5, 2011)"

y = 10;

z = 1;

NIntegrate[Exp[-(x - y)/z], {x, 0, Infinity}]

22026.5

Works fine here. Try starting with a fresh session.


Bob Hanlon


On Tue, Feb 14, 2012 at 6:38 AM, Leslaw Bieniasz <nbbienia at cyf-kr.edu.pl> wrote:
>
>
> Hi,
>
> I want to use function NIntegrate to integrate a function of x
> that depends on two parameters y and z. However, when I write
> something of the kind:
>
> y=10;
> z=1;
> NIntegrate[Exp[-(x-y)/z],{x,0,Infinity}]
>
> I get an error: Integrand is not numerical at {x} = {1.}
>
> Strangely, if my function has only one parameter, the following
> code works fine:
>
> y=10;
> NIntegrate[Exp[-(x-y)],{x,0,Infinity}]
>
> giving the result 22026.5
>
> What am I doing wrong?
>
> Leslaw
>



  • Prev by Date: Re: Print Selection, Mathematica 7, in Lion
  • Next by Date: Re: simple question on DSolve
  • Previous by thread: question about NIntegrate
  • Next by thread: Workbench Profile[] question