Ask Your Question

# Observation regarding integration with different algorithms

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

e^x*sin(x)


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 close merge delete

## 1 Answer

Sort by » oldest newest most voted

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()
e^x*sin(x)

more

## Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

## Stats

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

Seen: 137 times

Last updated: Mar 11 '16