explain_definite_integral

Function explain_definite_integral 

Source
pub fn explain_definite_integral(
    integrand: &Expression,
    variable: &Symbol,
    lower_bound: &Expression,
    upper_bound: &Expression,
) -> StepByStepExplanation
Expand description

Generate educational explanation for definite integral evaluation

§Arguments

  • integrand - The integrand expression
  • variable - The variable of integration
  • lower_bound - The lower limit of integration
  • upper_bound - The upper limit of integration

§Examples

use mathhook_core::{symbol, Expression};
use mathhook_core::calculus::integrals::educational::explain_definite_integral;

let x = symbol!(x);
let integrand = Expression::pow(Expression::symbol(x.clone()), Expression::integer(2));
let lower = Expression::integer(0);
let upper = Expression::integer(2);
let explanation = explain_definite_integral(&integrand, &x, &lower, &upper);
assert!(explanation.steps.len() >= 5);