> On Feb 8, 10:38 pm, ObsessiveMathsFreak > <obsessivemathsfr...@gmail.com> wrote: > > I have a certain integration result which Sage is currently unaware > > of. I need a way to make sage aware of it in some fashion, via > > substitution or anything else. > > > > For example, sage currently cannot perform the following integral > > > > sage: var(' k t') > > sage: integrate(sqrt(1-k^2*sin(t)^2),t,0,pi/2) > > integrate(sqrt(-k^2*sin(t)^2+1),t,0,pi/2) > > > > In fact, the integral defines the elliptice function E(k). > > > > Is there any way of substituting the unknown integral above for a > > function like E(k) in sage? Can sage be programmed to recognise > > such substitutions automatically?
If you find a reliable way to detect these expressions using the pattern matching functionality, then you can define a function similar to sage.symbolic.integration.external.maxima_integrator and add it to the self.integrators list defined by IndefiniteIntegral and DefiniteIntegral in sage/symbolic/integration/integral.py. For pattern matching, this might be useful: sage: var('a,b,c,t') (a, b, c, t) sage: ex = a*b^2*sin(t)^2 + c sage: ex a*b^2*sin(t)^2 + c sage: w0 = SR.wild() sage: ex.find(w0*sin(t)^2) [a*b^2*sin(t)^2] Cheers, Burcin -- 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