remove dormant functions.
linear longwave speed.
critical bound branch selection.

for higher values of d0 this gives complex u in the upper branch.
not sure what this means. lower branch remains real.
functional right bound calculation
document
return right bound only when criterion valid