There are a lot of errors in the notebook.WL is case sensitive so sqrt, tanh, for and many other names need to be capitalized. Functions are defined and called with square brackets Sqrt[arg] not Sqrt(arg), f2[x1_, x2_, x3_, x4_] not f2(x1_, x2_, x3_, x4_)...
Rather than using a single cell, put each expression in its own cell, remove the trailing ; and make sure it has no syntax errors and evaluates correctly.