Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Represent a polynomial ()= 0 + 1 ++ d d as a list of numbers [a0,a1,...,ad]. Write a function called poly_integral which takes a list
Represent a polynomial ()=0+1++dd as a list of numbers [a0,a1,...,ad]. Write a function called poly_integral which takes a list p representing a polynomial ()=0+1++dd, and numbers a and b, and returns the value of definite integral
Hi this is a question using Python code, and I'm not sure how to relate the b and a with the rest of the variable. This is my current code:
def poly_integrate(p,a,b): for p in range(a, b): result = sum(p[n]*a**n for n in range(0, len(p))) return result
but I'm getting the error
TypeError: poly_integral() takes 1 positional argument but 3 were given
Any help would be appreciated :)
p(x)dxStep 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