Jump to content

Numerical integration: Difference between revisions

m
aligned columns as originally intended.
(→‎{{header|REXX}}: changed whitespace, changed to use six million approximations instead of five million for the 4th test suite.)
m (aligned columns as originally intended.)
Line 33:
 
Demonstrate your function by showing the results for:
* &nbsp; {{math|1=ƒ(x) = x<sup>3</sup>}}, &nbsp; &nbsp; where&nbsp; where &nbsp; '''x''' &nbsp; is &nbsp; &nbsp; [0,1], &nbsp; &nbsp; &nbsp; with &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 100 approximations. &nbsp; The exact result is &nbsp; 1/4, or &nbsp; 0.25. &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (or 1/4)
* &nbsp; {{math|1=ƒ(x) = 1/x}}, &nbsp; &nbsp; where &nbsp; '''x''' &nbsp; is &nbsp; [1,100], &nbsp; &nbsp; with &nbsp; &nbsp; &nbsp; &nbsp;1,000 approximations. &nbsp; The exact result is the&nbsp; natural&nbsp; log4.605170<sup>+</sup> of&nbsp; 100,&nbsp; (natural or aboutlog of 4.605170100)
* &nbsp; {{math|1=ƒ(x) = x}}, &nbsp; &nbsp; &nbsp; &nbsp; where &nbsp; '''x''' &nbsp; is &nbsp; [0,5000], &nbsp; with 5,000,000 approximations. &nbsp; The exact result is &nbsp; 12,500,000.
* &nbsp; {{math|1=ƒ(x) = x}}, &nbsp; &nbsp; &nbsp; &nbsp; where &nbsp; '''x''' &nbsp; is &nbsp; [0,6000], &nbsp; with 6,000,000 approximations. &nbsp; The exact result is &nbsp; 18,000,000.
 
<br/>
''';See also''':
* &nbsp; [[Active object]] for integrating a function of real time.
* &nbsp; [[Special:PrefixIndex/Numerical integration]] for other integration methods.
 
<br/>
Cookies help us deliver our services. By using our services, you agree to our use of cookies.