2014-12-25 108 views

回答

1

您通常首先獲取參數,然後評估以獲取函數值。例如:

from sympy import * 

x = Symbol('x', real=True) # parameter 
f = -2 * x**2 + 4*x  # function 
derivative = f.diff(x)  # -4*x + 4 
solve(derivative, x)  # -4*x + 4 = 0 

會給你x=1

+0

謝謝你elyase:D –