Good god, what a terrible newbie mistake - I figured by doing 
quadgk(...)[1] I had brought the result down to a scalar, but I have to do 
quadgk(...)[1][1] instead! 
Glad I at least accidentally discovered a 'bug' in the optimize routine, so 
I didn't just waste everyone's time with this...

Reply via email to