Horje
differentate derivative differentation Code Example
differentate derivative differentation
# function wrt to differentate
def cu(x):
    return x*x*x

# differentation function
# Slightly increase x and compute the result. 
# Then compute the ratio of change in result with change in x
def diff(fun, x):
    delta = 0.000000001
    y = fun(x)
    x1 = x+delta
    y1 = fun(x1)
    return (y1-y) / (x1-x)

# X^3 = 3X^2
diff(cu,2)
# >>12.0




Python

Related
change colors markdown pyhton Code Example change colors markdown pyhton Code Example
python sort array custom comparator Code Example python sort array custom comparator Code Example
multiplication table in python Code Example multiplication table in python Code Example
2 d array in python with zeroes Code Example 2 d array in python with zeroes Code Example
python socket set title Code Example python socket set title Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7