How do I turn this mathematical solution into code?
https://i.stack.imgur.com/uDp2W.png
I know that I should start with the function below but what would be ne