i decided to try out the contour approach. i was hoping to find a really
cunning path that might make the problem really easy. but i can't see one
(anyone?). so here's my attempt:
working now in the complex plane, the problem i have is to start from (0,0)
which is a pole. so what i'm going to do is not start on the pole and instead
start on (eps,0) [eps = epsilon].
my path from (eps,0) to (1,0) has three parts:
part A: quarter circle anticlockwise from (eps, 0) to (0, eps).
part B: line along y, from (0,eps) to (0,1).
part C: clockwise quarter cicle from (0,1) to (1,0).
so my answer, I, is Re(A + B + C), providing i can make eps->0 without
problems (Re = real part).
now, i can say right away that Re(B) = 0, since it is entirely on the
imaginary line. which leaves me with two problems lim eps->0 Re(A) and Re(C).
this is where the calculator can only partly help me. i have to do part A
and maybe it (the 71b in this case) can do part C.
let f(z) = cos(-)
A = | f(z(t)) z'(t) dt and z(t) = eps(cos(t)+ i sin(t)) = eps e
| 1 i t
= i eps | cos(--------) e dt
| i t
/0 eps e
now, the bit i want is Re(A) whilst eps->0. however this is where i cheat
because i can't let eps->0 before integrating and i don't know how to
now it turns out that Re(A) = -eps cos(1/eps) - Si(1/eps), where Si(z) is the
sine integral as before. knowing this, it's clear than Re(A) lim eps->0
= 0 - si(inf)
but that was because i knew the original indefinite integral all along.
maybe i can put a small eps into the 71b and integrate numerically and guess
the answer is pi/2. is there any way to deal with the limit before
integrating?? so, by guessing or otherwise i have Re(A) = -pi/2
this part i have to manipulate the problem into a form i can feed to the 71b.
as in part A, but with no eps, i have:
| -(i t) i t
C = -i | cos(e ) e dt [note: minus comes from other direction]
the first idea was to feed this directly to the 71b as a complex numerical
integration, like this:
but it doesn't like it. its a pity, i was hoping it could perform its
summation with complex numbers. is there a way??
so, i have to do more more work. i can expand C into real and complex
parts. if i expand the integrand and take the imaginary part, it will form the
real part of the answer when put with the -i outside. so after simplification,
Re(C)=| (sin(t) cos(cos(t)) cosh(sin(t)) + cos(t) sin(cos(t)) sinh(sin(t))) dt
and into the 71b (with the additional -pi/2 from part A) as this:
10 DEF FNA
20 S=SIN(IVAR) @ C=COS(IVAR)
40 END DEF
50 DISP INTEGRAL(0,PI/2,1E-8,FNA)-PI/2
which finally gives the very good (correct) answer: