I took some time to work out your rather "nasty" Calculus question.

Take a look at it and see if it matches your expected result.

http://www.jiskha.com/display.cgi?id=1300878253