I was solving a problem of approximation by Least Square Method,it asks the least squares approximation of first degree to the function $f(x) = \sin(x)$ over the interval $[-\pi/2 , \pi/2]$,
I got answers varying from textbook answer ,
$I_{0} = \int_{-\pi/2}^{\pi/2}({\sin(x) - (a_{0}+a_{1}x)})^{2} dx$
and then did $\frac{\partial}{\partial a_{0}}(I_{0}) $ which results $a_{0}=0$
next
$\frac{\partial}{\partial a_{1}}(I_{0}) $ which results to $a_{1} = \frac{24}{\pi^{3}}$,
Are these values of $a_{0}$ and $a_{1}$ are correct?
Book says - $a_{0} = 0 $ an $a_{1} = \frac{24}{\pi^2}$, i am trying to figure out the mistake several times but i can't.
Any help is great ?