Let f(x) be a polynomial satisfying $\lim_{x \to\infty} \frac{x^4f(x)}{x^8+1}=3,$ $f(2)=5 $ and $f(3)=10$, $f(-1)=2$ and $f(-6)=37$ Let f(x) be a  polynomial satisfying $\lim_{x \to\infty} \frac{x^4f(x)}{x^8+1}=3,$ $f(2)=5 $ and $f(3)=10$, $f(-1)=2$ and $f(-6)=37$ .
And then there are some question related to this.
In the solution it is given that according to the given information, $f(x)$ is a polynomial of degree 4 with leading coefficient 3.
$f(x)=3(x-2)(x-3)(x+1)(x+6)+(x^2+1)$
Now what i think is that he got the coefficient 3 using the limits and the rest of the terms$[(x-2)(x-3)(x+1)(x+6)]$ from the respective $f(x)$ values from what was given and also the $(x^2+1)$ was added for the remainders, as they satisfy all the values that have been given to us in the question. I just wanted to know if my approach is right? or is there another elegant way to do it?.

Another possibility is to use Lagrange polynomials, and express $f(x)$ as a function that has the given four values in the given points plus a term that produces the given leading term coefficient, but vanishes in all four points:
\begin{align}
f(x)=\ 
&y_1\frac{(x-x_2)(x-x_3)(x-x_4)}{(x_1-x_2)(x_1-x_3)(x_1-x_4)}+\\
&y_2\frac{(x-x_1)(x-x_3)(x-x_4)}{(x_2-x_1)(x_2-x_3)(x_2-x_4)}+\\
&y_3\frac{(x-x_1)(x-x_2)(x-x_4)}{(x_3-x_1)(x_3-x_2)(x_3-x_4)}+\\
&y_4\frac{(x-x_1)(x-x_2)(x-x_3)}{(x_4-x_1)(x_4-x_2)(x_4-x_3)}+\\
&a(x-x_1)(x-x_2)(x-x_3)(x-x_4)\\
=\ 
&-\frac{5}{24}(x-3)(x+1)(x+6)+\\
&+\frac{5}{18}(x-2)(x+1)(x+6)+\\
&+\frac{1}{30}(x-2)(x-3)(x+6)+\\
&-\frac{37}{360}(x-2)(x-3)(x+1)+\\
&3(x-2)(x-3)(x+1)(x+6)
\end{align}
