Cauchy principal value integral
How can I calculate a Cauchy principal Value integral with sagemath
add a comment
How can I calculate a Cauchy principal Value integral with sagemath
Use the definition, there is a limit, write explicitly the limit in sage.
For instance, ∫1−1dxx makes no sense as it is, but we may want to compute instead PV∫1−1dxx=PV∫1−1dxx:=lima↘0PV∫[−1,−a]∪[a,1]dxx . This can be easily implemented:
var('a,x')
assume(a>0);
assume(a<1);
limit( integral(1/x, x, -1, -a) + integral(1/x, x, a, 1), a=0 )
We get zero.
Please start posting anonymously - your entry will be published after you log in or create a new account.
Asked: 1 year ago
Seen: 137 times
Last updated: Oct 06 '23