]Both the Army and the Navy trained their staff in such sciences as were deemed valuable in their trade. Naval training was on average about thirteen years (starting when a boy was thirteen or so).
Not exactly.
In the Navy one received training in seamanship and the mathematics required for navigation, but that was it. There were real counterparts to the fictional Hornblower and Aubery who took intellectual pleasure in mathematics, but the Navy was otherwise a narrow and specialized profession.
The only Army officers who received any kind of intellectual training in this era were the engineers and gunners who went to Woolwich. Infantry and cavalry officers were simply young men of good families who had bought their commissions. They were expected to be brave, not bright, and the only training they received was what they picked up on the job from their brother officers. Wellington's correspondence is full of his complaints about the stupidity both of junior officers and of many of the generals assigned to his command.