Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: question about NIntegrate
Replies: 1   Last Post: Feb 15, 2012 4:44 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Leslaw Bieniasz

Posts: 171
Registered: 12/13/04
question about NIntegrate
Posted: Feb 14, 2012 6:40 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply



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






Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.