Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please use Python to solve the question. 5. In this question, we represent a polynomial (of degree n) ao +212 + a2x2 + ... +anxa
Please use Python to solve the question.
5. In this question, we represent a polynomial (of degree n) ao +212 + a2x2 + ... +anxa as a list of its coefficients pol=[ao, 21, 22, ..., an]. For instance, 6 5x + x3 is represented as [6, -5,0, 1] (a)[1] Write a function differentiate--polynomial (pol) which computes the derivative of pol and represents it again as a list of coefficients. (b)[1] Write a function integrate--polynomial (pol) which computes the antiderivative of pol and represents it again as a list of coefficients (you can assume that the integration constant is zero). You are not allowed to use any modules/packages for this question; instead, write your own code. print(differentiate_polynomial([1,2,4,3,15,6])) # should print [2, 8, 9, 60, 30] print(integrate_polynomial([12, 10,9,36,5])) # should print [0, 12.0, 5.0, 3.0, 9.0, 1.0) print(differentiate_polynomial(integrate_polynomial([1, 142,54,67,8]))) # should return ... thinkStep 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