Closed tirthbha closed 9 months ago
@tirthbha the similar thing is discussed here. https://github.com/ubsuny/23-Homework6G2/issues/16
This is a possible way of dealing with a singularity: (https://github.com/ubsuny/23-Homework6G2/issues/47)
@reshnashrestha @AhmedCode99 Thanks guys!
I tried to estimate the integrals for the three functions listed on the task1 using three methods as mentioned in the task1. Although I handled the singularity at x=0 for the functions: exp(-1\x)[return np.where(x != 0, np.exp(-1/x), 0)] and cos(1/x) [return np.where(x !=0, np.cos(1/x),0)] I am getting the warning "RuntimeWarning: divide by zero encountered in divide
@AhmedCode99 @LinxuanHu How have you resolve this issue, assuming that you have gone through this step?