# integral of exp(-x/a)*sinh(sqrt(b*x)) from 0 to infinity vanished?

Hi there.

I've tried to calculate integral, $$\int_{0}^{\infty} \exp{(-x/a)}\:\sinh{(\sqrt{bx})}\:dx,$$

a, b = var("a b")
Watt = exp(-x/a)*sinh(sqrt(b*x))
defInt = integrate(Watt,x,0,infinity)


For a>0 and b>0, the result seems to be $$\frac{\sqrt{\pi}\:a^{3/2}\:\sqrt{b}\:e^{ab/4}}{2},$$ and actually

defInt_a1_b1 = integrate(Watt(a=1,b=1),x,0,infinity)
defInt_a1_b1.full_simplify()


yields $$\frac{1}{2}\sqrt{\pi}\:e^{\frac{1}{4}}.$$

But

defInt = integrate(Watt,x,0,infinity)
defInt


vanishes... $$0$$

Where did I make mistakes?

Kazuyoshi

edit retag close merge delete

some issue in maxima. you can try other engines:

sage: integrate(Watt,x,0,infinity,algorithm='sympy')
cases(((abs(arg(a)) < 1/2*pi, 1/2*sqrt(pi)*a^(3/2)*sqrt(b)*e^(1/4*a*b)), (1, integrate(e^(-x/a)*sinh(sqrt(b*x)), x, 0, +Infinity))))

( 2023-11-04 20:44:05 +0200 )edit

FWIW :

sage: mathematica.Integrate(Watt, [x, 0, oo])
ConditionalExpression[(a^(3/2)*Sqrt[b]*E^((a*b)/4)*Sqrt[Pi])/2, Re[a] > 0]
sage: mathematica.Refine(mathematica.Integrate(Watt, [x, 0, oo]), mathematica.And(a>0, b>0)).sage()
1/2*sqrt(pi)*a^(3/2)*sqrt(b)*e^(1/4*a*b)

( 2023-11-04 21:11:42 +0200 )edit
• I took the liberty of refoprmatting your comment, which you had formatted in markdown ;-)...

• You should make an answer of your comment, for the benefiot of future (per-)users...

HTH,

( 2023-11-04 21:15:10 +0200 )edit

Thanks @FrédéricC for your comment. Indeed,

integrate(Watt,x,0,infinity,algorithm='maxima')


yields 0.

But it seems to me that this is not due to Maxima itself because direct run of Maxima from console (and via Jupyterlab Desktop) yields the expected result, $\frac{\sqrt{\pi}a^{3/2}\sqrt{b}e^{ab/4}}{2}$.

I'll try other engines...

( 2023-11-05 02:06:30 +0200 )edit

@Emmanuel Charpentier, thanks for your comment. Do I need to install extra/optional packages to do the following?:

sage: mathematica.Integrate(Watt, [x, 0, oo])


When I did that I got (in short):

TypeError: unable to start mathematica: End Of File (EOF). Exception style platform.
Mathematica finished running /usr/bin/sh -c stty -echo; math -rawterm
command: /usr/bin/sh
args: ['/usr/bin/sh', '-c', 'stty -echo; math -rawterm']
buffer (last 100 chars): b''