def test_quadratic(): area1 = trapz(quadratic, 0, 100, A=1, B=1, C=2) area2 = quadratic_func(A=1, B=1, C=2, a=0, b=100) t = isclose(area1, area2) print(t)
def test_sine(): area1 = trapz(sine, 0, 100, A=2, w=1, t=1) area2 = sin_func(A=2, w=1, t=1, a=0, b=100) t = isclose(area1, area2) print(t)
def test_line(): area1 = trapz(line, 0, 100) area2 = val_line_func(B=5, a=0, b=100) t = isclose(area1, area2) print(t)
def test_slopedline(): area1 = trapz(slopedLine, 0, 100, m=2, B=2) area2 = val_sloped_line_func(m=2, B=2, a=0, b=100) t = isclose(area1, area2) print(t)
def test_sine(): area1=trapz(sine,0,100,A=2,w=1,t=1) area2=sin_func(A=2,w=1,t=1,a=0,b=100) t=isclose(area1,area2) print (t)
def test_quadratic(): area1=trapz(quadratic,0,100,A=1,B=1,C=2) area2=quadratic_func(A=1,B=1,C=2,a=0,b=100) t=isclose(area1,area2) print (t)
def test_slopedline(): area1=trapz(slopedLine,0,100,m=2,B=2) area2=val_sloped_line_func(m=2,B=2,a=0,b=100) t=isclose(area1,area2) print (t)
def test_line(): area1 =trapz(line,0,100) area2=val_line_func(B=5,a=0,b=100) t=isclose(area1,area2) print (t)
def test_trapz_line(): assert math.isclose(float((trapz(line, 1, 10))), 50.0, rel_tol=.1) assert math.isclose(float((trapz(squared, 1, 10))), 333.0, rel_tol=.001)