惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
Secure Thoughts
Security Latest
Security Latest
Simon Willison's Weblog
Simon Willison's Weblog
O
OpenAI News
GbyAI
GbyAI
L
LINUX DO - 最新话题
A
Arctic Wolf
T
Tor Project blog
G
GRAHAM CLULEY
I
InfoQ
博客园_首页
IT之家
IT之家
The Register - Security
The Register - Security
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
P
Proofpoint News Feed
The GitHub Blog
The GitHub Blog
Blog — PlanetScale
Blog — PlanetScale
N
Netflix TechBlog - Medium
K
Kaspersky official blog
博客园 - 三生石上(FineUI控件)
S
SegmentFault 最新的问题
U
Unit 42
PCI Perspectives
PCI Perspectives
量子位
P
Palo Alto Networks Blog
S
Securelist
T
Troy Hunt's Blog
博客园 - 【当耐特】
Recorded Future
Recorded Future
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
S
Security Affairs
Engineering at Meta
Engineering at Meta
T
The Blog of Author Tim Ferriss
博客园 - 聂微东
罗磊的独立博客
N
News and Events Feed by Topic
人人都是产品经理
人人都是产品经理
B
Blog RSS Feed
NISL@THU
NISL@THU
C
Cisco Blogs
T
Threatpost
有赞技术团队
有赞技术团队
Forbes - Security
Forbes - Security
Hugging Face - Blog
Hugging Face - Blog
Last Week in AI
Last Week in AI
T
The Exploit Database - CXSecurity.com
Cloudbric
Cloudbric
Cyberwarzone
Cyberwarzone
Google DeepMind News
Google DeepMind News
C
Cyber Attacks, Cyber Crime and Cyber Security

博客园 - cndavy

如何在WINDOW环境下搭建ActivateMQ和zookeeper集群环境 Esp8266 例子 树莓派 安装 docker CSV 文件处理成 String[] ,网银下载的文本中使用逗号分割, 使用双引号标记字段. 使用String split 会出现把引号中的逗号识别的情况 例如 " ,,,, " , "aaa" 切换网卡的脚本 apache xampp 目录防止解析php FTPS 客户端 demo, WordPress搬家教程:换空间与换域名 Conda 简单使用 spoolsv.exe 无法启动 太阳高度角和方位角的计算 树莓派 3 alsa 声卡驱动 PHP 7 Xdebug 深深的坑 java 线性规划 和lingo 比较 Cannot find or open the PDB file问题的解决 Python Microsoft Visual C++ Compiler Package for Python 2.7 Node debug angular 调试 js (分 karms protractor / test e2e unit ) hbase scan 的例子
sympy 的 符号计算的例子
cndavy · 2017-04-01 · via 博客园 - cndavy
# coding: utf-8

# In[1]:

from sympy import *
E**(I*pi)+1


# In[4]:

x = Symbol('x')
expand( E**(I*x) )


# In[6]:

x = Symbol("x", real=True)
expand(exp(I*x), complex=True)


# In[7]:

tmp = series(exp(I*x), x, 0, 10)
pprint(tmp)


# In[8]:

pprint(re(tmp))


# In[9]:

pprint( series( cos(x), x, 0, 10) )


# In[10]:

pprint(series(sin(x), x, 0, 10))


# In[11]:

integrate(x*sin(x), x)


# In[12]:

integrate(x*sin(x), (x, 0, 2*pi))


# In[13]:

x, y, r = symbols('x,y,r')
2 * integrate(sqrt(r*r-x**2), (x, -r, r))
   


# In[18]:

r = symbols('r', positive=True)
circle_area = 2 * integrate(sqrt(r**2-x**2), (x, -r, r))
circle_area


# In[17]:

r = symbols('r', positive=True)
circle_area = circle_area.subs(r, sqrt(r**2-x**2))
circle_area


# In[21]:

r = symbols('r', positive=True)
circle_area = circle_area.subs(r, sqrt(r**2-x**2))
integrate(circle_area, (x, -r, r))


# In[ ]: