Given $f(x)=\frac{\sin \pi x}{\pi\sin x}$ and $f'(x_0)=0$,find value of $(f(x_0))^2(1+(\pi^2-1)\sin^2x_0)$ 
Let $$f(x)=\frac{\sin (\pi x)}{\pi\sin x}$$ and let $x_0\in(0,\pi)$ such that $f'(x_0)=0$
  Then find the value of
  $$(f(x_0))^2(1+(\pi^2-1)\sin^2x_0)$$

My attempt:
$$f'(x_0)=\lim_{x \to x_0}\frac{f(x)-f(x_0)}{x-x_0}$$
$$=\lim_{x\to x_0}\frac{\frac{\sin (\pi x)}{\pi \sin x}-\frac{\sin (\pi x_0)}{\pi \sin x_0}}{x-x_0}$$
$$\lim_{x \to x_0}\frac{\sin(\pi x)\sin x_0-\sin (\pi x_0)\sin x}{\pi \sin x\sin x_0(x-x_0)}$$
Applying L'Hopital's rule and then subsituting the value of limit,I got
$$\frac{\pi\cos (\pi x_0)\sin x_0-\cos x_0\sin(\pi x_0)}{\pi\sin^2 x_0}=0$$
How will I make into the form asked in the question?
 A: Hint: try differentiating the function and equate the derivative to zero. From there it is easy to get to the form asked.
A: $$f(x)=\frac{\sin \pi x}{\pi\sin x}$$
$$\pi\sin x  f(x)=\sin \pi  x $$
$$\pi f(x) \cos x +\pi \sin xf'(x) = \pi \cos \pi x$$
$$\pi f(x_0) \cos x_0 +\pi \sin x_0f'(x_0) = \pi \cos \pi x_0$$
$$\pi f(x_0) \cos x_0  = \pi \cos \pi x_0$$
$$ f(x_0)  = \frac{ \cos \pi x_0}{\cos x_0 }$$
Can you take it from here? 
A: If you can use L'Hopital's rule, I don't see why you didn't just differentiate the function directly
$$ f'(x) = \frac{\pi^2 \cos (\pi x)\sin x - \pi \cos x \sin (\pi x)}{\pi^2 \sin^2 x}$$
which is zero if
$$ \pi \sin x_0 \cos (\pi x_0) = \cos x_0 \sin (\pi x_0) $$
Thus 
$$ f(x_0) = \frac{\sin (\pi x_0)}{\pi \sin x_0} = \frac{\cos (\pi x_0)}{\cos x_0} $$
Then
$$ \begin{align} 
f^2 (x_0) (1 + (\pi^2 -1)\sin^2 x_0) &= f^2(x_0) (\cos^2 x_0 + \pi^2 \sin^2 x_0) \\ 
&= \big(f(x_0)\cos x_0\big)^2 + \big( f(x_0)\pi \sin x_0 \big)^2 \\
&= \cos^2 (\pi x_0) + \sin^2 (\pi x_0) \\
&= 1 
\end{align}
$$
