I think the following might offer a partial answer to your question:
(%i1) integrate((a-b)^2,a)-expand((a-b)^3/3);
3
b
(%o1) --
3
The difference between the answer you were hoping to get and the answer
Maxima provides is a constant term (constant with respect to the integration
variable a). The indefinite integral is indeterminate up to a constant term,
so both answers are valid.
Viktor
-----Original Message-----
From: maxima-bounces at math.utexas.edu [mailto:maxima-bounces at math.utexas.edu]
On Behalf Of Ian Bell
Sent: Sunday, September 19, 2010 12:51 PM
To: maxima at math.utexas.edu
Subject: Integration of (a-b)^n
Hello all,
I'm a relatively new Maxima user, though I have found the software to be
user friendly enough, and you can't beat the price.
My question relates to definite integration, a tricky subject, and one which
a lot of CAS programs struggle with. So what I want to know is how I get
integrate((a-b)^2,a) to give me the factored solution (a-b)^3/3 . Maxima
(and Mathematica for that matter), expand the product and then group all the
constants together since mathematically they all drop out when you plug in
limits. In this way it makes it impossible to refactor the anti-derivative
back to the form (a-b)^3 . I've got a lot of other integrals that I have a
similar problem with, like (a-b)^n*sin(a) with n an integer. For what its
worth, in MATLAB (w/ MuPaD) int((a-b)^2,a) yields (a-b)^3/3
Any thoughts would be greatly appreciated.
Kind Regards,
Ian
----
Ian Bell
Graduate Research Assistant
Herrick Labs
Purdue University
email: ibell at purdue.edu
cell: (607)227-7626