Text this: A study for analysing predator–prey ecological system using Legendre polynomial