Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I am trying to simplify the following $(Z_i - Z_{i+1})^4$ using

FullSimplify[(Subscript[Z, i] - Subscript[Z, 1 + i])^4 , 
Assumptions -> {\[CapitalDelta]z > 0, 
Subscript[Z, i] \[Element] Reals, 
Subscript[Z, i - 1] < Subscript[Z, i] < Subscript[Z, i + 1], 
Subscript[Z, i + 1] - Subscript[Z, i ] == \[CapitalDelta]z, 
Subscript[Z, i] - Subscript[Z, i - 1 ] == \[CapitalDelta]z}]

The answer should be $\Delta z^4$ but it just returns the same thing that I put in. Is there something that I am missing?

share|improve this question

1 Answer 1

You can use a custom transformation function:

t[e_] := Collect[e /. Subscript[z, i_] :> Subscript[z, 0] + i dz, dz]
FullSimplify[
 (Subscript[z, i] - Subscript[z, i + 1] + Subscript[z, i + 10] -Subscript[z, i + 2])^4, 
 TransformationFunctions -> {t, Automatic}]

Or define z to have that property:

Clear@z
z[i_] := z[0] + i dz /; i =!= 0
Simplify@(z[i] - z[i + 1] + z[i + 10] - z[i + 2])^4

A bit cleaner:

Clear@z
z[i_] := z0 + i dz 
share|improve this answer
    
+1 z[i_] := z0 + i dz is soooo beautiful –  belisarius Feb 26 '13 at 4:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.