1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

数学_利用ライブラリ

Last updated at Posted at 2023-01-10

sympy他、利用ライブラリ

importするライブラリ

# library
from sympy import init_printing
import sympy

# 解
from sympy import factor       # 因数分解
from sympy import solveset     # solveではなくsolvesetを推奨とある、構文は同じ
from sympy import solve        # 代数方程式を解く
from sympy import simplify     # 式の簡略化
from sympy import apart        # 部分分数分解
from sympy import cancel       # 有理表現
from sympy import collect      # ベキ順に整理
from sympy import separatevars # 共通因子で括る
from sympy import expand       # 展開
from sympy import sqrtdenest   # 2重根号計算
from sympy.solvers.inequalities import reduce_rational_inequalities # 不等式
# ex. reduce_rational_inequalities([[f3>=0.8]], A)

# plotting
from sympy.plotting import plot
from sympy.plotting import plot_parametric
# 2変数関数のプロット
from sympy.plotting import plot3d

# 変数
from sympy import symbols
from sympy import var

# 三角関数
from sympy import sin
from sympy import cos
from sympy import tan
from sympy import asin
from sympy import acos
from sympy import atan
from sympy import sinh
from sympy import cosh
from sympy import tanh

# 指数関数
from sympy import exp

# 対数関数
from sympy import log

# 極限値
from sympy import limit
from sympy import oo
from sympy import Sum
from sympy import sqrt
from sympy import Function
from sympy import Max

# 微分
from sympy import diff
from sympy import powsimp

# 階乗
from sympy import factorial

# テイラー展開
from sympy import series
from sympy import poly

# 積分
from sympy import integrate
from sympy import lambdify  # sympy関数を積分可能な関数に変換する

# 合算
from sympy import summation # 対象の合計 factorと合わせて使う場合もある

# 連立方程式
from sympy import Eq

# 虚数
from sympy import I
from sympy import collect

# 定数
from sympy import pi
from sympy import E

# 絶対値
from sympy import Abs

# 表示
from sympy import latex

# 分数として扱う
from fractions import Fraction
from sympy import Rational

# 行列
from sympy import Matrix       # ベクトル、行列
from sympy import eye          # 単位行列
# det          # 行列式
# eigenvects   # 固有ベクトル
# eigenvals    # 固有値
# diagonalize  # 対角行列
# inv          # 逆行列
# adjugate     # 余因子行列
# transpose    # 転置行列

# 確率
from sympy.functions.combinatorial.numbers import nC  # 組み合わせ
from sympy.functions.combinatorial.numbers import nP  # 順列

# 最大、最小、範囲
from sympy import maximum
from sympy import minimum
from sympy import Interval
## minimum(expand(p_norm**2), k, Interval(-1, 3/2))

# 常微分方程式
from sympy.solvers import ode

# いつもの
import numpy as np
import pandas as pd
import japanize_matplotlib
import seaborn as sns
import matplotlib.pyplot as plt
from collections import OrderedDict

# 初期化
init_printing(use_latex='mathjax')

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?