How to avoid Singularity in numirical integration
39 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
ABDEL MOUMEN
el 27 de Nov. de 2019
Comentada: ABDEL MOUMEN
el 26 de Mzo. de 2020
I want to numerically integrate the following with Matlab:
fun=@(t) (((1 - (-1)^n*cos(n*pi*t/R)))./t);
hn = integral(fun,0,(sqrt(R^2-x^2)));
For now, I just avoided to evaluate the integral in 0, are they any way to encounter the singularity at this point.
Thank you.
0 comentarios
Respuesta aceptada
Raynier Suresh
el 24 de Mzo. de 2020
The “quadgk” function can handle singularity if the singularity is present at the boundary. In case if your singularity is not at the boundary you can split the integration domain to place the singularity at the boundary. Refer to the below links for more information,
Split integration domain: https://www.mathworks.com/help/matlab/math/singularity-on-interior-of-integration-domain.html
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!