<s>[INST] Solve the differential equation using Taylor-series expansion Solve the differential equation using Taylor-series expansion:
$$
\frac{dy}{dx} = x + y + xy \\
y (0) = 1
$$
to get value of $y$ at
$x = 0.1$ and $x = 0.5$. Use terms through $x^5$.
 [/INST] Suppose that $y$ has the Taylor series expansion about $x=0$ given by
$$y=a_0+a_1x+a_2x^2+a_3x^3+a_4x^4+a_5x^5+\cdots.$$
Because $y(0)=1$, we have $a_0=1$.
Differentiate. We get
$$\frac{dy}{dx}=a_1+2a_2x+3a_3x^2+4a_4x^3+5a_5x^4+\cdots.\tag{$1$}$$
Also, 
$$\begin{align}x+y+xy&=x+(1+a_1x+a_2x^2+a_3x^3+a_4x^4+a_5x^5+\cdots)\\&+(x+a_1x^2+a_2x^3+a_3x^4+a_4x^5+\cdots).\end{align}$$
In the expression above, gather like powers of $x$ together. We get
$$x+y+xy=1+(2+a_1)x+(a_1+a_2)x^2+(a_2+a_3)x^3+(a_4+a_5)x^4+\cdots.\tag{$2$}$$
The expansions $(1)$ and $(2)$ must be identical. It follows that they have the same constant term, that is, that $a_1=1$.
The coefficients of $x$ in $(1)$ and $(2)$ must match. It follows that $2a_2=2+a_1=3$, and therefore $a_2=\frac{3}{2}$.
The coefficients of $x^2$ must match. It follows that $3a_3=a_1+a_2=\frac{5}{2}$, and therefore $a_3=\frac{5}{6}$.
Continue, finding $a_4$ and $a_5$. You have not been asked to find coefficients beyond $a_5$.
For the numerical calculations, just substitute the given values of $x$ in the expression $1+a_1x+a_2x^2+a_3x^3+a_4x^4+a_5x^5$, using the values of the $a_i$ that we have found.
</s>