Create a program to optimize a mathematical function using the optim function.
HardProblem Statement
Create a program to optimize a mathematical function using the optim function.
Sample Input
Function: f(x) = (x[1] - 3)^2 + (x[2] - 4)^2
Sample Output
Optimized Result: x = 3 , y = 4
Limits
Time: 2s · Memory: 256 MB