Can someone point me in a direction to solve this kind of integral constrained system of ODEs.
\begin{align} &\int_0^{1/2}\dot{y}^2(t)=p\\ &2\lambda_1\ddot{y}(t)+\pi cos(\pi y(t))=0\\ &y(0)=0,y(1/2)=1/2 \end{align}
I have reduced it to 1st order: \begin{align} &\int_0^{1/2}x^2(t)=p\\ &\dot{y}=x \\ &2\lambda_1\dot{x}(t)+\pi cos(\pi y(t))=0\\ &y(0)=0,y(1/2)=1/2 \end{align}
but its still not suitable for an ODE solver. Any help will be appreciated.
Edit:$p$ is a known constant and $\lambda_1$ is an unknown constant.
Disclaimer: This is a cross-post and has some good answers here on MathSE.