A trigonometric over a symbolic quadratic with a double root is NaN everywhere

Geschlossen
#1,879 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
35/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
csharp
Bereich
backend

Rechercherichtung

The bug is in SolveATrigonometricOfALinearOverAPowerOfALinear, which splits the quadratic over its two roots without checking whether the discriminant is zero. Start there, then reproduce the two inputs from the table with ToEntity().Integrate("x"). Done means the double-root case returns a finite antiderivative that passes the exact check at x = -3/10 and 4/5 with a = 3/2.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

A sine or cosine over a quadratic with symbolic coefficients and a double root is answered with an expression whose value is NaN everywhere.

Input 2.5.0 master 7df66948
"sin(x)/(a*x^2 + 2*a*x + a)".ToEntity().Integrate("x") integral(...) 644 characters, NaN at every point
"sin(a + b*x)/((c + d)*x^2 + 2*(c + d)*x + (c + d))".ToEntity().Integrate("x") integral(...) 1,128 characters, NaN at every point

SolveATrigonometricOfALinearOverAPowerOfALinear splits the quadratic over its two roots, (-m ± sqrt(m^2 - 4 l n))/(2 l), without noticing that the discriminant is identically zero. The partial fractions then divide by the difference of two equal roots. The exact check gives NaN at x = −3/10 and 4/5 with a = 3/2. The fix reads a double root as the linear x + m/(2 l) twice.

Part of #718

Vorherrschende Sprache
C#
Sterne
831
Forks
79
Ø Merge
1 Std. 12 Min.
Gemergte PRs (30 T.)
518

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus ASC-Community/AngouriMath

Alle Issues in ASC-Community/AngouriMath

Ähnliche Issues

Weitere Issues zu C#

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.