I asked this same question in Mathematics, and it was suggested I might try here. I'm more comfortable with Maple, but if I can get Mathematica to do what I'm after, so much the better.
Basically I'm trying to symbolically integrate something like this:
$\displaystyle\int \frac{a\mu-b}{||a\mu-b||^3} \mathrm{d}\mu$
where $a,b$ are vectors and $\mu$ is a scalar. The denominator is the cube of the 2-norm of the vector, and can be found by taking the dot product of a vector with itself, and raising it to the power of $\frac{3}{2}$.
Right now in Maple I'm explicitly multiplying out the denominator and making substitutions so that the denominator, at least, is only in terms of scalars ($a \cdot a = C$, etc. ), but I hate doing it this way, because it adds a lot of bookkeeping. Basically I'd like the computer to understand that $a * (b \cdot a)$ is not the same thing as $b * a^2$, but that $a \cdot b * c \cdot d = c \cdot d * a \cdot b$.
What's the most kosher way to do this integration in Mathematica?
UPDATE
This is the full integral I'm trying to do. I'm not sure it even has an answer, but the first integral is similar to what I have above. So I was hoping I could take any techniques that work on the simpler one above and apply them to the full problem below.
Let: $\vec{f} = (a - c) \mu_1 + (b - c) \upsilon_1 - (x - z) \mu_2 - (y-z) \upsilon_2 - (z - c) $
where $a, b, c, x, y, z$ are vectors representing positions, and $\mu_1, \nu_1, \mu_2, \nu_2$ are scalars.
I want to find:
$\vec{F_G} = \displaystyle\int_0^1 \int_0^{1-v_2} \int_0^{1} \int_0^{1-v_1} \! \frac{f}{||{f}||^3} \, \mathrm{d} \mu_1 \mathrm{d} \upsilon_1 \mathrm{d} \mu_2 \mathrm{d} \upsilon_2 $