Repository navigation
Commit a1fb7ae
Over the complex numbers, an equation in and out of a modulus is solved in the parts of x (#2309)
* Over the complex numbers, an equation in and out of a modulus is solved in the parts of x
#2307 left an equation with x inside abs, sgn, conj, Re, Im or arg and outside it too
unsolved over the complex numbers, since Newton's method assumes a holomorphic function
and its near-copies of a root came back as roots. Leaving it unsolved is not solving it.
With x = a + b i and each |u| a real t >= 0 with t^2 = (Re u)^2 + (Im u)^2, the real and
imaginary parts of the equation and one equation per modulus are a polynomial system in
as many unknowns, which the Groebner solver answers exactly and completely or not at
all. The roots are its solutions with a, b and every t real and no t negative, each put
back into the equation as written, since clearing the denominators can add a pole.
conj, Re and Im split directly. sgn(u) is u/|u| where u is not zero, and the case where
it is zero is solved on its own.
x^2/|1 - x^2| = x is { 0, (1 + sqrt(5))/2, (sqrt(5) - 1)/2 }, x |x| = 4 is { 2 },
x + sgn(x) = 3 is { 2 } again, and x^2 + 1 = |x| is +-i (sqrt(5) - 1)/2, which neither
the search nor a split by the sign found. Left unsolved: infinitely many solutions
(|x| = Re x), roots with no exact form (x^5 = |x| + 1), arg, and a system above 32
solutions by Bezout's bound, past which x^7 = |x| + 1 spent over 20 s declining.
The route runs once, on the equation as asked and ahead of the spelling loop, whose
spellings would each be the same system: asked of every one, x^5 = |x^3 + 1| + 1 ran
it dozens of times.
* Walk the tree by hand for the test that picks out these equations
It is asked of every equation the solver is given, ahead of the spelling loop. Enumerating
Nodes allocates an iterator at each level, and that was 4.5 MB of the kernel benchmark's
SolveHard, 45% of it, which has no modulus in it. The walk allocates nothing: SolveHard
allocates 187,558,968 bytes per solve on master and on the branch.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>1 parent eb19a31 commit a1fb7ae
5 files changed
Lines changed: 421 additions & 27 deletions
File tree
- Sources
- AngouriMath/Functions
- Algebra/Polynomials
- Continuous/Solvers/EquationSolver
- Tests/UnitTests/Algebra/SolveTest
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1049 | 1049 | | |
1050 | 1050 | | |
1051 | 1051 | | |
1052 | | - | |
1053 | | - | |
1054 | | - | |
1055 | | - | |
1056 | | - | |
1057 | | - | |
1058 | | - | |
1059 | | - | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
1060 | 1064 | | |
1061 | 1065 | | |
1062 | 1066 | | |
1063 | | - | |
1064 | | - | |
1065 | | - | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
1066 | 1072 | | |
1067 | 1073 | | |
1068 | 1074 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
150 | 162 | | |
151 | 163 | | |
152 | 164 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
133 | 143 | | |
134 | 144 | | |
135 | 145 | | |
| |||
395 | 405 | | |
396 | 406 | | |
397 | 407 | | |
398 | | - | |
399 | | - | |
| 408 | + | |
| 409 | + | |
400 | 410 | | |
401 | 411 | | |
402 | 412 | | |
| |||
0 commit comments