Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from sympy import *
- def MaxBerivative(a):
- i = -2
- max = a.subs(x,i)
- while (i <= 2):
- if (max < a.subs(x,i)):
- max = a.subs(x,i)
- i += 0.01
- print(max)
- return str(max)
- f = open('D:\\Degree_Derivative.txt', 'r', encoding="utf-8")
- Degree = f.readline()
- f.close()
- print(Degree)
- x, y, z = symbols('x y z')
- init_printing(use_unicode=True)
- Berivative = diff(x/(x*x+1), x, Degree)
- max = MaxBerivative(Berivative)
- max = str(round(float(max),2))
- print(max)
- g = open('D:\\test1.txt','w', encoding="utf-8")
- g.write(max)
- g.close()
Advertisement
Add Comment
Please, Sign In to add comment