For simple circuits, LTspice: https://www.analog.com/en/design-center/design-tools-and-cal...
And it's definitely used by real engineers. It's for making switching power supplies, so it can handle fairly complex circuits. I wouldn't venture into RF/high speed circuits with it though, since the included parasitics aren't sufficient.
And, custom functions are supported, so, I believe, you can put whatever maths in a component (I've never ventured this far): https://ltwiki.org/index.php?title=B_sources_(complete_refer...