From adcc033fe0356e1e1635a7d5af8c7848d37693c8 Mon Sep 17 00:00:00 2001 From: axexlck Date: Thu, 1 Aug 2024 22:11:52 +0200 Subject: [PATCH] WIP #1034 new ClenshawCurtisRule, GaussLobattoRule,NewtonCotesRule method options for NIntegrate --- .../java/org/matheclipse/core/reflection/system/NIntegrate.java | 2 +- .../test/java/org/matheclipse/core/system/IntegrateTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/reflection/system/NIntegrate.java b/symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/reflection/system/NIntegrate.java index 93b84ac2f..85e34b71f 100644 --- a/symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/reflection/system/NIntegrate.java +++ b/symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/reflection/system/NIntegrate.java @@ -146,7 +146,7 @@ public static double integrate(String method, IAST list, final double min, final } // NIntegrate failed to converge after `1` refinements in `2` in the region `3`. throw new ArgumentTypeException("ncvi", F.List(F.ZZ(result.evaluations), xVar, list.rest())); - } else if ("GaussLobatto".equalsIgnoreCase(method)) { + } else if ("GaussLobattoRule".equalsIgnoreCase(method)) { Quadrature quadrature = new GaussLobatto(Config.SPECIAL_FUNCTIONS_TOLERANCE, 1000); QuadratureResult result = quadrature.integrate(f, min, max); if (result.converged) { diff --git a/symja_android_library/matheclipse-core/src/test/java/org/matheclipse/core/system/IntegrateTest.java b/symja_android_library/matheclipse-core/src/test/java/org/matheclipse/core/system/IntegrateTest.java index 6e6ddcb53..bb4e63bb6 100644 --- a/symja_android_library/matheclipse-core/src/test/java/org/matheclipse/core/system/IntegrateTest.java +++ b/symja_android_library/matheclipse-core/src/test/java/org/matheclipse/core/system/IntegrateTest.java @@ -297,7 +297,7 @@ public void testIntegrate() { @Test public void testNIntegrate() { // avoid Indeterminate at 0 - checkNumeric("NIntegrate(1/Sqrt(x), {x, 0.001, 1}, Method -> \"GaussLobatto\")", // + checkNumeric("NIntegrate(1/Sqrt(x), {x, 0.001, 1}, Method -> \"GaussLobattoRule\")", // "1.9367544467966367"); checkNumeric("NIntegrate(1/Sqrt(x), {x, 0.001, 1}, Method -> \"NewtonCotesRule\")", // "1.936754446797901");