aboutsummaryrefslogtreecommitdiff
path: root/entries/Tarcisio-Teixeira/differential.py
diff options
context:
space:
mode:
authorTarcisio-Teixeira2022-10-25 22:00:37 +0000
committerGitHub2022-10-25 22:00:37 +0000
commit4d979b9ca2b5e5733f95edc65fd0adf7c51e2bb3 (patch)
treea4b9246cc253762cc31840ad18e0cc5eb0e04972 /entries/Tarcisio-Teixeira/differential.py
parentd57abc9cefad29bd3977fc513ef6948f021dd558 (diff)
Create differential.py
Diffstat (limited to 'entries/Tarcisio-Teixeira/differential.py')
-rw-r--r--entries/Tarcisio-Teixeira/differential.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/entries/Tarcisio-Teixeira/differential.py b/entries/Tarcisio-Teixeira/differential.py
new file mode 100644
index 0000000..8abbdae
--- /dev/null
+++ b/entries/Tarcisio-Teixeira/differential.py
@@ -0,0 +1,10 @@
+from sympy import *
+
+def fib(n):
+ x = symbols('x')
+ f = diff(1/(1-x-x**2),x,0)
+ fact = 1
+ for i in range(1,n):
+ f = diff(f,x)
+ fact *= i
+ return f.subs(x,0)/fact