Thank you for your answer
1- The specifications given by the command version(): User Interface: 935137, Kernel: 922027, Library: 935137
2- I have loaded the package "Physics" for the rest of my code which is not included in the program yet.
3- Fortunately, your program gives the answer in my machine too as expected using 1D input, but my code does not work with 2D math input. It is so weird as you mentioned. I usually use 2D math input because it can be visualized and debugged better and is more clear for me to read. I re-upload the file again in 2D math input. Please do not execute the program to see the type of error which appears.