This question is a continuation of this one. By guesswork, I found out that $\vec{\theta}=(5.2,5.3,1.0)=$ $(A,B,C)$ was a good guess that made my model
$$y_i=A\sin\left(\frac{x_i}{B}\right)+C\epsilon_i,\tag1$$
fit the $(x_i,y_i)$ points pretty well. This should mean that if I compute the log-likelihood function $\ell(\vec{\theta})$ at the particular values of $\vec{\theta}$ that I guessed, I should come close to the maximum value. In my other question I obtained the likelihood function
$$L(A,B,C | x_i,y_i)= \prod_{i=1}^n \phi\left(\frac{y_i - A \sin(x_i/B)}{C}\right).\tag2$$
Since the standard normal density is $\phi(x)=\frac{1}{\sqrt{2\pi}}e^{-x^2/2}$ I have
$$ \begin{align} L(A,B,C | x_i,y_i) &= \frac{1}{(\sqrt{2\pi})^{23}}\prod_{i=1}^{23}\exp{\left(-\frac{1}{2}\left(\frac{y_i-A\sin\left(\frac{x_i}{B}\right)}{C}\right)^2\right)}\tag3\\ &=\frac{1}{(\sqrt{2\pi})^{23}}\exp\left(-\frac{1}{2C^2}\sum_{i=1}^{23}\left(y_i-A\sin\left(\frac{x_i}{B}\right)\right)^2\right)\tag4 \end{align} $$
Taking the logarithm yields the log-likelihood function $\ell$ to be \begin{align} \ell(A,B,C|x_i,y_i)&=\ln\left(\frac{1}{(\sqrt{2\pi})^{23}}\right)+\ln\left(\exp\left(-\frac{1}{2C^2}\sum_{i=1}^{23}\left(y_i-A\sin\left(\frac{x_i}{B}\right)\right)^2\right)\right)\tag5\\ &= \ln\left(\frac{1}{(\sqrt{2\pi})^{23}}\right)-\frac{1}{2C^{2}}\sum_{i=1}^{23}\left(y_i-A\sin\left(\frac{x_i}{B}\right)\right)^2.\tag6 \end{align}
I used R to compute $\ell(\hat{\theta})$ at $\hat{\theta}=(5.2,5.3,1.0)$ and found that the result was $\approx-43.42094$, however, computing the same function at $\hat{\theta}=(12,12,8)$ gave me $\approx -35.60867.$
This should not be since i should get very close to the maximum using the guessed values. This leads me to believe that I've calculated my log-likelihood function incorrectly, or my code is incorrect, or I've just misunderstood the entire assignment.
Can anyone help me finding out which it is?