So here's the problem I'm having trouble with...
The initial value problem:
$$ x'(t) = \cos(x+t^2) $$ with $x(-5) = -1$ on the interval $[-5, 3]$.
I have no idea how to star this problem off and need some advice.
I'm looking at a practice example and this is how they did it.
$$ x'(t) = (x+t)^2 $$ and the second derivative is $$ x''(t) = 2(x+t) (x'(t) + 1) $$
I don't understand why they put x'(t) into the second derivative...
We can write
\begin{align*} x(t+h) &= x(t) + hx^{\prime}(t) + \frac{h^{2}}{2}x^{\prime\prime}(t) + \mathcal{O}(h^{3})\\ & = x(t) + h\cos(x+t^{2}) + \frac{h^{2}}{2}x^{\prime\prime}(t) + \mathcal{O}(h^{3}) \end{align*}
Since \begin{align*} x^{\prime\prime} &= [x^{\prime}]^{\prime}\\ &= [\cos(x+t^{2})]^{\prime}\\ &= -2t\sin(x+t^{2})-\sin(x+t^{2})x^{\prime}\\ &= -2t\sin(x+t^{2}) - \sin(x+t^{2})\cos(x+t^{2})\end{align*}
We get that
$$x(t+h) = x(t) + h\cos(x+t^{2}) + \frac{h^{2}}{2}\left(-2t\sin(x+t^{2}) - \sin(x+t^{2})\cos(x+t^{2})\right) + \mathcal{O}(h^{3})$$