Commit 2094cd11 authored by Taddeus Kroes's avatar Taddeus Kroes

Added the first implemented integral rules to operator-match map.

parent 985b588e
from ..node import OP_ADD, OP_MUL, OP_DIV, OP_POW, OP_NEG, OP_SIN, OP_COS, \
OP_TAN, OP_DER, OP_LOG
OP_TAN, OP_DER, OP_LOG, OP_INT, OP_INT_INDEF
from .groups import match_combine_groups
from .factors import match_expand
from .powers import match_add_exponents, match_subtract_exponents, \
......@@ -24,6 +24,8 @@ from src.rules.derivatives import match_zero_derivative, \
from src.rules.logarithmic import match_constant_logarithm, \
match_add_logarithms, match_raised_base, match_factor_out_exponent, \
match_factor_in_multiplicant
from src.rules.integrals import match_solve_indef, \
match_integrate_variable_power
RULES = {
OP_ADD: [match_add_numerics, match_add_constant_fractions,
......@@ -53,4 +55,6 @@ RULES = {
match_logarithmic, match_goniometric, match_sum_product_rule,
match_quotient_rule],
OP_LOG: [match_constant_logarithm, match_factor_out_exponent],
OP_INT: [match_integrate_variable_power],
OP_INT_INDEF: [match_solve_indef],
}
......@@ -87,7 +87,7 @@ def match_integrate_variable_power(node):
"""
assert node.is_op(OP_INT)
f, x = node
f, x = node[:2]
if f.is_power():
root, exponent = f
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment