Hi everyone

I have a mathematical question .I have an special dynamic constraint that makes my optimization problem a little different.I solved this problem by three methods, but I am not sure which method is correct.Thank you for your help.I attach my question

solving.pdf (505.1 KB)

The first approach does not make sense as S_t seems to be determined at time t. You do not optimize with respect to something that happened in the past.

The second approach looks OK (except for the missing expectations). I donâ€™t know what you did for the last approach. Did you redefine the multiplier? That should also be valid and should return identical results.