Finding Derivatives in Python
Author: David Manuel
In this video, it is demonstrated how to find derivatives in Python. The presenter solves an example the rate of change of force as a box is dragged along the ground by a rope attached to a pulley.
Transcript 08
Transcript 08
Exercises
Python Code:
from sympy import *
mu,m,g,x,h=symbols('mu m g x h')
F=mu*m*g*sqrt(x**2+h**2)/(x+mu*h)
dF=F.diff(x)print('The general derivative is',dF)
dFat10=F.subs({m:18,h:10,mu:0.55,g:9.8,x:10})
print('When x=10, the rate of change in t is',dFat10.evalf() ,'Newtons/meter')
dFat40=F.subs({m:18,h:10,mu:0.55,g:9.8,x:40})
print('When x=40, the rate of change in t is', dFat40.evalf(), 'Newtons/meter')
Open Python Notebook File
from sympy import *
mu,m,g,x,h=symbols('mu m g x h')
F=mu*m*g*sqrt(x**2+h**2)/(x+mu*h)
dF=F.diff(x)print('The general derivative is',dF)
dFat10=F.subs({m:18,h:10,mu:0.55,g:9.8,x:10})
print('When x=10, the rate of change in t is',dFat10.evalf() ,'Newtons/meter')
dFat40=F.subs({m:18,h:10,mu:0.55,g:9.8,x:40})
print('When x=40, the rate of change in t is', dFat40.evalf(), 'Newtons/meter')
Open Python Notebook File
Related Videos (200)
Antiderivatives: MATH 171 Problems 4-6
Proving facts about antiderivatives and a physics application
MATH 152: Work Exercise 13
Calculating the work done pulling part of a rope to the top of a building
MLC WIR 20B M151 week6 #5c
Using the Chain Rule to find the derivative of a composition of functions
