Over the complex numbers an exponential equation is answered with its principal root only

Aperta
#2,319 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
Più di una settimana
Idoneità per principianti
15/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
csharp
Ambito
backend

Direzione di ricerca

The issue is a design choice between two answer formats for complex exponential equations, and the maintainer has not decided which to take. Start with the exponential solving path and the Powf inversion TODO about periodic roots, then the trigonometric and Lambert W routes that already return integer-parameter families. Done means the maintainer picks option 1 or 2 and the answers are updated and tested; the design question must be settled first.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Opinions wanted

Over the complex numbers, the default codomain, Solve answers an exponential equation with its principal root only:

Solve("x") answer the roots
e^x = 2 { ln(2) } ln(2) + 2 pi i n for every whole n
e^x = -1 { ln(-1) } (2n + 1) pi i
e^(2x) - 3e^x + 2 = 0 { 0, ln(2) } 2 pi i n and ln(2) + 2 pi i n
2^x = 5 { log(2, 5) } log(2, 5) + 2 pi i n / ln(2)

The other periodic and multivalued routes already answer the whole family with an integer parameter: sin(x) = 0 is { 2 * pi * n_1, pi + 2 * pi * n_1 }, and x e^x = 2 is { lambertw(n_1, 2) }. A finite set says these are all the roots, so the exponential answers are incomplete. Powf's inversion carries a TODO for it: "determine how we should return periodic roots".

A cross-check of random exponential equations against a Newton search finds every root it reaches, and these answers lack them. Over the reals the principal root is the only one, and nothing there changes.

Two ways:

  1. Answer the family over the complex numbers, ln(c) + 2 pi i n_1, as the trigonometric equations and the Lambert W route do, keeping ln(c) over the reals. That changes the answer to every exponential equation in the default codomain, and whatever reads those answers (substitutions, systems) has to take a parameter.
  2. Keep the principal root and say so where Solve is documented, as a known incompleteness.

I'd go with 1, since it's what the rest of the solver already does. Which do you prefer?

Lingua principale
C#
Stelle
831
Fork
79
Merge medio
1h 12m
PR unite (30g)
518

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ASC-Community/AngouriMath

Tutte le issue di ASC-Community/AngouriMath

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.