# FullSimplify "not working" with a correct Assumption in this example, why ?

**URL:** <https://community.wolfram.com/t/fullsimplify-not-working-with-a-correct-assumption-in-this-example-why/5772>\
**Category:** Questions\
**Tags:** physics, mathematica, algebra, calculus\
**Created:** [May 22, 2015, 12:16pm UTC](https://community.wolfram.com/t/fullsimplify-not-working-with-a-correct-assumption-in-this-example-why/5772 "2015-05-22T12:16:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![matze150](https://avatars.discourse-cdn.com/v4/letter/m/35a633/32.png) [@matze150](https://community.wolfram.com/u/matze150)\
**Post date:** [May 22, 2015, 12:16pm UTC](https://community.wolfram.com/t/fullsimplify-not-working-with-a-correct-assumption-in-this-example-why/5772/1 "2015-05-22T12:16:25Z")

</div>

I tried to simplify the partition-function of a statistical model (the infinite Ising-chain) in Mathematica and discovered something weird. The attached notebook should talk for itself.  
Anyone an idea why additionally assuming “N” to be an Integer (which it definitively is, as it’s the upper boundary in the sum appearing, and physically a particle number) makes FullSimplify fail?

---

<div class="post-metadata">

**Author:** ![jfriedman](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/jfriedman/32/35953_2.png) [@jfriedman](https://community.wolfram.com/u/jfriedman)\
**Post date:** [May 22, 2015, 12:23pm UTC](https://community.wolfram.com/t/fullsimplify-not-working-with-a-correct-assumption-in-this-example-why/5772/2 "2015-05-22T12:23:33Z")

</div>

Please disregard the below. I realized, upon further examination of the problem, that the function N has nothing to do with the behavior displayed. My apologies for the confusion.

* * *

I must confess that many of the mathematical elements of this problem fly over my head, since programming is more my forte, but I suspect your problem may have something to do with the fact the N is a predefined _Mathematica_ function. See the below example, replacing N with d.

```
$Assumptions=d>=1&&d>=n>=0&&x\[Element]Reals&&{n,d}\[Element]Integers;
b-a
b-a//FullSimplify

```

---

<div class="post-metadata">

**Author:** ![matze150](https://avatars.discourse-cdn.com/v4/letter/m/35a633/32.png) [@matze150](https://community.wolfram.com/u/matze150)\
**Post date:** [May 22, 2015, 12:42pm UTC](https://community.wolfram.com/t/fullsimplify-not-working-with-a-correct-assumption-in-this-example-why/5772/3 "2015-05-22T12:42:25Z")

</div>

Same when writing “d” instead of “N” …

But when writing  
Exp[-x]^(d - n)_Exp[x]^n  
instead of  
Exp[(2_n - d)\*x]  
it works (see bug2.nb attached)

Edit:

Writing Exp[-x (d - n)] Exp[x n] , which is also the same (or not ??) as Exp[-x]^(d - n)\*Exp[x]^n does not work too…

any idea why the identities [x^a \* x^b == x^(a+b)] and [(x^a)^b == x^(a\*b)] (which are essentially the same) are not used in FullSimplify when assuming “d” from above to be an Integer ??

Edit2:

Even more interesting is, that " Exp[(2\*n - d)\*x] - Exp[-x]^(d - n)\*Exp[x]^n // FullSimplify " gives 0 (as it should) with both assumptions (see bug3.nb).

---

<div class="post-metadata">

**Author:** ![matze150](https://avatars.discourse-cdn.com/v4/letter/m/35a633/32.png) [@matze150](https://community.wolfram.com/u/matze150)\
**Post date:** [May 22, 2015, 1:58pm UTC](https://community.wolfram.com/t/fullsimplify-not-working-with-a-correct-assumption-in-this-example-why/5772/4 "2015-05-22T13:58:32Z")

</div>

I think this problem goes deeper than I originally thought, so i created a Notebook that should be easy to read and make the problem visible (attached bug.nb)

Here it can be seen that with the 2nd assumptions where “d” is an Integer, the expression

```
f1[n] - f2[n] //FullSimplify

```

is recognized to be 0 (which is true). The expression

```
a - Sum[Binomial[d, n] f1[n] , {n,0,d} ] //FullSimplify

```

**is not** recognized to be 0, but

```
a - Sum[Binomial[d, n] f2[n] , {n,0,d} ] //FullSimplify

```

**is** recognized to be 0.

_Edit_

Definitions:

```
a:= (Exp[x] + Exp[-x])^d
f1[n_] := Exp[(2 n - d) x]
f2[n_] := Exp[-x]^(d - n) Exp[x]^n

```

Assumptions 1 ( //FullSimplify **correctly yields** all zeros ):

```
d >= 1 && d >= n >= 0 && Element[x, Reals] && Element[n, Integers]

```

Assumptions 2 ( //FullSimplify **does not yield** `a - Sum[... f1[n] ...] == 0` ):

```
d >= 1 && d >= n >= 0 && Element[x, Reals] && 
 Element[{n, d}, Integers]

```
