# How can I get stronger simplification than FullSimplify?

Short description: Is there a simplification that can for a>1 simplify

(-2 ((-1 + a^2)^2)^(3/2) - a^2 ((-1 + a^2)^2)^(3/2) - (1 + a^2 + a^4)^(3/2) +
a^2 (1 + a^2 + a^4)^(3/2))/(((-1 + a^2)^2)^(3/2) (1 + a^2 + a^4)^(3/2))


to the much shorter (-1 + a^2)^(-2) - ((2 + a^2))/(1 + a^2 + a^4)^(3/2) ? FullSimplify fails here... NB: the solutions proposed below by @Alexei also fail, at least with Engine 13.3.0.

Long description: For some problem (force of a triangle of charges in electrostatics) I used:

(* Wolfram Language 13.3.0 Engine for Microsoft Windows (64-bit) *)

G = (a^2*Cos[t] - 1) / (a^4 - 2*a^2*Cos[t] + 1)^(3/2);
Sa = Sum[G /. t->2n Pi/3, {n, 1, N}, Assumptions -> {a > 1, N == 3}]
(* (-2 ((-1 + a^2)^2)^(3/2) - a^2 ((-1 + a^2)^2)^(3/2) - (1 + a^2 + a^4)^(3/2) +
a^2 (1 + a^2 + a^4)^(3/2))/(((-1 + a^2)^2)^(3/2) (1 + a^2 + a^4)^(3/2)) *)


Probably this could have been done differently to get a simpler expression immediately, but anyhow I know that the result can be simplified to:

Sb = (-1 + a^2)^(-2) - ((2 + a^2))/(1 + a^2 + a^4)^(3/2)


The use of FullSimplify on my obtained result does not see this simplification. The same FullSimplify, however, is capable of seeing that $$S_a$$ and $$S_b$$ are equal:

FullSimplify[Sa, a > 1]
(* Gives: (-2 - a^6 + Sqrt[1 + a^2 + a^4] + a^4*Sqrt[1 + a^2 + a^4] + a^2*(3 + Sqrt[1 + a^2 + a^4]))/ ((-1 + a^2)^2*(1 + a^2 + a^4)^(3/2)) *)

FullSimplify[Sa - Sb, a > 1]
(* 0 *)


Is there a stronger simplification, perhaps some options to FullSimplify, that could have found $$S_b$$ when given $$S_a$$? The only variable is $$a$$ and making this real and greater than 1 already fully restricts the physical domain to what is needed...

• Welcome to Mathematica StackExchange, and sorry for the missed line in my edit! Feb 23 at 13:55
• We made quick progress, thanks! Feb 23 at 13:56
• Be careful using N as a variable; N has a built-in meaning, which is to transform exact numerical expressions into approximate ones. It is best practice to not start any variable with a capital letter, as Mathematica always starts built-ins with a capital. Feb 23 at 18:16

## 1 Answer

1. First, let me note that one mainly applies the function FullSimplify if one deals with special functions. In application to algebraic expressions containing no such functions, FullSimplify normally works longer than Simplify.

2. Here is your expression:

G = (a^2*Cos[t] - 1)/(a^4 - 2*a^2*Cos[t] + 1)^(3/2);
Sa = Sum[G /. t -> 2 n Pi/3, {n, 1, 3}]

(*  (-1 + a^2)/(1 - 2 a^2 + a^4)^(3/2) + (
2 (-1 - a^2/2))/(1 + a^2 + a^4)^(3/2) *)


You need no assumptions within the Sum.

The answer to your question depends on what form you wish to get as the result. Let us have a look at some possibilities:

a)

Simplify[Sa, a > 1]


yielding this:

b)

Simplify[Sa, a > 1] // Together


C)

Simplify[Sa, a > 1] // Expand


d)

 Simplify[Sa, a > 1] // ExpandNumerator


e)

Simplify[Sa, a > 1] // ExpandDenominator


You may also apply further slightly more complex transformations to change the expression to the one most convenient for your further tasks.

Have fun!

Later edit

Let us make things clear. Your explanations do not make it more understandable; what is wrong with my answer to your question?

However, let us note that your initial expression contains a syntactic error. Indeed, you write:

G = (a^2*Cos[t] - 1) / (a^4 - 2*a^2*Cos[t] + 1)^(3/2);
Sa = Sum[G /. t->2n Pi/3, {n, 1, N}, Assumptions -> {a > 1, N == 3}]


This is wrong since N is a service word in Wolfram language, and it is reserved. This letter should not be used for variables.

To stay within the syntax, you might replace it with, say, N1. However, even the latter is not necessary since, from the very beginning, you can replace N1 by 3 directly in your expression. Besides the Assumption->a>0 inside the Sum makes nothing. One can remove it.

Now, let us see:

(*Yor approach: *)  Sa1 = Sum[G /. t -> 2 n Pi/3, {n, 1, N1},
Assumptions -> {a > 1, N1 == 3}];

(*My proposal:*)  Sa2 = Sum[G /. t -> 2 n Pi/3, {n, 1, 3}];

Simplify[Sa1 - Sa2, a > 0]

(*  0  *)


That is, these two expressions are equal to one another.

• Thanks, excellent ideas to play with! And the reason for the somwhat peculiar 'Assumptions' were that I wanted to do it for a few different values of N, and then encountered the problem as soon as N was 3 in: Sum[G /. t -> 2 n Pi/N, {n, N}, Assumptions->{a>1,N==3}] Feb 23 at 15:39
• OK, I've played with it but none of it works! I've edited in a few lines to show why it doesn't. Feb 23 at 22:31
• @Jos Bergervoet I did not understand what did you add to your post to show what does not work. However, let me repeat: The answer to your question depends on what form you wish to get as the result. In other words, what are you going to make with this result further? You did not answer this question. Without it, we cannot take any further steps. Feb 24 at 21:48
• For more clarity I added a short description at the beginning now! Admittedly the longer story was not strictly needed... Anyhow, your solutions simply do not simplify the long expression I start with. Feb 25 at 8:55
• Thanks @Alexei for looking at it again! You point out correctly that I could have avoided the long expression (e.g. by replacing N with 3 directly), but that was not the question. It was if, for whatever reason, we would have this long expression, how would we then use Mathematica to shorten it?! I now learned from @Domen that FullSimplify with TransformationFunctions -> {ApartSquareFree, Automatic} will do that. (And your proposed transformations can of course further taylor it!) Feb 26 at 22:07