Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand and equations #1390

Open
soegaard opened this issue Feb 15, 2025 · 2 comments
Open

Expand and equations #1390

soegaard opened this issue Feb 15, 2025 · 2 comments

Comments

@soegaard
Copy link

Description

Expand lacks a rule for equations.

I expected Expand[eq1==eq2] to give Expand[eq1]==Expand[eq2].
Instead the original input is returned.

Image

How to Reproduce

Enter: Expand[(x-1)*(x^2+1)==0]

Expected behavior

From WolframScript:

In[66]:= Expand[(x-1)*(x^2+1)==0]                                                        

                   2    3
Out[66]= -1 + x - x  + x  == 0
@axkr
Copy link
Collaborator

axkr commented Feb 16, 2025

This is probably incomplete, but I think that the following functions:

Apart
Collect
ComplexExpand
Expand
ExpandAll
ExpandDenominator
ExpandNumerator
ExpToTrig
Factor
FactorSquareFree
FactorTerms
FunctionExpand
PowerExpand
Together
ToRadicals
TrigExpand
TrigReduce 
TrigToExp

Can be threaded other (nested) expressions with the following heads:

And
Or
Nand
Nor
Not
Implies
Equivalent
Equal
Unequal
Greater
GreaterEqual
Less
LessEqual
Xor

@rocky
Copy link
Member

rocky commented Feb 17, 2025

Conceptually, adding a rewrite rule is easy.

@soegaard As a workaround, perhaps you can come up with such a rewrite rule, suggest that, and use this in the interim.

When I look at the current Expand[] Python evaluation code, it could use an overhaul. So for myself, I would not contemplate expanding Expand until the internal code overhaul is done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants