(%i1) display2d:false$
(%i2) elliptic_eu(4.0,0.0);
(%o2) 2.2831853071795862
(%i3) elliptic_eu(4.0,0.5);
(%o3) 2.413476911260969
(%i4) quad_qags(jacobi_dn(v,1/2)^2,v,0,4)[1];
(%o4) 2.989098612929733
elliptic_eu(u,m) is the integral of jacobi_dn(v,m)^2 from 0 to u. At m=0 that integrand is identically 1, so %o2 should be 4.0. At m=0.5 the integral is 2.989098612929733, as %o4 shows, but elliptic_eu returns 2.413476911260969. Since the integrand is non-negative the function must also be non-decreasing, yet it drops at 2*elliptic_kc(m). Arguments below 2*elliptic_kc(m), and beyond an even multiple of it, come out right: elliptic_eu(8.0,0.5) = 5.956219480373488 matches quadrature.
Detected by Claude.
Superseded by [#5326], which includes a proposed fix.
Related
Bugs:
#5326