MathGroup Archive 2005

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

Search the Archive

Re: integral to table values

  • To: mathgroup at smc.vnet.net
  • Subject: [mg60514] Re: [mg60500] integral to table values
  • From: "David Park" <djmp at earthlink.net>
  • Date: Mon, 19 Sep 2005 04:45:34 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Dennis,

We can do better than a table. How about a function? Use the Fundamental
Theorem of Calculus and treat it as a differential equation.

Clear[f]
NDSolve[{f'[x] == Sqrt[2x - x^2], f[0] == 0}, f, {x, 0, 2}]
f[x_] = f[x] /. Part[%, 1, 1]

Plot[f[x], {x, 0, 2}];

David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/



From: poster at giganews.com [mailto:poster at giganews.com]
To: mathgroup at smc.vnet.net


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

I have tried substituting a list "{0.1, 0.2, 0.3,}" for the "2" above,
but this does provide the desired result.

Thanks for your help.
Dennis



  • Prev by Date: Re: integral to table values
  • Next by Date: Re: integral to table values
  • Previous by thread: Re: integral to table values
  • Next by thread: Re: integral to table values