Added test cases for non-linear and rational functions

Also added test cases for Issue 4129.
Currently the test cases fail as it has not been fixed yet