Question: please follow all the instructions before attempting this question, other wise I will dislike you 1) please write in python. 2) **this is very important***

 "please follow all the instructions before attempting this question, other wise

I will dislike you" 1) please write in python. 2) **this is

"please follow all the instructions before attempting this question, other wise I will dislike you"

1) please write in python.

2) **this is very important*** please attempt all functions** (here 4 functions are given i.e

a) cosine_coeff(n): b) log_coeff(n) : c) mul_coeff(n) : d) diff_coeff(n) :

3) ****this is also very important **** please explain all the steps of your algorithm.

4) do not copy from chegg or any other internet resources.

(you can take more than 2 hours ,i don't mind but algorithm should be correct)

if you left any of the 4 functions, I will dislike you, so please carefully attend the question.

Question 2 Suppose we have two functions cos(x)and In(1+x) represented as Taylor series, cos(x) = 1 - ++... In(1 + x) = x - + ... *****Let f(x) =cos(x) and g(x) =In(1+x)**** Write the following functions in python : 1) Cosine_coeff(n) : returns the coefficient of x^n in the Taylor series of f (x). (Hint: coefficient of x^n is 0 when n is odd number) >>>Cosine_coeff(3) 0.0 2) log_coeff(n) : returns the coefficient of x^n in the Taylor series of g (x) >>>log_coeff(4) -0.25 3) mul_coeff(n): returns the coefficient of x^n in the Taylor series of f (x)*g(x) (Hint--First try this out by hand, then write the code after having figured out the pattern.) >>>mul_coeff(2) -0.5 4) diff_coeff(n): returns the coefficient of x^n in the Taylor series of dif(x) dx (Hint: here you have to differentiate f(x) and then find coefficient of x^n >>>diff_coeff(3) 0.1666666667

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!