Skip to content

Commit adcc033

Browse files
committed
WIP #1034 new ClenshawCurtisRule, GaussLobattoRule,NewtonCotesRule
method options for NIntegrate
1 parent 265a626 commit adcc033

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/reflection/system/NIntegrate.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ public static double integrate(String method, IAST list, final double min, final
146146
}
147147
// NIntegrate failed to converge after `1` refinements in `2` in the region `3`.
148148
throw new ArgumentTypeException("ncvi", F.List(F.ZZ(result.evaluations), xVar, list.rest()));
149-
} else if ("GaussLobatto".equalsIgnoreCase(method)) {
149+
} else if ("GaussLobattoRule".equalsIgnoreCase(method)) {
150150
Quadrature quadrature = new GaussLobatto(Config.SPECIAL_FUNCTIONS_TOLERANCE, 1000);
151151
QuadratureResult result = quadrature.integrate(f, min, max);
152152
if (result.converged) {

symja_android_library/matheclipse-core/src/test/java/org/matheclipse/core/system/IntegrateTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ public void testIntegrate() {
297297
@Test
298298
public void testNIntegrate() {
299299
// avoid Indeterminate at 0
300-
checkNumeric("NIntegrate(1/Sqrt(x), {x, 0.001, 1}, Method -> \"GaussLobatto\")", //
300+
checkNumeric("NIntegrate(1/Sqrt(x), {x, 0.001, 1}, Method -> \"GaussLobattoRule\")", //
301301
"1.9367544467966367");
302302
checkNumeric("NIntegrate(1/Sqrt(x), {x, 0.001, 1}, Method -> \"NewtonCotesRule\")", //
303303
"1.936754446797901");

0 commit comments

Comments
 (0)