Comments (3)
The docstring of expand_power_exp
also indicates
>>> expand_power_exp(x**(y + 2))
x**(y + 2)
If ``x = 0`` the value of the expression depends on the
value of ``y``; if the expression were expanded the result
would be 0. So expansion is only done if ``x != 0``:
>>> expand_power_exp(Symbol('x', zero=False)**(y + 2))
x**2*x**y
Since we don't know if the base is zero or not we don't do the expansion. But if we know x
is not zero then it is ok:
>>> a, b = symbols("a, b", complex=True)
>>> x = var('x', zero=False)
>>> expand_power_exp(x**(a+b))
x**a*x**b
from sympy.
It seems that
a, b = sp.symbols("a, b", complex=True)
x = sp.symbols("x", positive=True)
sp.expand_power_exp(x**(a + b))
from sympy.
Ah, excellent. Thank you @smichr!
from sympy.
Related Issues (20)
- Support XDG Base directory spec HOT 3
- `parse_latex` seems not to work well on complex latex expression.
- sympy.floor returns wrong result HOT 4
- Why aren't all simplification functions also methods? HOT 3
- Simplifying symbolic relations with sympy.Max HOT 1
- solving systems of trigonometric functions
- allow bottom_up (and other traversals) to work with Python tuple and list HOT 2
- Adding other solvers to solveset
- Plotting with xlim sufficiently far from origin creates Image size too large
- Relational simplification limitation HOT 2
- Relational simplification isn't necessarily simplification of its arguments
- inverse_laplace_transform result depends on formatting of S-domain function
- suboptimal equals checking of tan(2*x) HOT 3
- Two docstring style guides HOT 7
- make TR4 do something
- Constraint solver not used for auxiliary equations in KanesMethod
- WedgeProduct giving wrong output HOT 5
- Lambdify doesn't recognize derivative symbol if cse is enabled HOT 11
- x.subs(1/x,y) behavior differs when x is symbol and when x is a function HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sympy.