Given : $$u(x)=x+2 \int_0^x e^{x-t}u(t)dt$$
Solve the Volterra Equation numerically using Trapezoidal Rule in $(0,5)$ choosing $n=8$ and compare with the exact values.
The Exact Solution I have found is : $$u(x)=x+\dfrac{2}{9}e^{3x}[1-e^{-3x}(3x+1)]$$
Numerically solving I have got :

Both look disastrous. So can anyone show me where it is wrong or if possible provide solution.
The equation includes an exponential which produces very important variation of $u(x)$. So, is not surprising to observe "disastrous" results (as you say) if the number $n$ of intervals is too low.
Probably, the very small number $n=8$ was chosen in order to have only a few numbers to compare , respectively those given in the book and those computed by the student.
May be, one aim of the exercice is to make aware of the importance of the deviations due to a too low number of intervals.
The table below shows how the accuracy of the results becomes better, just by increassing $n$. That way, one can obtain results closed to the theoretical values.