0
|
4816 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
GROUPS:

# How to sum values of a continuous function?

Posted 9 years ago
 Let's say I have a chi squared distribution Plot[Evaluate@PDF[ChiSquareDistribution, x], {x, 0, 10}, Filling -> Axis, Exclusions -> None]  and what I want to do is sum the f(x) values if f(x) is chi squared distribution, for {x,0,10}. Let's take an easier example so I can really explain what I want: If my function was a simple Sin[x] Plot[Sin[x], {x, 0, 5}, Filling -> Axis]  What I want is something like Sum[Sin[x],{x,0,10}]  but the problem with Sum[] is that he takes x as discrete values - which I don't want. I would like it to be continuous. And I think I should repeat, this is not ArcLength it's a sum of the function values. Thank you for any hints. If there is no other option I will just set a really small steps in the Sum. Not a really elegant solution, but it should work.
2 Replies
Sort By:
Posted 9 years ago
 Use integration or CDF: NIntegrate[PDF[ChiSquareDistribution, x], {x, 0, 10}] CDF[ChiSquareDistribution, 10] // N I.M.
Posted 9 years ago
 Yes, I thought about it too, but the problem is that I am afraid that the physical interpretation is completely wrong if I calculate the surface under the curve.Because whatever function (or curve) I will choose, will actually be force in terms of position x. The condition says, that I have only 60 N of force available at {x,0,10} and now i want to find a couple of force distributions. And I imagined that the sum of f(x) is my condition and not the surface under it. But... That's debatable, you can still convince me wrong.