Numerical integration: Difference between revisions
→top: minor: format
(Add Swift) |
Artoria2e5 (talk | contribs) (→top: minor: format) |
||
Line 1:
{{task|Arithmetic operations}}
Write functions to calculate the definite integral of a function
<br>▼
Your functions should take in the upper and lower bounds (<span style="font-family: serif">''a''</span> and <span style="font-family: serif">''b''</span>), and the number of approximations to make in that range (<span style="font-family: serif">''n''</span>). ▼
▲Your functions should take in the upper and lower bounds
Assume that your example already has a function that gives values for <big> <span style="font-family: serif">''ƒ(x)''</span>. </big> ▼
▲Assume that your example already has a function that gives values for
Simpson's method is defined by the following pseudo-code:
Line 28:
Demonstrate your function by showing the results for:
*
*
*
*
▲<br/>
<br>▼
'''See also'''
* [[Active object]] for integrating a function of real time.
* [[Special:PrefixIndex/Numerical integration
▲<br/>
=={{header|ActionScript}}==
|