Skip to content
DeepForgeby svx
All problems
MediumCalculusca-308

Taylor Coefficients from Derivatives

Problem

If f has derivatives d_k = f^(k)(0) at zero, its Maclaurin series is sum_k (d_k / k!) x^k.

Given the list of derivatives in order k = 0, 1, 2, ..., return the corresponding Taylor coefficients.

Hint

Divide the k-th derivative by k factorial.

Test cases

case 1
in: [[1,1,1,1]]
expected: [1,1,0.5,0.16666666666666666]
case 2
in: [[0,2,0,6]]
expected: [0,2,0,1]
case 3
in: [[1,0,-1]]
expected: [1,0,-0.5]
Starter codePython
def taylor_coefficients_from_derivatives(derivatives):
    # Your code here
    pass

3 test cases · run your code against them in the editor