Solve the following mathematical program by using dynamic programming.
Max z = (x₁ - 1)² + (x₂ - 2)³+√(x3 + 1)
St, x₁ + x₂ + x3 = 4
X₂ ≤ 3
X1, X2, X3 E {0} UZ+