Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Post History
From the documentation for solve: If any equation does not depend on the symbol(s) given, it will be eliminated from the equation set and an answer may be given implicitly in terms of variab...
#1: Initial revision
From [the documentation for `solve`](https://docs.sympy.org/latest/modules/solvers/solvers.html#sympy.solvers.solvers.solve):
> * If any equation does not depend on the symbol(s) given, it will be eliminated from the equation set and an answer may be given implicitly in terms of variables that were not of interest:
>
> ```python
> >>> solve([x - y, y - 3], x)
> {x: y}
> ```
That's what you're encountering here, as your `eq2` doesn't depend on `a`.
Simplest thing is to omit the symbol altogether:
```python
>>> sp.solve([eq1, eq2])
[{a: 4, x1: -sqrt(-x2**2 - x3**2 + 1)}, {a: 4, x1: sqrt(-x2**2 - x3**2 + 1)}]
```
Unfortunately, this requires a bit of extra interpretation to see that the value found for `a` is the same in both solutions. I think that's just something to live with.
