Substituting for a derivative's variable is dropped: derivative(x^3, x) at x = 1 evaluates to 3 x^2
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- C#
- Estrellas
- 831
- Forks
- 79
- Merge medio
- 1 h 16 min
- PR fusionados (30 d)
- 521
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de ASC-Community/AngouriMath
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 45/100
ASC-Community/AngouriMath#2195 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
ASC-Community/AngouriMath#2182 · 16 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
ASC-Community/AngouriMath#2164 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
ASC-Community/AngouriMath#2160 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
ASC-Community/AngouriMath#2153 ·
Los mantenedores suelen responder en 1 día
Todos los issues de ASC-Community/AngouriMath
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
area: core priority: low type: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
RicoSuter/Namotion.Interceptor#863 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
bitfoundation/bitplatform#14428 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
area-cli
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
0.3.0
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día