mirror of
https://github.com/DeaDvey/mathgenerator.git
synced 2025-11-28 06:25:23 +01:00
fix definite_integral
This commit is contained in:
@@ -93,4 +93,4 @@ from .decimal_to_roman_numerals import *
|
||||
from .degree_to_rad import *
|
||||
from .radian_to_deg import *
|
||||
from .differentiation import *
|
||||
from .definiteIntegralFunc import *
|
||||
from .definite_integral import *
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
from .__init__ import *
|
||||
from ..__init__ import Generator
|
||||
from scipy.integrate import quad
|
||||
|
||||
|
||||
@@ -15,11 +14,13 @@ def definiteIntegralFunc(max_coeff=100):
|
||||
result = quad(integrand, 0, 1, args=(a, b, c))[0]
|
||||
S = round(result, 4)
|
||||
|
||||
problem = "The definite integral within limits 0 to 1 of the equation " + str(a) + "x^2 + " + str(b) + "x + " + str(c) + " is = "
|
||||
problem = "The definite integral within limits 0 to 1 of the equation " + \
|
||||
str(a) + "x^2 + " + str(b) + "x + " + str(c) + " is = "
|
||||
|
||||
solution = str(S)
|
||||
|
||||
return problem, solution
|
||||
|
||||
|
||||
definiteIntegral = Generator("Definite Integral of Quadratic Equation", 110, "The definite integral within limits 0 to 1 of quadratic equation ax^2+bx+c is = ", "S", definiteIntegralFunc)
|
||||
definite_integral = Generator("Definite Integral of Quadratic Equation", 89,
|
||||
"The definite integral within limits 0 to 1 of quadratic equation ax^2+bx+c is = ", "S", definiteIntegralFunc)
|
||||
Reference in New Issue
Block a user