1 | initial version |

Well, let me answer my own question

At least i can do this in Cantor, within a code block:

```
cython(r"""
from math import sin
def f(x):
return sin(x**2)
def integral(double a,double b,int N):
cdef dx = (b-a)/N
cdef double s = 0
cdef int i
for i in range(N):
s+=f(a+dx*i)
return s*dx
""")
```

It is not that clean as in the notebook but works nice. Is there another solution ?

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.