Ask Your Question
1

Integrate with elliptic integral special function in result

asked 2013-05-15 03:43:21 +0200

MvG gravatar image

updated 2015-01-13 21:13:44 +0200

FrédéricC 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 merge delete

2 Answers

Sort by » oldest newest most voted
2

answered 2013-05-15 10:47:38 +0200

kcrisman gravatar image

updated 2013-05-16 15:16:20 +0200

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 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](http://trac.sagemath.org/sage_trac/ticket/14591).

kcrisman gravatar imagekcrisman ( 2013-05-15 11:11:57 +0200 )edit

Thanks for investigating !

tmonteil gravatar imagetmonteil ( 2013-05-15 13:00:04 +0200 )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`](http://www.sagemath.org/doc/reference/functions/sage/functions/special.html#sage.functions.special.EllipticE) which should be the one Wolfram Alpha used.

MvG gravatar imageMvG ( 2013-05-15 13:08:23 +0200 )edit

Thank you, I didn't look very carefully at what this was supposed to be representing and thought it was [this guy](http://www.sagemath.org/doc/reference/functions/sage/functions/exp_integral.html#sage.functions.exp_integral.Function_exp_integral_e) with some unusual notation.

kcrisman gravatar imagekcrisman ( 2013-05-16 15:19:04 +0200 )edit
1

answered 2013-05-15 08:51:35 +0200

tmonteil gravatar image

updated 2013-05-15 11:44:32 +0200

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 link more

Comments

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

kcrisman gravatar imagekcrisman ( 2013-06-13 11:12:45 +0200 )edit

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

fjdu gravatar imagefjdu ( 2013-08-30 13:19:23 +0200 )edit

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

kcrisman gravatar imagekcrisman ( 2013-08-31 09:52:17 +0200 )edit

Your Answer

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

Add Answer

Question Tools

Stats

Asked: 2013-05-15 03:43:21 +0200

Seen: 1,136 times

Last updated: May 16 '13