|
@ -78,6 +78,7 @@ def extract_constant(function): |
|
|
constant = constant.lstrip("+") |
|
|
constant = constant.lstrip("+") |
|
|
return [constant, f"{coefficient}x"] |
|
|
return [constant, f"{coefficient}x"] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def simplify_exponential_function(type, function): |
|
|
def simplify_exponential_function(type, function): |
|
|
if type != "e": |
|
|
if type != "e": |
|
|
return False |
|
|
return False |
|
@ -95,6 +96,7 @@ def simplify_exponential_function(type, function): |
|
|
else: |
|
|
else: |
|
|
return [f"{new_coefficient}x^{new_exponent}"] |
|
|
return [f"{new_coefficient}x^{new_exponent}"] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def simplify_product_function(type, function): |
|
|
def simplify_product_function(type, function): |
|
|
if type != "p": |
|
|
if type != "p": |
|
|
return False |
|
|
return False |
|
@ -110,6 +112,7 @@ def simplify_product_function(type, function): |
|
|
result_variables += term_variables |
|
|
result_variables += term_variables |
|
|
return [f"{result_variables}^{len(terms)}"] |
|
|
return [f"{result_variables}^{len(terms)}"] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def sum_of_simplified_exponential_functions(type, function): |
|
|
def sum_of_simplified_exponential_functions(type, function): |
|
|
if type !="se": |
|
|
if type !="se": |
|
|
return False |
|
|
return False |
|
|