Project 3
Compute the first ten Legendre polynomials at a given point x, and create a table of their zeroes.
This program computes the Legendre polynomials up to a user-specified order at a user-specified point, returning this information in the file "output." It then computes the zeroes, albeit somewhat inefficiently, and stores that information in the file "output2."
Here is the table of zeroes for the Legendre polynomials of order up to 10:
Order 1:
0
Order 2:
-0.57735, 0.57735,
Order 3:
-0.774597, 0, 0.774597,
Order 4:
-0.861136, -0.339981, 0.339981, 0.861136,
Order 5:
-0.90618, -0.538469, 0, 0.538469, 0.90618,
Order 6:
-0.932469, -0.66121, -0.23862, 0.23862, 0.66121, 0.932469,
Order 7:
-0.949108, -0.741531, -0.405845, 0, 0.405845, 0.741531, 0.949108,
Order 8:
-0.96029, -0.796666, -0.525533, -0.183435, 0.183434, 0.525532, 0.796666, 0.96029,
Order 9:
-0.96816, -0.836031, -0.613371, -0.324253, 0, 0.324254, 0.613372, 0.836031, 0.96816,
Order 10:
-0.973907, -0.865064, -0.67941, -0.433395, -0.148875, 0.148874, 0.433396, 0.679409, 0.865064, 0.973907.