From 4d979b9ca2b5e5733f95edc65fd0adf7c51e2bb3 Mon Sep 17 00:00:00 2001 From: Tarcisio-Teixeira Date: Tue, 25 Oct 2022 15:00:37 -0700 Subject: Create differential.py --- entries/Tarcisio-Teixeira/differential.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 entries/Tarcisio-Teixeira/differential.py (limited to 'entries/Tarcisio-Teixeira/differential.py') 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 -- cgit v1.2.3-70-g09d2