Ask Your Question

Observation regarding integration with different algorithms

asked 2016-03-11 12:13:50 +0200

saad gravatar image

I was going through some basic tutorials and noticed this interesting behavior.

integrate(exp(x)*sin(x) + exp(x)*cos(x), x)

with algorithm='maxima' gives

1/2*(cos(x) + sin(x))*e^x - 1/2*(cos(x) - sin(x))*e^x

rather than the simplified


given by algorithm='sympy'. It is the same when I use maxima or sympy by itself. Why is that? Why is maxima not simplifying the expression?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-03-11 22:43:35 +0200

tmonteil gravatar image

updated 2016-03-11 22:49:24 +0200

The simplification is not automatic, you can ask explicitely for it with the .full_simplify() method:

sage: e = integrate(exp(x)*sin(x) + exp(x)*cos(x), x)
sage: e
1/2*(cos(x) + sin(x))*e^x - 1/2*(cos(x) - sin(x))*e^x
sage: e.full_simplify()
edit flag offensive delete link more


Thanks! This is what I needed.

saad gravatar imagesaad ( 2016-03-12 08:32:01 +0200 )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: 2016-03-11 12:13:50 +0200

Seen: 313 times

Last updated: Mar 11 '16