# Answer to Question #9060 in MatLAB | Mathematica | MathCAD | Maple for sara

Question #9060

1. The Legendre polynomials Pn(x), n = 0, 1, … are defined recursively as follows

nPn(x) = (2n-1)xPn -1 – (n-1)Pn-2(x), n = 2, 3, … , P0(x) = 1, P1(x) = x

a) Write MATLAB function P = LegendP(n) that takes an integer n (the degree of Pn(x)) and returns its coefficient stored in the descending order of powers.

b) Plot all Legendre polynomials Pn(x), n = 0, 1, …,6 over the interval [-1,1] in one figure.

nPn(x) = (2n-1)xPn -1 – (n-1)Pn-2(x), n = 2, 3, … , P0(x) = 1, P1(x) = x

a) Write MATLAB function P = LegendP(n) that takes an integer n (the degree of Pn(x)) and returns its coefficient stored in the descending order of powers.

b) Plot all Legendre polynomials Pn(x), n = 0, 1, …,6 over the interval [-1,1] in one figure.

Expert's answer

Unfortunately, your question requires a lot of work and cannot be done for free.

Submit it with all requirements as an assignment to our control panel and we'll assist you.

Submit it with all requirements as an assignment to our control panel and we'll assist you.

Need a fast expert's response?

Submit orderand get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

## Comments

## Leave a comment