## #2435 No result for definite integral (IV)

open
nobody
5
2012-11-18
2012-07-01
No

Enter:

integrate(sin(a*x)/(sinh(%pi*x)),x,0,inf);

and Maxima returns:

integrate(sin(a*x)/sinh(%pi*x),x,0,inf)

The correct result is: (1/2)*tanh(a/2), a>0

build_info("5.27.0","2012-04-24 08:52:03","i686-pc-mingw32","GNU Common Lisp (GCL)","GCL 2.6.8")

Regards

Chris

## Discussion

• Aleksas - 2012-07-10

Example. integrate(sin(a*x)/sinh(pi*x),x,minf,inf)
for details see
http://www.seas.harvard.edu/ekaxiras/images/tamaroot.pdf

(%i1) S:'integrate(sin(a*x)/sinh(%pi*x),x,minf,inf)\$
(%i2) assume(a>0)\$
(%i3) f(x):=exp(%i*a*x)/sinh(%pi*x);
(%o3) f(x):=exp(%i*a*x)/sinh(%pi*x)
(%i4) r:2*%pi*%i*residue(f(x),x,%i);
(%o4) -2*%i*%e^(-a)
(%i5) r1:-%pi*%i*residue(f(x),x,0);
(%o5) -%i
(%i6) r2:-%pi*%i*residue(f(x),x,2*%i);
(%o6) -%i*%e^(-2*a)
(%i7) 'integrate(f(x),x,minf,inf)+'integrate(f(x+2*%i),x,inf,minf)
+r1+r2=r;
(%o7) -integrate(%e^(%i*a*(x+2*%i))/sinh(%pi*(x+2*%i)),x,-inf,inf)+integrate(%e^(%i*a*x)/sinh(%pi*x),x,-inf,inf)-%i*%e^(-2*a)-%i=-2*%i*%e^(-a)
(%i8) trigexpand(expand(%));
(%o8) -integrate(%e^(%i*a*x-2*a)/sinh(%pi*x),x,-inf,inf)+integrate(%e^(%i*a*x)/sinh(%pi*x),x,-inf,inf)-%i*%e^(-2*a)-%i=-2*%i*%e^(-a)
(%i9) imagpart(%);
(%o9) -%e^(-2*a)*integrate(sin(a*x)/sinh(%pi*x),x,-inf,inf)+integrate(sin(a*x)/sinh(%pi*x),x,-inf,inf)-%e^(-2*a)-1=-2*%e^(-a)
(%i10) solution:solve(%,S)[1];
(%o10) integrate(sin(a*x)/sinh(%pi*x),x,-inf,inf)=(%e^a-1)/(%e^a+1)

(%i11) 'integrate(sin(a*x)/sinh(%pi*x),x,0,inf)=(%e^a-1)/(%e^a+1)/2;
(%o11) integrate(sin(a*x)/sinh(%pi*x),x,0,inf)=(%e^a-1)/(2*(%e^a+1))

(%i12) sol1:rhs(%);
(%o12) (%e^a-1)/(2*(%e^a+1))

The correct result is: (1/2)*tanh(a/2)
(%i13) sol2:(1/2)*tanh(a/2);
(%o13) tanh(a/2)/2
(%i14) exponentialize(%);
(%o14) (%e^(a/2)-%e^(-a/2))/(2*(%e^(a/2)+%e^(-a/2)))
(%i15) factor(%);
(%o15) (%e^a-1)/(2*(%e^a+1))
(%i16) is(%=sol1);
(%o16) true
Then sol1=sol2.

Aleksas D

• christoph reineke - 2012-07-11

A very sophisticated solution!

integrate(cos(x)/cosh(x),x,0,inf)= %pi/(2*cosh(%pi/2))?

I’m quite sure that you will find a way…

Kind regards

Chris

• Aleksas - 2012-07-11

example 6 integrate(cos(x)/cosh(x),x,minf,inf);

(%i1) f(x):=cos(x)/cosh(x);
(%o1) f(x):=cos(x)/cosh(x)
(%i2) S:'integrate(f(x),x,minf,inf);
(%o2) integrate(cos(x)/cosh(x),x,-inf,inf)
(%i3) r:2*%pi*%i*residue(f(x),x,%pi/2*%i);
(%o3) 2*%pi*cosh(%pi/2)
(%i4) 'integrate(f(x),x,minf,inf)+'integrate(f(x+%pi*%i),x,inf,minf)=r;
(%o4) integrate(cos(x)/cosh(x),x,-inf,inf)-integrate(cos(x+%i*%pi)/cosh(x+%i*%pi),x,-inf,inf)=2*%pi*cosh(%pi/2)
(%i5) realpart(%);
(%o5) cosh(%pi)*integrate(cos(x)/cosh(x),x,-inf,inf)+integrate(cos(x)/cosh(x),x,-inf,inf)=2*%pi*cosh(%pi/2)
(%i6) ats:solve(%,S)[1];
(%o6) integrate(cos(x)/cosh(x),x,-inf,inf)=(2*%pi*cosh(%pi/2))/(cosh(%pi)+1)
(%i7) float(%), numer;
(%o7) integrate(cos(x)/cosh(x),x,-inf,inf)=1.252040331252148
(%o8) [1.252040331252148,5.5816090477577717*10^-9,450,0]
(%i9) sol1:rhs(ats);
(%o9) (2*%pi*cosh(%pi/2))/(cosh(%pi)+1)
(%i10) sol2:%pi / cosh(%pi/2);
(%o10) %pi/cosh(%pi/2)
(%i11) float(%), numer;
(%o11) 1.252040331252148
(%i12) trigrat(sol1-sol2);
(%o12) 0

best

Aleksas D