Re: Mathematica gives bad integral ??
- To: mathgroup at smc.vnet.net
- Subject: [mg24315] Re: Mathematica gives bad integral ??
- From: Ronald Bruck <bruck at math.usc.edu>
- Date: Sun, 9 Jul 2000 04:52:27 -0400 (EDT)
- Organization: Univ of Southern California
- References: <firstname.lastname@example.org>
- Sender: owner-wri-mathgroup at wolfram.com
In article <8k3n38$3pk at smc.vnet.net>, "J.R. Chaffer" <jrchaff at mcn.net> wrote: :Hi, this newbie gets erroneous results with Mathematica :4.0 (for students), with the following integral. Hopefully :someone can tell me why, and what I may be doing :wrong. I have tried "Assumptions -> x e Reals", or :x > 0, with same results. Integral in question is, : :Integrate[1/Sqrt[1-Sin[2x]]] : :The result is somewhat involved, instead of the expected :result (Schaum, "Calculus" 4E, p. 297), : : integral = - (1/Sqrt)Log[Abs[Csc[Pi/4-x]-Cot[Pi/4-x]]] : :One expects to get differing forms with any computer :algebra system, since there are so many equivalent forms :of algebraic expressions. However, Mathematica's form :and the Schaum (correct) form differ by significant :numerical values, as plotting shows (i.e., not some E-16 :or some such). : :Further, and what really seems wrong, is that when one :differentiates Mathematica's result for the integral, one :does NOT get the original integrand, or anything even :close, numerically. : :So, I am confused. Anyone who knows the explanation :would be welcome to share it. When **I** use Mathematica 4.01 to find the integral, and plot the difference between the purported integral and 1/Sqrt[1-Sin[2x]] on [0,2Pi], all I get is numerical noise. Mathematica returns a rather complicated expression involving complex numbers, which nevertheless when FullSimplify'd yields ArcTanh[(1 + Tan[x/2])/Sqrt](Cos[x]-Sin[x]))/Sqrt[1/2-Sin[x]Cos[x]]. Since Sqrt[1/2-Sin[x]Cos[x]] = Sqrt[1-Sin[2x]]/Sqrt = Sqrt[(Cos[x]-Sin[x])^2]/Sqrt = Abs[Cos[x]-Sin[x]]/Sqrt, this is equivalent to Sqrt ArcTanh[(1 + Tan[x/2])/Sqrt] Sign[Cos[x] - Sin[x]]. I don't see the problem, because this is correct. On intervals where cos x > sin x, Sqrt ArcTanh[(1 + Tan[x/2])/Sqrt] is an antiderivative, and on intervals where cos x < sin x, the negative of that expression is an antiderivative. (You can't have intervals containing x with both behaviors, since that would make the integrand undefined.) I was using Mathematica 4.01. Is there that big a difference between the student and professional version? -- Due to University fiscal constraints, .sigs may not be exceed one line.