Question
page 206 problem 7.49 For each of the following problems, write a complete C program that includes a recursive function. (a) The Legendre polynomials can
page 206 problem 7.49
For each of the following problems, write a complete C program that includes a recursive function. (a) The Legendre polynomials can be calculated by means of the formulas PO = 1, PI = x, P, = [(2n - 1) / n] x P,-l - [(n - 1) / n]P,, where n = 2, 3, 4, . . . and x is any floating-point number between -1 and 1. (Note that the Legendre polynomials are floating-point quantities.) Generate the first n Legendre polynomials. Let the values of n and x be input parameters. (6) Determine the cumulative sum of n floating-point numbers [see Prob. 7.38(a)J. Read a new number into the computer during each call to the recursive function. (c) Evaluate the first n terms in the series specified in Prob. 7.38(6). Enter n as an input parameter. (6) Determine the cumulative product of n floating-point numbers [see Prob. 7.38(c)J. Read a new number into the computer during each call to the recursive function.
the problem is from the Schaum's outline of theory and programming with C.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started