Ask Your Question

What's wrong with Лобачевский function?

asked 2014-12-08 03:54:22 -0500


I tried to plot the following function $$Л(\theta) = -\int_0^\theta \log |2 \sin(u)| du$$ (called the Lobatchevski function). So I started with

sage: theta, u = var('theta', 'u')
sage: assume(0 < theta < pi)
sage: assume(theta, 'real')
sage: el(theta) = - integral(log(abs(2*sin(u))), u, 0, theta)

The last command just asks maxima. Maxima starts computing (one CPUS is running 100%) but never stops.


edit retag flag offensive close merge delete


Even that does not work:

sage: integral(log(abs(2*sin(u))), u, 0, pi/3)
FrédéricC gravatar imageFrédéricC ( 2014-12-08 05:10:04 -0500 )edit

This is actually pretty bizarre, and (sadly) yet another error in Maxima's abs_integrate. I'm getting really frustrated with that package about now, even though it adds a lot of awesome integrals. See

kcrisman gravatar imagekcrisman ( 2014-12-08 08:43:13 -0500 )edit

1 answer

Sort by » oldest newest most voted

answered 2014-12-08 05:35:42 -0500

mmarco gravatar image

If what you are interested in is computing values of this function, you can use numerical integration instead of symbolic:

sage: el = lambda theta: -numerical_integral(log(abs(2*sin(u))), 0, theta)[0]
sage: plot(el, 0, pi)
edit flag offensive delete link more


Yeah, for plotting this would be fine.

kcrisman gravatar imagekcrisman ( 2014-12-08 08:17:15 -0500 )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

1 follower


Asked: 2014-12-08 03:54:22 -0500

Seen: 77 times

Last updated: Dec 08 '14