For the period from time 0 to time 2, the force of interest is defined as follows: $$\text{force of interest at }(t) = \begin{cases} 0.05 & 0 \lt t \le 1\\ 0.05+0.02(t-1) & 1\lt t \le 2 \end{cases}$$ $10,\!000$ is invested at time $0$. Find the accumulated value at time $1$ and at time $2$.
I got the correct answer for accumulated value at time $1$ using the accumulation function $$A(t)=A(0)\exp\left(\int_0^T\text{force of interest}\ \mathrm dt\right),$$ by taking the integral of $0.05$ at $1$ and $0$, and then I ended up with $A(t)=10000(e^{0.05-0})$, which gave me $10512.7109$, the correct answer.
However, when I try the same steps but with $T=2$, and the only thing changing is that I take the integral of the second equation and then plug in the same formula, I am getting the wrong answer. The answer in the book is $11162.78$. Any help would be appreciated.
If you are getting the wrong answer it means that you're not integrating correctly. When computing $$\int_0^2\text{force of interest}\ \mathrm dt$$ you have to remember that the force of interest is defined by a piecewise function, and therefore you must split the integral. We get (writing $f(t)$ instead of $\text{force of interest}$): $$\begin{align} \int_0^2 f(t)\,\mathrm dt &= \int_0^1 f(t)\,\mathrm dt + \int_1^2 f(t)\,\mathrm dt =\\ &= \int_0^1 (0.05)\,\mathrm dt + \int_1^2\left(0.05 + 0.02(t - 1)\right)\,\mathrm dt =\\ &= 0.11 \end{align}$$
And indeed, $10000e^{0.11} = 11162.78$.