public async Task <IActionResult> CalculateFunctionExampleData([FromBody] double[] xlist) { var domain = new Queue <double>(xlist); _service.CreateDomain(domain); var result = await _service.CalculateAsync((px) => { double denominator = Math.Pow(px, 4) + (3 * Math.Pow(px, 2)) - 4; double numerator = (16 - Math.Pow(px, 2)); double solution = denominator / numerator; return(new Point <double>(px, solution)); }); return(Json(result)); }