Thanks Mr Fantastic.
Looking at the MIT notes I do not quite follow between steps 3 to 5 and how the new variable is used and what it represents. Then I get back on track with the separable equation (though we've seemingly divided by a_m for step 6 when it was within a function? or am I reading that wrong). Then steps 17 and 19 throw throw me out of kilter again. What is going on for these areas?