Python论坛  - 讨论区

标题:这个方程无法解出?

2012年05月13日 星期日 14:47

50*x**1.9389+-1045*x**0+1050*x**2.9389=0

 

from sympy import *
x=Symbol('x')
solve(50*x**1.9389+-1045*x**0+1050*x**2.9389, x)

 

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/pymodules/python2.6/sympy/solvers/solvers.py", line 332, in solve
    result = tsolve(f, *symbols)
  File "/usr/lib/pymodules/python2.6/sympy/solvers/solvers.py", line 697, in tsolve
    "(tsolve: at least one Function expected at this point")
NotImplementedError: Unable to solve the equation(tsolve: at least one Function expected at this point

2012年05月20日 星期日 12:13

这是函数原型

 

def tsolve(eq, sym):
    """
    Solves a transcendental equation with respect to the given
    symbol. Various equations containing mixed linear terms, powers,
    and logarithms, can be solved.

    Only a single solution is returned. This solution is generally
    not unique. In some cases, a complex solution may be returned
    even though a real solution exists.

        >>> from sympy import tsolve, log
        >>> from sympy.abc import x

        >>> tsolve(3**(2*x+5)-4, x)
        [(-5*log(3) + log(4))/(2*log(3))]

        >>> tsolve(log(x) + 2*x, x)
        [LambertW(2)/2]

    """

如下红色区域有误,请重新填写。

    你的回复:

    请 登录 后回复。还没有在Zeuux哲思注册吗?现在 注册 !

    Zeuux © 2024

    京ICP备05028076号