Open thorek1 opened 1 week ago
Is that solution even correct? What if a = 0? Then x^0 + x = 1 + x and so 0 is not a solution.
if
a = 0
then
x * a ^ b + x = x * 0 ^ b + x = x * (0 ^ b + 1)
if b is not negative
x * (0 ^ b + 1) = x * (0 + 1) = x
the solution is
x = 0
what am I missing here?
You would need to pass that assumption though. SymPy's result is strictly not correct without it.
What about Symbolics making the assumption and giving the result? The same way it is done in this case:
Smb.symbolic_solve(x / a + x / b, x)
[ Info: Assuming (a*b) != 0
[ Info: Assuming (a*b) != 0
1-element Vector{Int64}:
0
so that in the case of Smb.symbolic_solve(x * a ^ b + x, x)
the return would be:
Smb.symbolic_solve(x * a ^ b + x, x)
[ Info: Assuming !(a = 0 & b < 0)
1-element Vector{Int64}:
0
That could be the case, yes. We could add a ia_solve
rule for that.