Processing math: 100%

First time here? Check out the FAQ!

Ask Your Question
2

Is this a known bug with integral()

asked 9 years ago

Julien gravatar image

I've tried to compute the following integral wth integral() in a SageMathCloud worksheet: π/6π/6cosx1+sinxdx.

The output was an error message (saying the integral is divergent), just like the one I got in SageMathCell (see link): https://sagecell.sagemath.org/?z=eJzz...

So I tried with integrate() and with numerical_integral() as well. I was never able to obtain the value of this integral, which turns out to be ln(3) after an obvious substitution.

Is this a bug?

Note that replacing 1 by 1.1 yields this: https://sagecell.sagemath.org/?z=eJzz...

while we get that when replacing 1 by 2: https://sagecell.sagemath.org/?z=eJzz...

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
2

answered 9 years ago

FrédéricC gravatar image

Maxima is apparently not able to do that, but sympy can:

sage: integral(cos(x)/(1+sin(x)),(x,-pi/6,pi/6),algorithm='sympy')
log(3)
Preview: (hide)
link

Comments

integral(cos(x)/(1+sin(x)),(x,-pi/6,pi/6),algorithm='sympy')

log(2) + log(3/2)

Karn3003 gravatar imageKarn3003 ( 4 years ago )

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: 9 years ago

Seen: 525 times

Last updated: Oct 17 '15