Re: ArcCos[x] with x > 1

*To*: mathgroup at smc.vnet.net*Subject*: [mg49327] Re: ArcCos[x] with x > 1*From*: jaegerm at ibmt.fhg.de*Date*: Wed, 14 Jul 2004 07:29:33 -0400 (EDT)*Sender*: owner-wri-mathgroup at wolfram.com

Thanks a lot! It' great for a non-mathematician to have some people around who help so amply and willingly. Of course, John's first reply gave the hint I needed most: >> How does Mathematica calculate ArcCos[x] with x > 1 which is >> outside the function's domain [-1,1]? > By using Euler's Exp[I x] == Cos[x] + I Sin[x] And >> How do I get an analytical expression for the imaginary part of >> ArcCos[2]? > ComplexExpand[I ArcCos[2]] will convert your result to the > representation you prefer. gives exactly the desired result. I couldn't reproduce on my 4.2 version all that Paul (a home page worth visiting!) said. E. g., omitting John's comment about ComplexExpand[], the original integral (Integrate[r ArcCos[1/(2 r)] (1 + 4 r^2)^(1/2), {r, 1/2, 1/2^(1/2)}]) gives 0.114539+0.*i and not as Paul got > 0.12767 And the same holds for the indefinite integral > In fact, Mathematica 5.0 gets the indefinite integral wrong: > Simplify[Integrate[r ArcCos[1/(2r)] Sqrt[4r^2 + 1], r], > 1/Sqrt[2] > r > 1/2] results in a (pseudo-)imaginary solution on my version, that finally evaluates to the (para-)correct form of 0.114539+0.*i as before. So, while I have to struggle with the non-vanishing i's I at least don't get numerically wrong results. Carl's comment > These errors are produced when the two endpoints lie on different > branches of the functions in the indefinite integral. certainly applies here. So, maybe that's where the basic problem is. By the way, for the curious among you this was the underlying question: Given is a cube of side length a (or, let's say, 1). What is the mean distance of the cube's centre point to its surface. Obviously, the result is between a / 2 (the distance to any of the six centres of the six faces) and a / Sqrt[2] (the distance to any of the eight corners). Sure, that problem can easily be reduced. Think that sounds like a simple integration on kindergarden level? So did I. But I soon got the impression I was wrong. So, thanks again and have fun Magnus

**User-defined or filled symbols for Points in ListPlots and Epilogs?**

**RE: A question about function**

**Re: ArcCos[x] with x > 1**

**Re: ArcCos[x] with x > 1**