Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
The formula you are trying to learn is clearly non linear, therefore you have to use some non linearity activation as @shubam Panchal suggested. Please show the code after this update.