I was reading this page (http://www.jirka.org/diffyqs/htmlver/diffyqsse25.html) example 4.1.4, which says:
Again $A$ cannot be zero if $\lambda$ is to be an eigenvalue, and $sin(\sqrt {\lambda} \pi)$ is only zero if $\sqrt {\lambda}=k$ for a positive integer $k$. Hence the positive eigenvalues are again $k^2$ for all integers $k ≥ 1$. And the corresponding eigenfunctions can be taken as $x=cos(kt)$.
My question is how is the corresponding eigenfunction determined?
Recall that the general solution is $x(t)=A \cos{\sqrt{\lambda} t} + B \sin{\sqrt{\lambda} t}$. The condition $x'(0)=0$ meant that $B=0$. The condition $x'(\pi)=0$ means that $\lambda=k^2$ for any integer $k$. The corresponding eigenfunction is then the result of plugging in the corresponding eigenvalue: $x_k(t) = \cos{k t}$. Note we ignore the constant $A$ here for now; the coefficient of an eigenfunction will be determined elsewhere.