Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def funcion(double x):
- return x**2 - 42;
- def integrar_funcion(double limite_inferior, double limite_superior, int N):
- cdef int i
- cdef double s, dx
- s = 0
- dx = (limite_superior - limite_inferior) / N
- for i in range(N):
- s += funcion(limite_inferior + i * dx)
- return s * dx
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement