simple integration with absolute value

147 views
Skip to first unread message

Pedro Cruz

unread,
Jul 11, 2011, 4:30:39 AM7/11/11
to sage-support
Good morning,

the command
integrate( abs(x^2-1), x, -2,2)
does not do the job automatically.

I have seen on this discussion group another, at least, similar
message.

Is there an organized list of functions that are yet implemented for
integration? How can one cooperate without being a sage programmer?

Thank you.

Pedro

William Stein

unread,
Jul 11, 2011, 8:47:42 AM7/11/11
to sage-s...@googlegroups.com
On Mon, Jul 11, 2011 at 10:30 AM, Pedro Cruz <pedrocr...@gmail.com> wrote:
> Good morning,
>
> the command
>    integrate( abs(x^2-1), x, -2,2)
> does not do the job automatically.
>
> I have seen on this discussion group another, at least, similar
> message.
>
> Is there an organized list of functions that are yet implemented for
> integration?

Sage's symbolic integration is currently just calling out to Maxima,
so you might ask about this on a Maxima list. Maxima's symbolic
integration is some huge undocumented lisp program from ages gone
by...

The above doesn't return a closed result partly because Maxima doesn't:

wstein@sage:~$ sage -maxima
Maxima 5.23.2 http://maxima.sourceforge.net
(%i1) integrate(abs(x^2-1),x,-2,2)
;
2
/
[ ! 2 !
(%o1) I !x - 1! dx
]
/
- 2


You might find this useful though:

sage: numerical_integral(abs(x^2-1),-2,2)
(3.9999999999999996, 4.4408920985006262e-14)

or

sage: N(integral(abs(x^2-1),(x,-2,2)))
3.9999999999999996


> How can one cooperate without being a sage programmer?

>
> Thank you.
>
> Pedro
>
> --
> To post to this group, send email to sage-s...@googlegroups.com
> To unsubscribe from this group, send email to sage-support...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/sage-support
> URL: http://www.sagemath.org
>

--
William Stein
Professor of Mathematics
University of Washington
http://wstein.org

Reply all
Reply to author
Forward
0 new messages