The only way to perfectly solve procedural normals in my experience is mathematically.
Here’s a thread where I showed the formula for finding the normal of a sine wave and an example material that uses it. Similar steps can be taken with any curve function, although it’ll probably take some light calculus and trigonometry to do with custom functions.