How to write tedious algebraic manipulations In some of my papers, some of the results require tedious but straightforward algebraic manipulations. I am not sure what is the best way to present these manipulations:


I can write them at the paper body, then they might disturb the continuous reading of the text and distract the reader from the main results.
I can put them in an appendix, but then they will appear out-of-context and will be difficult to verify by the few readers who will want to.


One solution I thought of is to present them in their place in the paper body, but surround them in a gray box and in a smaller font. Then, most readers will be able to skip them easily, but the few interested readers will be able to read and verify them in context. Is this a good practice?
For this sort of thing, I always fall back on the advice of one of my professors from my PhD coursework.  He said you first write out all the algebra in the paper, then you move it to the appendix because it's too long, then you delete it from the appendix because that's too long, and stick it on your website.  Finally, you delete it from the website because no one looks at it.

Of course this depends entirely on how crucial the computation is to your paper, and it might be good to look at what's done in other papers in your specific field.  But generally speaking, I think you can frequently trust your reader's ability to do tedious algebra if they so desire.

One bit of middle ground that I see a lot is to describe what you do without showing it.  For example, if you present three equations and two of them are to be substituted into the first at some point, you can write something like "We first solve equation 1 for lambda, then substitute in equations 2 and 3 for alpha and beta.  This gives us equation 4..." That way in one simple sentence you've told the reader exactly how to get to the end result without showing anything more messy than your starting equations and ending equation.

May be unrelated to your field, but in economics I was always fond of Alfred Marshall's advice from 1906:


  (1) Use mathematics as a shorthand language, rather than an engine of inquiry. (2) Keep to them till you have done. (3) Translate into English. (4) Then illustrate by examples that are important in real life. (5) Burn the mathematics. (6) If you can't succeed in (4), burn (3). This last I did often.


Not really indicative of modern economics, but I like the principle regardless.