Ask Your Question
2

Integrating an integral

asked 2022-10-09 10:34:55 +0100

Dox gravatar image

updated 2022-10-15 13:35:10 +0100

FrédéricC gravatar image

Hi community.

I'm interested in manipulating a formal expression

$$\int \mathrm{d}t \; e^{- 2 \int \mathrm{d}t \; h(t)}.$$

My notebook contains the following code

var('t')
h = function('h')(t)
integrate(exp(integrate(-2*h,t)),t)

but the result is +Infinity.

QUESTION(S):

  • Why I am getting a result if the function h is not explicit?
  • Where does the +Infinity come from?
edit retag flag offensive close merge delete

Comments

1

The culprit is giac:

sage: integrate(exp(integrate(-2*h,t)),t,algorithm='giac')
+Infinity
FrédéricC gravatar imageFrédéricC ( 2022-10-09 16:20:11 +0100 )edit
1

Interestingly :

sage: integrate(e^(-2*integrate(h(t), t, algorithm="sympy")), t, algorithm="sympy")
integrate(e^(-2*integrate(h(t), t)), t)
sage: mathematica.Integrate(e^(-2*mathematica.Integrate(h(t), t)), t)
Integrate[exp[-2*Integrate[H[t], t]], t]
sage: mathematica.Integrate(e^(-2*mathematica.Integrate(h(t), t)), t).sage()
Integrate(e^(-2*Integrate(h(t), t)), t)

Enhanceable ?

sage: mathematica.Integrate(e^(-2*mathematica.Integrate(h(t), t)), t).sage(locals={("Integrate", 1):integrate})
// Giac share root-directory:/usr/share/giac/
// Giac share root-directory:/usr/share/giac/
Added 0 synonyms
+Infinity

Indeed, Giac misbehaves.

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 2022-10-10 11:13:12 +0100 )edit

And :

sage: integrate(e^(-2*integrate(h(t), t, algorithm="maxima")), t, algorithm="maxima")
integrate(e^(-2*integrate(h(t), t)), t)

Maxima is correct.

Would you mind filing a ticket ?

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 2022-10-10 11:14:49 +0100 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2022-10-10 10:34:52 +0100

Dox gravatar image

Thanks to the comment by @fredericc I found the answer! The solution is to use the algorithm='maxima' flag, e.g.

var('t')
h = function('h')(t)
integrate(exp(integrate(-2*h,t)),t, algorithm='maxima')

With the above, I can also manipulate the expression... differentiate or other:

var('t')
h = function('h')(t)
HH = function('HH')(t)
HH = exp(integrate(2*h,t))*(Cg + k*integrate(exp(integrate(-2*h,t)),t, algorithm='maxima'))
diff(HH,t)

The above result is compatible with the by-hand calculation and the result by Mathematica

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2022-10-09 10:34:55 +0100

Seen: 242 times

Last updated: Oct 10 '22