推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
bin222
V2EX  ›  Python

pyhton 怎么求某点的导数值

  •  
  •   bin222 · Aug 13, 2018 · 3107 views
    This topic created in 2854 days ago, the information mentioned may be changed or developed.
    from sympy import *
    x=Symbol('x')
    y=x**2
    dx=diff(y,x)
    上面这段程序求出了 y 关于 x 的导数:dx=2*x
    如何求 x=2 时,导数的值 dx=2*2=4 呢?
    这个要怎么代入呢?我的意思如何通过程序做。
    metaquant
        1
    metaquant  
       Aug 13, 2018
    from sympy import *
    dx=2*x
    u = lambdify(x,dx)
    print(u(2))
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2874 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 09:45 · PVG 17:45 · LAX 02:45 · JFK 05:45
    ♥ Do have faith in what you're doing.