推荐学习书目
› 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 · 3386 views
    This topic created in 2973 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   ·   Privacy   ·   Solana   ·   770 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 20:52 · PVG 04:52 · LAX 13:52 · JFK 16:52
    ♥ Do have faith in what you're doing.