The question asks to evaluate the following :-

$\displaystyle \frac{e^x}{D^3 - D^2 - D +1}$

Its an example.

Book has done it directly by telling that at {(D-1)}^2 this can't be solved as F(b) = 0 and thus we will apply the following rule :-

$\displaystyle \frac{ae^{bx}x^r}{\phi{(b)} r!}$

And thus the answer comes out to be :-

$\displaystyle \frac {x^2e^x}{4}$

The difficulty is that our calculus teacher told us that you will first do the following step to that factor for which F(b) <> 0 .

$\displaystyle y = e^{-bx}\int{e^{bx}f(x)dx}$

and then apply the above stated rule for that factor for which F(b) = 0.

This was working all right till this question. If I solve it by what we are told by our teacher then the answer comes out to be

$\displaystyle \frac {x^2e^x}{8}$

Any comments? What should be the procedure for solving such questions ?