Is there some smart way of finding the fourth derivative of
$\displaystyle $f(t)=(q+pe^t)^n$$,
perhaps expanding using the binomial theorem?
Perhaps you would consider the following smart
Let $\displaystyle x = q + pe^t \Rightarrow x' = pe^t = x-q= x'' = x'''=x''''$
$\displaystyle f = x^n$
$\displaystyle f' = n x^{n-1} x' =u x'$
$\displaystyle f''= (u+u')x'$
$\displaystyle f''' = (u+2u'+u'')x'$
$\displaystyle f'''' = (u+3u' + 3u'' + u''')x' = ( n x^{n-1} + 3 n (n-1) x^{n-2} + 3 n (n-1) (n-2) x^{n-3} +n(n-1)(n-2) (n-3) x^{n-4} ) (x-q)$
$\displaystyle =nx^{n-4} (x^3 + 3(n-1) x^2 + 3 (n-1) (n-2) x + (n-1)(n-2)(n-3) )(x-q) $