Skip to main content

calculus and analysis - A simple question: Input problem


I have a simple problem. First I define the value of variables, then I calculate the expression as the following:


Code 1:


a = 10^-6; 
b = 10^-3;
c = 1;
d = 0.1;
s = -d Sqrt[b^2 + c^2];


Integrate[(w E^(-w/a))/(w - s), {w, 0, ∞}]
-3.744368975478385*10^43415

As you see the result is so large. But if I manually insert the value of s (-0.1) into the expression, I would get zero, which is is close to the correct answer:


Code 2:


a = 10^-6; 
b = 10^-3;
c = 1;
d = 0.1;
s = -d Sqrt[b^2 + c^2];


Integrate[(w E^(-w/a))/(w + 0.1), {w, 0, ∞}]
0.

What is the problem with the first code?




Comments