Page 1 of 1

6. (20 points) Let f be a real valued continuous function defined on [-a, a] such that ƒ (-a) = ƒ (a) = 0. The n-th mome

Posted: Mon Jun 06, 2022 2:29 pm
by answerhappygod
6 20 Points Let F Be A Real Valued Continuous Function Defined On A A Such That F A F A 0 The N Th Mome 1
6 20 Points Let F Be A Real Valued Continuous Function Defined On A A Such That F A F A 0 The N Th Mome 1 (178.91 KiB) Viewed 28 times
6. (20 points) Let f be a real valued continuous function defined on [-a, a] such that ƒ (-a) = ƒ (a) = 0. The n-th moment of ƒ about 0 is defined as a Jang Mn = (x) dx -a Write a function moment(f,a,n) with output mn, where ƒ is an function object representing a real valued continuous function defined on [-a, a] such that f(-a) = f (a) = 0. Use the quad function to evaluate the integrals. (b) Use the moment function in (a) to write a code which prints the moments of f(x) = sin x defined on [-T, π] for n where 0 ≤ n ≤ 9 in a for loop