Re: integral to table values
- To: mathgroup at smc.vnet.net
- Subject: [mg60508] Re: integral to table values
- From: Bill Rowe <readnewsciv at earthlink.net>
- Date: Mon, 19 Sep 2005 04:45:29 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
On 9/18/05 at 1:15 AM, poster at giganews.com wrote: >I can integrate the following expression. >Integrate[Sqrt[2x - x^2], {x, 0, 2}] >But, how can I get a TABLE of data? I want to vary the upper limit >(h) over a range from 0 to 2. >Ultimately, the table should look like this. > h val >----- ----- >0.000 0.000 >0.100 0.029 >..... > >1.000 0.785 > >..... >0.800 0.586 >1.900 1.541 >2.000 1.570 h[(n_)?NumericQ] := NIntegrate[Sqrt[2*x - x^2], {x, 0, n}] Table[{n, h[n]}, {n, 0, 1, 0.1}] Note, since you asked for a numeric table, I've used NIntegrate rather than Integrate. There is little point to using Integrate if you are not looking for a symbolic answer. -- To reply via email subtract one hundred and four