  In this paper, a nonlinear 2D Optimal Control Problem (2DOCP) is considered.
The quadratic performance index of a nonlinear cost function is endowed with
the state and control functions. In this problem, the dynamic constraint of the
system is given by a classical diffusion equation. This article is concerned
with a generalization of Lagrangian functions. Besides, a Generalized
Lagrangian Jacobi-Gauss-Radau (GLJGR)-collocation method is introduced and
applied to solve the aforementioned 2DOCP. Based on initial and boundary
conditions, the time and space variables t and x are considered
Jacobi-Gauss-Radau points clustered on first or end of interval respectively.
Then, to solve the 2DOCP, Lagrange Multipliers are used and the optimal control
problem is reduced to a parameter optimization problem. Numerical results
demonstrate its accuracy, efficiency, and versatility of the presented method.
