Numerical integration: Difference between revisions
Content added Content deleted
(→{{header|J}}: Extend examples) |
|||
Line 879: | Line 879: | ||
0 p.. 0 0 1x NB. or using rationals |
0 p.. 0 0 1x NB. or using rationals |
||
0 0 0 1r3</lang> |
0 0 0 1r3</lang> |
||
That is <math>0x^0 + 1x^1 + 0x^2 + 0.3333x^3</math> |
That is: <math>0x^0 + 1x^1 + 0x^2 + 0.3333x^3</math><br> |
||
So to integrate <math>x^2</math> from 0 to pi: |
|||
<lang j> 0 0 1 (0&p..@[ -~/@:p. ]) 0 1p1 |
|||
10.3354255601</lang> |
|||
=={{header|Java}}== |
=={{header|Java}}== |