# Revision history [back]

If you final aim is to numerically evaluate for a range of values of r, you can do the following:

sage: Curvature = lambda r : numerical_integral(kappa(r=r),0,2*pi)


This defines Curvature as a function of r that computes the integral numerocally. Then you can do:

sage: Curvature(2)
(16.716333138156095, 4.079736172387635e-10)
sage: Curvature(10)
(18.745787025936806, 2.081200437091458e-13)


If you final aim is to numerically evaluate for a range of values of r, you can do the following:

sage: Curvature = lambda r : numerical_integral(kappa(r=r),0,2*pi)


This defines Curvature as a function of r that computes the integral numerocally. Then you can do:

sage: Curvature(2)
(16.716333138156095, 4.079736172387635e-10)
sage: Curvature(10)
(18.745787025936806, 2.081200437091458e-13)


The second value is an estimation of the error.

If you final aim is to numerically evaluate for a range of values of r, you can do the following:

sage: Curvature = lambda r : numerical_integral(kappa(r=r),0,2*pi)


This defines Curvature as a function of r that computes the integral numerocally. Then you can do:

sage: Curvature(2)
(16.716333138156095, 4.079736172387635e-10)
sage: Curvature(10)
(18.745787025936806, 2.081200437091458e-13)


The second value is an estimation of the error.error, if you just want the approximated value of the integral, you can do:

sage: Curvature = lambda r : numerical_integral(kappa(r=r),0,2*pi)
sage: Curvature(2)
16.716333138156095


If you final aim is to numerically evaluate for a range of values of r, you can do the following:

sage: Curvature = lambda r : numerical_integral(kappa(r=r),0,2*pi)


This defines Curvature as a function of r that computes the integral numerocally. numerically. Then you can do:

sage: Curvature(2)
(16.716333138156095, 4.079736172387635e-10)
sage: Curvature(10)
(18.745787025936806, 2.081200437091458e-13)


The second value is an estimation of the error, if you just want the approximated value of the integral, you can do:

sage: Curvature = lambda r : numerical_integral(kappa(r=r),0,2*pi)
sage: Curvature(2)
16.716333138156095