I am trying to work through an example from Jordan and Smiths book Nonlinear Ordinary Differential Equations. It's example $6.1$ on page $195$. The question reads:
Obtain an approximate solution of the family of equations $x^{\prime\prime} + x = ex^3$ with $x(e, 0) = 1$, $x^{\prime}(e,0) = 0$ and error $O(e^3)$ uniformly on $t \geq 0$, by the method of coordinate pertubation.
This what I have so far: $x_0^{\prime\prime} + x_0 = 0$ so we get $x_0 = A_0\cos t + B_0\sin t$.
From the conditions given: $x_0(0) = 1$ and $x^{\prime}_0(0) = 0$, so we have $x_0 = \cos t$.
The second equation is $x^{\prime\prime}_1 + x_1 = x_0^3$ which becomes $x_1 + x_1 = \cos^3 t$, so $x^{\prime\prime}_1 + x_1 = \frac{3}{4}\cos t + \frac{1}{4}\cos 3t$.
Now I assume $x_1 = A\cos t + B\cos 3t$, so $x^{\prime}_1 = -A\sin t - 3B\sin 3t$, and $\ddot{x}_1 = -A\cos t - 9B\cos 3t$.
Therefore $\ddot{x}_1 + x_1 = -8B\cos 3t = \frac{3}{4}\cos t + \frac{1}{4}\cos 3t$, hence $-8B = \frac{1}{4}$, so $B = \frac{-1}{32}$ which gives me $x_1 = A\cos t - \frac{1}{32}\cos 3t$.
Using this and the condition that $x_0(0) = 0$ gives me $A = \frac{1}{32}$. However the solution in the book contains another term: $\frac{3}{8}t\sin t$. I don't know how to get this term. Could someone please help.