Substituting for a derivative's variable is dropped: derivative(x^3, x) at x = 1 evaluates to 3 x^2
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 48/100
Piste de recherche
Start by reading the existing tests and implementation for Substitute on derivative and indefinite integral nodes, then compare them with the FreeVariables behavior and the test pinned by #1045. Add coverage for the derivative and integral examples in the issue, including evaluation after substitution. Done means substitution yields the expected values, with behavior for unevaluated derivatives such as derivative(f(x), x) at a point decided and covered.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Substitute leaves the variable of a derivative alone, and so does the variable of an indefinite integral. The answer evaluated afterwards is wrong:
| master 5e7731fe2 and 2.6.0 | should be | |
|---|---|---|
"derivative(x^3, x)".ToEntity().Substitute("x", 1).Evaled |
3 * x ^ 2 |
3 |
"derivative(x^3, x, 2)".ToEntity().Substitute("x", 2).Evaled |
2 * x * 3 |
12 |
"integral(x^2, x)".ToEntity().Substitute("x", 1).Evaled |
x ^ 3 / 3 + C |
1/3 + C |
Substituting and evaluating do not commute: derivative(x^3, x).Evaled is 3 * x ^ 2, in which x is free.
FreeVariables already reports that x as free. #1045 left both nodes out of its binders because "d/dt denotes a function of t", and pinned that with a test. Substitute still treats the variable as bound. That reading dates from 2020 (x = 0 -> derive(temp_1 ^ 2 + a, temp_1) -> derive(temp_1 ^ 2 + a, temp_1)), and #1811 kept it.
What is open is how to write a derivative that cannot be computed, evaluated at a point: derivative(f(x), x) with x := 1. SymPy writes Subs(Derivative(f(x), x), x, 1). Two candidates here:
apply(lambda(x, derivative(f(x), x)), 1);- a node for evaluation at a point.
- Langage dominant
- C#
- Étoiles
- 831
- Forks
- 79
- Merge moyen
- 1 h 16 min
- PR mergées (30 j)
- 521
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de ASC-Community/AngouriMath
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 35/100
ASC-Community/AngouriMath#2182 · 13 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 35/100
ASC-Community/AngouriMath#2164 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 35/100
ASC-Community/AngouriMath#2160 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 4/5 3-5 jours Accessibilité débutants 48/100
ASC-Community/AngouriMath#2153 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 35/100
ASC-Community/AngouriMath#2152 ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de ASC-Community/AngouriMath
Issues similaires
-
[Bug] Dashboard renders attachment links that resolve to 404 when the FILES binding is absentOuvertebug 優先: 低
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 92/100
-
.NET area: storage bug good first issue
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Larson-Logan/medal-sync#61 ·
Les mainteneurs répondent en général sous 1 jour
-
area-ai bug untriaged
Difficulté 2/5 1-3 heures Accessibilité débutants 67/100
dotnet/extensions#7893 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 72/100