Neural Network cannot learn nonlinear function
You should try using a sigmoid activation function, as leakyRelu is very close to a linear function, and remove one hidden layer. Just one hidden layer should be engough as you have only one input, with a very small length, maybe 3 or 5 neurons.