csci5521/assignments/hwk01/hw1solve.py
2023-10-01 18:09:50 -05:00

14 lines
226 B
Python

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()