On Jan 23, 3:55 am, "ma...@mendelu.cz" <ma...@mendelu.cz> wrote: > On 23 led, 12:39, "ma...@mendelu.cz" <ma...@mendelu.cz> wrote: > > > Hello, I have a partial answer and perhaps you found a bug in > > elliptic_e in Sage (read below). > > > To evaluate the integral do something like this (note replacing A by > > lowercase letter) > > > T,r,a,b=var('T r a b') > > F(x)=integrate(sqrt(1+r*sin(x)^2),x, algorithm='mathematica_free') > > eq = T==F(b)-F(a) > > eq > > > the answer is > > > T == -elliptice(a, -r) + elliptice(b, -r) > > So you have to solve > T == -elliptic_e(a, -r) + elliptic_e(b, -r) > > in Sage. Sorry for the chaos in my first answer. > > Robert
Thanks, that's helpful, I didn't think to try 'mathematica_free', and I don't know anything about elliptic integrals. But now I don't know how to proceed. I have some other constants, so my integral ends up being defined as follows: sage: var('a') sage: D=5280 sage: F(x) = integrate(sqrt(1 + 4*pi^2*a^2/D^2 * (sin(2*pi*x/D))^2), x, algorithm='mathematica_free') sage: F x |--> 2640*elliptice(1/2640*pi*x, -1/6969600*pi^2*a^2)/pi and I want to solve sage: find_root(5281 == F(D/2) - F(-D/2), 20, 30) ... TypeError: unable to simplify to float approximation In fact: sage: F(2640).subs(a=23) 2640*elliptice(pi, -529/6969600*pi^2)/pi sage: n(_) ... TypeError: cannot evaluate symbolic expresssion numerically Maybe I should stick with Taylor polynomials? -- John -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org