# Inactivate parts of formulas

after having searched through many books and the documentation, I still do not have a clear definition of what the Hold..., Unevaluated, Defer, Inactivate operations do when considering the TreeForm of a Formula.

I would like to start by freezing a long formula and then activate and operate on certain parts of the tree before freezing them again.

What is the general procedure for that?

(e.g. for a nested expression like

    Z=Integrate[u/2x^2,x];
a=3n
G=Sum[n^2 a,{n,0,10}];
F=Exp[Exp[Z + G]]


I would like to operate on G,a separately using only the last expression.)

• It would be nice to see what do you mean by "I would like to operate on G,a separately using only the last expression.)" on examples. – Kuba Aug 23 '18 at 15:34
• I think that you probably should avoid assigning values to variables, instead using rules and ReplaceAll. E.g. Exp[Exp[Z+G]]/.G->Sum[n^2,{n,0,10}] – mikado Aug 23 '18 at 18:30