1 Star 1 Fork 2

谭富文/机器学习-微积分

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
ch6_1积分定与不定.py 667 Bytes
一键复制 编辑 原始数据 按行查看 历史
TanFuwen 提交于 2022-07-17 20:24 +08:00 . 不定积分
# -*- coding: utf-8 -*-
"""
file:ch6_1积分定与不定
author: Fuwen
time: 2022/7/16 17:31
software:PyCharm
"""
import numpy as np
import matplotlib.pyplot as plt
# 积分- 求和, 微分- 求无穷小的变化, 互为逆运算, 不定积分, 带常数C
# 原函数f(x) = 0.5*x**2 + x + C
# 函数系数
a = 0.5
b = 1
# 绘制函数图像
for c in range(-5, 6, 5):
x = np.linspace(-5, 5, 100)
y = a * x ** 2 + b * x + c
# 导函数 f = x + 1
plt.plot(x, y, )
plt.grid()
plt.show()
# sympy 积分函数
from sympy import *
x = Symbol('x')
a = Symbol('a')
f = a * x
F = integrate(f, x)
print('F = ',F)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/daydayup20172022/machine-learning---calculus.git
git@gitee.com:daydayup20172022/machine-learning---calculus.git
daydayup20172022
machine-learning---calculus
机器学习-微积分
master

搜索帮助