Skip to content

Put each point where a radicand is zero back into an equation Newton's method answered - #2497

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
newton-checks-radicand-zeros
Nov 16, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
newton-checks-radicand-zeros

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

Follows #2495 and #2496.

Newton's method cannot converge to a root where a radicand is zero, because a radical's derivative is infinite there. So an equation it answered left that root out: sin(sqrt(x)) = x was { 0.7686… } without 0. Where Newton's method answers, each zero of a polynomial radicand is now put into the equation. It is kept where the equation simplifies to exactly 0, and a decimal within 1e-10 of one is dropped as a copy of it.

Measured on 21 radical equations, against master's build before #2496 (the 2.8.0 solver):

equation 2.8.0 this branch
sqrt(x) + x = cos(sqrt(x)) - 1 { } { 0 } (unsolved after #2496 alone)
sin(sqrt(x)) = x { 0.7686… } { 0, 0.7686… }
cos(1 - sqrt(x)) - x = cos(1) { 0.3900… } { 0, 0.3900… }
x + sqrt(x) = e^(sqrt(x)) - 1 { 0, 3.21586080818110353… } { 0, 3.21586080818110264… }, from #2496

The other 17 are unchanged. Against mpmath (every root with |sqrt(x)| <= 12), each of the first three now has all of its real roots. They still lack complex roots far from the origin, 2.55 ± 45.0i the nearest for the first, which lie outside Newton's search region; master lacks them as well.

The generated checks were run on the same 300 equations as master, seed 1116. radcheck (square and cube roots) has no findings, with the same five unsolved; logcheck has no findings.

Full check on the branch: 21,109 of 21,122 unit tests pass (13 skipped), along with the MCP, Terminal, Interactive and F# suites and the AOT smoke test. BoundCheck, RootCheck (596/596), CasBench (0 wrong), SimpSweep, RuleCheck and PropCheck are clean, and CanonCheck, Confluence and ModenovCorpus match their baselines.

BREAKING-CHANGES.md has the entry after #2496's, and #2496's row for sqrt(x) + x = cos(sqrt(x)) - 1 now reads { 0 }. #2496's test for it now expects 0 rather than an unsolved answer.

🤖 Generated with Claude Code

…s method answered

A radical's derivative is infinite where its radicand is zero, and Newton's method does not
converge to a root there: sin(sqrt(x)) = x was { 0.7686… } without its root 0, and
cos(1 - sqrt(x)) - x = cos(1) { 0.3900… } without 0. Where Newton's method answers, each zero of
a polynomial radicand is now put into the equation and kept where it simplifies to exactly 0, and
a decimal within 1e-10 of one is dropped as its copy. sqrt(x) + x = cos(sqrt(x)) - 1, unsolved
since #2496, is { 0 }.

Of 21 radical equations, these three gain 0 and the rest are unchanged; radcheck and logcheck on
the same 300 equations as master, seed 1116, have no findings. Full check: 21109 of 21122 unit
tests pass, 13 skipped; BoundCheck, RootCheck (596/596), CasBench (0 wrong), SimpSweep,
RuleCheck, PropCheck clean; CanonCheck, Confluence and ModenovCorpus match their baselines.

Follows #2495

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.90%. Comparing base (c9c26b4) to head (bcf3eed).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2497   +/-   ##
=======================================
  Coverage   86.89%   86.90%           
=======================================
  Files         336      336           
  Lines       73571    73587   +16     
  Branches    21413    21419    +6     
=======================================
+ Hits        63932    63951   +19     
+ Misses       5191     5187    -4     
- Partials     4448     4449    +1     
Flag Coverage Δ
cpp 37.77% <ø> (ø)
csharp 87.42% <100.00%> (+<0.01%) ⬆️
fsharp 32.79% <ø> (ø)
interactive 40.09% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...Solvers/EquationSolver/AnalyticalEquationSolver.cs 97.15% <100.00%> (+0.28%) ⬆️

... and 7 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Rafael-SOWNet
Rafael-SOWNet merged commit dce1653 into master Nov 16, 2026
35 checks passed
@Rafael-SOWNet
Rafael-SOWNet deleted the newton-checks-radicand-zeros branch November 16, 2026 17:17
@github-project-automation github-project-automation Bot moved this from Todo to Done in AngouriMath Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant