Integrating Abs[Sin[]^2]
- To: mathgroup at smc.vnet.net
- Subject: [mg38830] Integrating Abs[Sin[]^2]
- From: Jos R Bergervoet <antispam at nospam.com>
- Date: Wed, 15 Jan 2003 02:19:39 -0500 (EST)
- Organization: Philips Research Laboratories
- Sender: owner-wri-mathgroup at wolfram.com
A strange result appeared when using Mathematica 4.1 for Linux Copyright 1988-2000 Wolfram Research, Inc. -- Motif graphics initialized -- in computing the following: result = Integrate[ Abs[Sin[k x]]^2, {x,0,1}] N[ result /. k->I+1 ] (* Analytical approach gives 0.261044 + 0.616283 I, WRONG !!! *) k=I+1; NIntegrate[ Abs[Sin[k x]^2], {x,0,1}] (* Numerical check gives 0.679391 *) So why is the analytical result for |Sin[k x]|^2 wrong? What should I do to circumvent such errors? Thanks in adv., -- Jos <jos.bergervoet at philips.no_s_p_a_m.com> PS: For those interested, the correct analytical result is: (Sinh[2Im[k]]/Im[k] - Sin[2Re[k]]/Re[k]) / 4
- Follow-Ups:
- Re: Integrating Abs[Sin[]^2]
- From: Dr Bob <majort@cox-internet.com>
- Re: Integrating Abs[Sin[]^2]