|   | 1 |  initial version  | 
Yeah, this sort of thing is tricky because there may not be a closed form solution.  See this question and this question on this site for just two examples.  I suppose that some variant of this answer using numerical_integral might work.
 Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.
 
                
                Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.