-
-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Numeric integration returns wrong result for N[ integrate(1/x,{x,0,1}) ]
#1064
Comments
- idiv - Integral of `1` does not converge on `2`. - JUnit test for this issue `testXReciprocalIssue1064()` - `NIntegrate` with `LegendreGauss` method was called as default, other `NIntegrate` methods don't return a result
For the See these JUnit tests:
Maybe we should use another default method for |
Each numerical integration method has its own strengths and weaknesses. I think the |
@axkr I suggest to use the
|
I have some suggestions for determining numerical integral methods:
|
- If the expression has `Abs` function, use the `LegendreGauss` method Example input: `Integrate[Abs(x^2-2x), {x, -10, 10}] // N` Result should be `669.3282335875249` - If the expression contains a variable that occurs in the exponent of `Power` function, use the `GaussKronrod` method Example input: `x^x`, `3^(2x)`, `E^(-Sin(t))` - Otherwise, use the `Romberg` method, since it is the optimized version of trapezoid and Simpson methods
There is the input, the integral of
1/x
from 0 to 1 is a divergent integral:Error result:
Expected result:
Indeterminate
The text was updated successfully, but these errors were encountered: