在同一图里画两个隐函数图

1
2
3
4
5
6
from sympy import *
x, y = symbols('x y')
p1 = plot_implicit(Eq(x**2 + y**2, 1), show = False, line_color = 'red')
p2 = plot_implicit(Eq(x + y, 1), show = False)
p1.extend(p2)
p1.show()

python求方程解析解

解一元方程:

1
2
3
from sympy import *
x, a, b, c = symbols('x a b c')
solve(a * x**2 + b * x + c, x)

解二元方程:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
from sympy import *
x, y, z = symbols('x y z')
solve([y + x - 1, 3 * x + 2 * y - 5], [x, y])
limit(sin(x) / x, x, 0)
simplify(sin(x)**2 + cos(x)**2)
expand((x + 1)**2)
factor(x**2 + 2*x + 1)
collect(x*y + x - 3 + 2*x**2 - z*x**2 + x**3, x)
trigsimp(cosh(x)**2 + sinh(x)**2)
expand_trig(sin(x + y)) 
 
x, y = symbols('x y', positive=True)
n = symbols('n', real=True)
expand_log(log(x*y))
logcombine(n*log(x))
 
E**(I*pi)+1
expand(exp(I*x), complex=True)
 
tmp = series(exp(I*x), x, 0, 10)
pprint(tmp)
re(tmp)
series(sinh(x), x, 0, 10)
 
integrate(x*sin(x), x)
integrate(x*sin(x), (x, 0, 2*pi))
diff(x**2)
 
r = symbols('r', positive=True)
circle_area = 2 * integrate(sqrt(r**2-x**2), (x, -r, r))
circle_area.subs(r, x)

refer to: https://blog.csdn.net/shuangguo121/article/details/86611948

https://www.cnblogs.com/coshaho/p/9653460.html
https://baike.baidu.com/item/%E5%8F%8C%E6%9B%B2%E5%87%BD%E6%95%B0/8704306?fr=aladdin