Boundary-value problems for second order partial differential equations arising in risk management and cellular neural networks approach