Why does symbolic integration return the wrong answer for this integral?
12 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Gareth Fuller
el 23 de Feb. de 2021
Comentada: Walter Roberson
el 23 de Feb. de 2021
Hello! I'm trying to integrate 1/(1-x)^2 with the bounds 0 to x.
Now, other sources (Like WolframAlpha) return the result as -x/(x-1). However, MATLAB returns inf.
Can anyone explain why this would be?
syms x
expr = 1/(1-x)^2
int(expr, 0, x)
ans =
Inf
0 comentarios
Respuesta aceptada
Walter Roberson
el 23 de Feb. de 2021
syms x a
expr = 1/(1-x)^2
F = int(expr, x, 0, a)
subs(F,a,x)
2 comentarios
Walter Roberson
el 23 de Feb. de 2021
I am not sure. My expectation was that I would be able to control the output by adding in an assume() or tossing in an 'IgnoreAnalyticConstraints' option, but those did not work.
Más respuestas (0)
Ver también
Categorías
Más información sobre Numerical Integration and Differentiation en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


