Ask Your Question
1

Observation regarding integration with different algorithms

asked 9 years ago

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

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?

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
0

answered 9 years ago

tmonteil gravatar image

updated 9 years ago

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)
Preview: (hide)
link

Comments

Thanks! This is what I needed.

saad gravatar imagesaad ( 9 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: 384 times

Last updated: Mar 11 '16