pub fn explain_sum_rule(
terms: &[Expression],
_variable: &Symbol,
) -> StepByStepExplanationExpand description
Generate educational explanation for sum rule integration
§Arguments
terms- The terms being integratedvariable- The variable of integration
§Examples
use mathhook_core::{symbol, Expression};
use mathhook_core::calculus::integrals::educational::explain_sum_rule;
let x = symbol!(x);
let terms = vec![
Expression::pow(Expression::symbol(x.clone()), Expression::integer(2)),
Expression::mul(vec![Expression::integer(3), Expression::symbol(x.clone())]),
Expression::integer(5),
];
let explanation = explain_sum_rule(&terms, &x);
assert!(explanation.steps.len() >= 3);