Ask Your Question
1

Integrate with elliptic integral special function in result

asked 2013-05-14 20:43:21 -0500

MvG gravatar image

I'm trying to work with the following integral:

$$\int\sqrt{1-\frac14(\cosh x)^2}\mathrm dx$$

Feeding this to sage as integrate(sqrt(1-1/4*cosh(x)^2),x) leaves it pretty much as it stands. Feeding the same to Wolfram Alpha, I get a solution which at least at first glance looks better:

$$\int\sqrt{1-\frac14(\cosh x)^2}\mathrm dx=-\frac12i\sqrt3E\left(ix\Big\vert-\frac13\right)$$

So I wonder:

  • Is there a way to obtain this kind of output using sage? (This is my main question.)
  • In particular, is there a way to manually indicate that a given integral can likely be expressed in terms of elliptic integral functions, and that these would be of interest?
  • Are these elliptic integral functions even available at all inside sage? If they are, under what name?
  • Is there any benefit in using these special elliptic integral functions, as opposed to (a numeric_integral version of) the original integral, in terms of performance or accuracy when dealing with actual numeric data?
edit retag flag offensive close delete

2 answers

Sort by ยป oldest newest most voted
2

answered 2013-05-15 03:47:38 -0500

kcrisman gravatar image

updated 2013-05-16 08:16:20 -0500

Answering your third question, yes they are! However, they are extremely loosely integrated in with the main symbolics.

As to the simplification question Thierry points out, it turns out that nearly all of the Maxima simplification methods yield this (though just sending it to Maxima and back, simplify, doesn't). (I also don't see this in Maxima proper, and I'm investigating this.) These are, of course, simplifications, which might only be valid over certain domains, but I haven't seen one involving an unevaluated integral before so I'm not sure what's going on there.

edit flag offensive delete publish link more

Comments

1

Got it - the Maxima abs_integrate package is to blame for this. Of course, there may be a branch issue involved. See Trac 14591.

kcrisman ( 2013-05-15 04:11:57 -0500 )edit

Thanks for investigating !

tmonteil ( 2013-05-15 06:00:04 -0500 )edit
1

Your link is for exponential integrals, which don't have that square root of sum involving square aspect of the integrand. Nevertheless, one topic down I found the special functions, and among these, EllipticE which should be the one Wolfram Alpha used.

MvG ( 2013-05-15 06:08:23 -0500 )edit

Thank you, I didn't look very carefully at what this was supposed to be representing and thought it was this guy with some unusual notation.

kcrisman ( 2013-05-16 08:19:04 -0500 )edit
1

answered 2013-05-15 01:51:35 -0500

updated 2013-05-15 04:44:32 -0500

What makes me fear is the following:

sage: a = integrate(sqrt(1-1/4*cosh(x)^2),x)
sage: a.full_simplify()
cosh(x)

Which is definitely a wrong answer :(

Concerning your fourth question, the second component of the result of numerical_integral() is the error bound:

sage: numerical_integral(sqrt(1-1/4*cosh(x)^2),0,0.1)         
(0.08655430733928117, 9.609458488855213e-16)
edit flag offensive delete publish link more

Comments

Apparently #13973 fixes this - thanks for checking to Jeroen.

kcrisman ( 2013-06-13 04:12:45 -0500 )edit

It seems the web version of sage (https://cloud.sagemath.com/) still has this bug.

fjdu ( 2013-08-30 06:19:23 -0500 )edit

Correct, http://trac.sagemath.org/ticket/13973 has not been implemented yet - there is a matrix issue we need to deal with.

kcrisman ( 2013-08-31 02:52:17 -0500 )edit

Your Answer

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

Add Answer

[hide preview]

Stats

Asked: 2013-05-14 20:43:21 -0500

Seen: 160 times

Last updated: May 16 '13