在Python中求解指数符号方程

时间:2020-06-11 11:00:24

标签: scipy symbolic-math exponential

我需要求解一个指数方程,并且方程中我还有其他变量需要保持变量而不是数字。 在网上搜索时,我发现Scipy有一些求解指数方程的方法,但是我不知道我应该使用哪一种方法以及关于该方程还有哪些其他信息。 您愿意提供帮助吗? 我已经在sympy中尝试了solve函数,但没有意识到它只能求解线性方程式,您可以在下面使用我的代码:

import math 
import sympy
from sympy import *
n, t, d, F =symbols ('n t d F')

a0=(-1/(2*sqrt(3)))*(((2+sqrt(3))**0)/(1-(2+sqrt(3))**n)-((2-sqrt(3))**0)/(1-(2-sqrt(3))**n))
a1=(-1/(2*sqrt(3)))*(((2+sqrt(3))**1)/(1-(2+sqrt(3))**n)-((2-sqrt(3))**1)/(1-(2-sqrt(3))**n))
prof=(t/n-2*t*d+4*t*d*a0)*(4*d*(a1-a0)+1/n)-F
nstar=solve(prof,n)
print(nstar)

谢谢!

0 个答案:

没有答案
相关问题