# Science:Math Exam Resources/Courses/MATH103/April 2017/Question 08 (a)/Solution 2

We know that the coefficients of the Taylor series are given by ${\displaystyle a_{n}={\frac {y^{(n)}(0)}{n!}}}$ and that the initial condition is

${\displaystyle y(0)={\color {MediumVioletRed}4}.}$

Since ${\displaystyle y}$ solves the differential equation ${\displaystyle y'+2y=x^{2}}$, or equivalently, ${\displaystyle y'=x^{2}-2y}$, we must have

${\displaystyle y'(0)=0^{2}-2y(0)=0-2\cdot {\color {MediumVioletRed}4}={\color {Chocolate}-8}.}$

By differentiating the equation for ${\displaystyle y'}$ (with respect to ${\displaystyle x}$), we obtain ${\displaystyle y''=2x-2y'}$, which implies that

${\displaystyle y''(0)=2\cdot 0-2y'(0)=0-2\cdot {\color {Chocolate}-8}={\color {DarkGreen}16}.}$

Differentiating the equation once more, we obtain ${\displaystyle y'''=2-2y''}$, so

${\displaystyle y'''(0)=2-2y''(0)=2-2\cdot {\color {DarkGreen}16}=-30.}$

We conclude that ${\displaystyle a_{0}={\frac {y(0)}{0!}}=\color {blue}4}$, ${\displaystyle a_{1}={\frac {y'(0)}{1!}}=\color {blue}-8}$, ${\displaystyle a_{2}={\frac {y''(0)}{2!}}=\color {blue}8}$, and ${\displaystyle a_{3}={\frac {y'''(0)}{3!}}=\color {blue}-5}$.