I've tried to solve the following integral, but I get a complex solution even tough it should only have a real part.
$$f(x)=- \frac{10^{-20} x}{0.99005- e^{10^{-12}x}}$$
Now I want to calculate the following:
$$\int_0 ^{10^9} f(x) dx$$
which shoud just give a real solution if we look at the graph
But using the following code I get a complex solution:
Integrate[f[x], {x, 0, 10^9}]
Which gives the following solution.
$0.471182 - 6.29146\times10^{-13} i$
Can anyone explain to me why the solution has a complex part? I suppose I can neglect this part but I don't know why. Also I calculated the indefinite integral and I believe that part of the problem comes from the PolyLog:
Integrate[f[x], x] // Simplify
(* Out:
x (-5.05025 10^(-21) x + 1.01005*10^(-8) Log[1. - 1.01005 Exp[1. 10^(-12) x)]] +
10100.5 PolyLog[2., 1.01005 Exp[1. 10^(-12) x]]
*)

NIntegrate, which you should since you have floating points in your definition off, then it gives a real result – Jason B. May 25 '16 at 14:25{}button above the edit window. It is recommended that you browse the Markdown help . Apply this to the function definitionf. – Jack LaVigne May 25 '16 at 14:39