Ask Your Question
2

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

asked 2014-12-08 10:54:22 +0100

vdelecroix gravatar image

Hello,

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.

Vincent

edit retag flag offensive close merge delete

Comments

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 12:10:04 +0100 )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 http://trac.sagemath.org/ticket/17468

kcrisman gravatar imagekcrisman ( 2014-12-08 15:43:13 +0100 )edit

1 Answer

Sort by » oldest newest most voted
3

answered 2014-12-08 12:35:42 +0100

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

Comments

Yeah, for plotting this would be fine.

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

Stats

Asked: 2014-12-08 10:54:22 +0100

Seen: 458 times

Last updated: Dec 08 '14