csci5521/assignments/hwk01/hw1solve.py

15 lines
226 B
Python
Raw Normal View History

2023-10-01 23:09:50 +00:00
from sympy.abc import i, k, m, n, x
import sympy
def prob_2a():
# f = sympy.Function('f')
def f(x, theta): return (1.0 / theta) * sympy.exp(- x / theta)
log = sympy.Sum(f, (k, 1, n))
print(log)
prob_2a()