3
$\begingroup$

The following integral generates a couple of errors that I'm not sure what they mean or how to prevent them

Integrate[
Log[Sqrt[(0.27059805007309845` - 
  0.7071067811865475` s)^2 + (-0.2705980500730985` + 
  0.7071067811865475` s)^2]], {s, .3826, .3829}]

errors

Delete::partw: Part 2 of IntegrateImproperDumptmp does not exist. >>

Join::heads: Heads List and Delete at positions 1 and 2 are expected to be the same. >>

$\endgroup$
8
  • $\begingroup$ I got -0.00291087 + 0.601118 i with M10. $\endgroup$
    – Sumit
    Commented Apr 27, 2016 at 14:06
  • $\begingroup$ 1) The numerical NIntegrate is typically more appropriate than the symbolic integrator Integrate if you want a numerical approximation of an integral. Symbolic and numerical integration use VERY different approaches. Those errors are probably cause by Integrate's internal routines getting tripped up by your machine-precision input. 2) Your integrand has a singularity within the integration domain that is probably going to cause trouble. $\endgroup$
    – MarcoB
    Commented Apr 27, 2016 at 14:08
  • $\begingroup$ @happyfish For $s = 0.382683$ the argument of the logarithm vanishes, so you are trying to calculate $\log0$. I am not sure how to deal with that. $\endgroup$
    – MarcoB
    Commented Apr 27, 2016 at 14:16
  • $\begingroup$ @MarcoB sorry I ignored the negative sign before 0.27. but Minimize is not giving the correct result anyway maybe due to precision errors. $\endgroup$
    – vapor
    Commented Apr 27, 2016 at 14:19
  • 2
    $\begingroup$ The messages comprise a small bug. Will be fixed. $\endgroup$ Commented Apr 27, 2016 at 14:27

1 Answer 1

2
$\begingroup$

Try

Integrate[
Log[Abs[2 (0.27059805007309845` - 
  0.7071067811865475` s)]], {s, .3826, .3829}]
(*-0.00280689*)

returns no errors, since it is the same with your integral.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.