3D Dynamic Programming Approach to Functional Equations with Applications. (21st September 2020)