add solving the function u(theta)