Re: ArcCos[x] with x > 1
- To: mathgroup at smc.vnet.net
- Subject: [mg49347] Re: ArcCos[x] with x > 1
- From: ab_def at prontomail.com (Maxim)
- Date: Thu, 15 Jul 2004 07:00:12 -0400 (EDT)
- References: <cclev9$kb3$1@smc.vnet.net> <cco3io$4ig$1@smc.vnet.net> <cctaff$c11$1@smc.vnet.net> <cd0730$9g9$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
"David W. Cantrell" <DWCantrell at sigmaxi.org> wrote in message news:<cd0730$9g9$1 at smc.vnet.net>... > But Paul's case is for version 5, as is what I showed above. So at least > in the current version, some indefinite integrals are wrong. Actually this is a quite curious example, because Mathematica 5.0 doesn't always return the same answer for this integral: In[1]:= indef1 = Integrate[r*Sqrt[4*r^2+1]*ArcCos[1/(2*r)], r] def1 = Integrate[r*Sqrt[4*r^2+1]*ArcCos[1/(2*r)], {r, 1/2, 1/Sqrt[2]}] Integrate[Sqrt[4*r^2+1]*ArcCos[1/(2*r)], r] indef2 = Integrate[r*Sqrt[4*r^2+1]*ArcCos[1/(2*r)], r] def2 = Integrate[r*Sqrt[4*r^2+1]*ArcCos[1/(2*r)], {r, 1/2, 1/Sqrt[2]}] Out[1]= (1/24)*Sqrt[1 + 4*r^2]*((-Sqrt[4 - 1/r^2])*r + (2 + 8*r^2)*ArcCos[1/(2*r)]) - (r*((-4 + Sqrt[16 - 1/r^4])*(-1 + 16*r^4) + 2*Sqrt[16 - 1/r^4]*Sqrt[-1 + 16*r^4]* Log[4*r^2 + Sqrt[-1 + 16*r^4]]))/(24*Sqrt[4 + 1/r^2]*(-1 + 4*r^2)*Sqrt[1 + 4*r^2]) Out[2]= (1/48)*(2 - 4*Sqrt[3] + 3*Sqrt[3]*Pi - 4*Log[2 + Sqrt[3]]) Out[3]= Integrate[Sqrt[4*r^2+1]*ArcCos[1/(2*r)], r] Out[4]= (1/24)*Sqrt[1 + 4*r^2]*((-Sqrt[4 - 1/r^2])*r + (2 + 8*r^2)*ArcCos[1/(2*r)]) + (Sqrt[4 - 1/r^2]*r*Sqrt[-1 + 16*r^4]*(ArcTan[1/Sqrt[-1 + 16*r^4]] - 2*Log[4*r^2 + Sqrt[-1 + 16*r^4]]))/ (24*(-1 + 4*r^2)*Sqrt[1 + 4*r^2]) Out[5]= (1/144)*((-2 + 9*Sqrt[3])*Pi - 6*(Sqrt[3] + Log[7 + 4*Sqrt[3]])) This quirk is 100% reproducible on my machine (except for one time when it crashed the kernel); apparently, evaluating In[3] changes some internal states/settings and indef2, def2 are not the same as indef1, def1. Out[4] and Out[5] are correct while Out[1] and Out[2] are not. Similar things sometimes occur after a computation is interrupted, and this is probably one of the most annoying and hard to track types of glitches; here's an example where it is easy to see what is going on: In[1]:= Options[Series] Sum[D[Pochhammer[1,k]^2/Pochhammer[n,k]*2^-k/k!, n], {k, 0, Infinity}] (*interrupt the computation with Alt-.*) Options[Series] Out[1]= {Analytic -> True} Infinity::indet: Indeterminate expression 0*n*Infinity*Gamma[n] encountered. Infinity::indet: Indeterminate expression 0*Infinity*Gamma[1 + n] encountered. Infinity::indet: Indeterminate expression 0*n*Infinity*Gamma[n] encountered. General::stop: Further output of Infinity::indet will be suppressed during this calculation. Out[2]= $Aborted Out[3]= {Analytic -> False} If you press Alt-. after you see the warning messages, Mathematica forgets to restore the previous setting for Analytic. Maxim Rytin m.r at inbox.ru