After much searching I have found the reason for the bug in my calculation. But I have no idea how to solve it!
I am making a symbolic calculation that I will at a future stage graph for various values. In the calculation the expression \sqrt{(a-b)^2} shows up. Mathematica interprets this as the Abs[a-b] - fine, I get where that is coming from. However I need it to interpret this as (a-b).
I have tried /. to replace all occurrences and that works. However I need it to be possible to delay all calculations in this notebook. I'm planning on making the calculation more complicated and this will make it impossible to compute some of the pieces symbolically. So I need to be able to delay all parts of the calculation until I input the numbers at the end. But still to either replace \sqrt{(a-b)^2} with (a-b) or to fix this part of the calculation in some other way.
I've attached the relevant notebook in case you need to look at it.
Attachments: