# Science:Math Exam Resources/Courses/MATH101/April 2017/Question 04 (b)/Solution 1

Using the information given above all we need to find is ${\displaystyle K}$ and replace the values of ${\displaystyle a=0,\,b=\pi ,\,n=6}$ in the formula for the error ${\displaystyle {\frac {K(b-a)^{3}}{24n^{2}}}}$, as the difference between the 2 numbers will, at most, be the error.

Thus we must first find the 2nd derivative of ${\displaystyle f(x)=x\sin x}$:

${\displaystyle f^{\prime }(x)=\sin x+x\cos x}$

${\displaystyle f^{\prime \prime }(x)=\cos x+\cos x-x\sin x}$.

We must now bound the derivative. Using the inequatility ${\displaystyle |x+y|\leq |x|+|y|}$, we have:

${\displaystyle |2\cos x-x\sin x|\leq 2|\cos x|+|x||\sin x|}$. Furthermore we know that ${\displaystyle |\cos x|\leq 1}$, ${\displaystyle |\sin x|\leq 1}$ and, in our domain, ${\displaystyle |x|\leq \pi }$, which makes us conclude that ${\displaystyle |f^{\prime \prime }(x)|\leq \pi +2}$ on ${\displaystyle [0,\pi ]}$. (Note that this does not necessarily mean the maximum of ${\displaystyle |f''(x)|}$ is ${\displaystyle \pi +2}$. The value ${\displaystyle \pi +2}$ is only an upper bound; other bounds are possible.)

Thus the difference is given by ${\displaystyle {\frac {(\pi +2)(\pi -0)^{3}}{24(6)^{2}}}}$

Answer: ${\displaystyle \color {blue}{\frac {(\pi +2)\pi ^{3}}{24(6)^{2}}}}$ (note that this is only one possible answer; see the note above)