"""
Derivatan av f(x)
"""
def f(x: float):
return x**3 - 2*x
def f_prim(x: float, h=1e-10):
return (f(x+h) - f(x))/h
print(f_prim(4))
"""
Derivatan av f(x)
"""
def f(x: float):
return x**3 - 2*x
def f_prim(x: float, h=1e-10):
return (f(x+h) - f(x))/h
print(f_prim(4))