[poincare] Integral takes 4 arguments (integrand, differential variable,

lower bound, upper bound)
This commit is contained in:
Émilie Feral
2018-10-24 17:19:55 +02:00
parent b3269a2dc0
commit 244baec90f
8 changed files with 89 additions and 64 deletions

View File

@@ -93,8 +93,7 @@ double StorageCartesianFunction::approximateDerivative(double x, Poincare::Conte
}
double StorageCartesianFunction::sumBetweenBounds(double start, double end, Poincare::Context * context) const {
// TODO: this does not work yet because integral does not understand UnknownX
Poincare::Integral integral(expression(context).clone(), Poincare::Float<double>(start), Poincare::Float<double>(end)); // Integral takes ownership of args
Poincare::Integral integral(expression(context).clone(), Symbol(Symbol::SpecialSymbols::UnknownX), Poincare::Float<double>(start), Poincare::Float<double>(end)); // Integral takes ownership of args
/* TODO: when we approximate integral, we might want to simplify the integral
* here. However, we might want to do it once for all x (to avoid lagging in
* the derivative table. */