The solution to problem 5, section 6.1
Riemann sums in Python
Using python to calculate Riemann sums.
Math252 Selected Homework Solutions
A collection of solutions to assigned homework problems
Some Partial Solutions to Math 120 Homework
A Python Notebook with Sympy.
Sympy (Symbolic Python)
The equation $$\int_a^b f(x)\,dx = \lim_{n\rightarrow\infty} \sum_{i=1}^n f(x_i^*)\Delta x$$ defines the definite integral over the interval $[a,b]$.
In [16]:
from sympy import init_session
init_session()
My First Post
the first post
SIR Infection Model
In [1]:
%matplotlib inline
In [2]:
#import math
#import numpy
#from numpy import *
#import scipy
from scipy import integrate
from pylab import *
In [3]:
y = lambda x: x*sin(x)
print y(2)
In [7]:
integrate.quad(y,0,3)
Out[7]:
In [7]:
print integrate.quad(y,0,5)
print integrate.quad(y,0,20)
In [8]: