Thank you professor. I think the minimum value of x^2 between -1 and 1 should be x=0, y=0. but the result is not that. I am thinking is any wrong with my thought? Thanks for helping me out! -- View this message in context: http://r.789695.n4.nabble.com/Optimization-problem-tp4663821p4663898.html Sent from the R help mailing list archive at Nabble.com.