借助sympy.expand_power_base()
方法,我們可以通過使用來簡化數學表達的能力sympy.expand_power_base()
方法。
用法:sympy.expand_power_base()
返回:Return the simplified mathematical expression using base.
範例1:
在這個例子中,我們可以通過使用sympy.expand_power_base()
方法,我們能夠使用base簡化數學表達式的函數。
# import sympy
from sympy import *
x, y = symbols('x y')
gfg_exp = x**2 + 2 * x*y + y**2
# Use sympy.expand_power_base() method
fact = expand_power_base(gfg_exp)
print(fact)
輸出:
x**2 + 2*x*y + y**2
範例2:
# import sympy
from sympy import *
x, y, z = symbols('x y z')
gfg_exp = x**(a + b)
# Use sympy.expand_power_base() method
fact = expand_power_base(gfg_exp)
print(fact)
輸出:
x**a*x**b
相關用法
- Python next()用法及代碼示例
- Python os.dup()用法及代碼示例
- Python set()用法及代碼示例
- Python os.listdir()用法及代碼示例
- Python os.umask()用法及代碼示例
- Python sympy.eye()用法及代碼示例
- Python os.fstatvfs()用法及代碼示例
- Python os.uname()用法及代碼示例
- Python os.chroot()用法及代碼示例
- Python os.stat()用法及代碼示例
- Python sympy.tan()用法及代碼示例
- Python os.writev()用法及代碼示例
- Python os.write()用法及代碼示例
- Python sympy.sin()用法及代碼示例
注:本文由純淨天空篩選整理自Jitender_1998大神的英文原創作品 Python | sympy.expand_power_base() method。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。