-3

In Gauss-legendre integration we need to find zeros of the legendre function but i can't find a way to write code that enable me to do that? I understand there are list of "xi"s out there by which this function equals to zero but can we write program that find these "xi"s on it own?

  • HI, this isn't a "write code for me" site; (a) make an attempt to code and (b) ask if you ware stuck on a particular point. Also (c) provide your working so far. Here are a couple of examples in c and c++ from google: http://berenger.eu/blog/c-legendre-polynomial-by-recurrence-programming/ http://cboard.cprogramming.com/c-programming/131370-programme-computing-legendre-polynomials.html – G42 Aug 24 '16 at 11:38
  • thanks for reply i just wanted to see if it is possible or not that is all and the links you posted are about writing legendre functions but i wanted to see that if it is possible for me to write code to find zeros of this functions. – Mohammad Amin Khanpour Aug 24 '16 at 14:18

1 Answers1

0

In general, finding zeroes of an arbitrary function is not a problem that can be solved by an algorithm. Whether your particular function or class of functions can be solved by an algorithm or not must depend intimately upon the specific mathematical properties of your functions, since your algorithm must rely on those properties specifically. Questions on your functions and what properties it might possess is out of scope for programming and probably computer science as well; I suggest math stack exchange. If you can get a mathematician to explain how to solve the problem by hand, at least in theory, then you are at the point where programmers and computer scientists can start to help you.

Patrick87
  • 27,682
  • 3
  • 38
  • 73
  • Thanks for reply. I know how to solve this problem theoretically myself but the real problem is as Gauss-legandere expansion moves forward the polynomials degree increase therefore i think it is not possible to write code for it but i want to see if it is fundamentally possible to write a program to do so or not. Anyway thanks for your time and reply. :D – Mohammad Amin Khanpour Aug 25 '16 at 18:49