You have
func1 = (0.00034677878016334127*(4.028933642832898*^12 -
2.0072104720189415*^6*w)*
w^2)/(E^(9.489583333333334*^-16*w^2)*(4.028933642832898*^12 +
w^2 - 4.014420944037883*^6*Abs[w])^(3/2))
If you execute
modf = Rationalize[FullSimplify[func1], 0]
you get
This actually avoids precision problems. The same can be done for the endpoint of integration
1.377249681416402*^8 // Rationalize[#, 0] &
953883129349/6926
You can plot the function to have a look
Plot[modf, {w, 0, 953883129349/6926}, PlotRange -> All]
Why did I point this out?
You can compare the outcome of
NIntegrate[func1, {w, 0, 10^6}, PrecisionGoal -> 100,
AccuracyGoal -> 100, WorkingPrecision -> 1000]
NIntegrate[modf, {w, 0, 10^6}, PrecisionGoal -> 100,
AccuracyGoal -> 100, WorkingPrecision -> 1000]
both of which give the same number, but the former comes errors, while the latter does not; I know that 10^6
is not the initial endpoint of integration.
Finally, you can use one of the built-in Methods
to get the answer:
NIntegrate[modf, {w, 0, 953883129349/6926}, PrecisionGoal -> 100,
AccuracyGoal -> 100, WorkingPrecision -> 1000,
Method -> "LocalAdaptive"]
As an extra bonus, you can use Alex Trounev's answer to have a function that performs SimpsonIntegral
SetAttributes[SimpsonIntegral, HoldAll]
SimpsonIntegral[f_, x_, xmin_, xmax_,
steps_] := (xmax - xmin)/(3 steps) (Sum[
f /. {x -> xmin + (xmax - xmin)/steps (2*y - 2)}, {y, 1,
steps/2}] +
4*Sum[f /. {x -> xmin + (xmax - xmin)/steps (2*y - 1)}, {y, 1,
steps/2}] +
Sum[f /. {x -> xmin + (xmax - xmin)/steps (2*y)}, {y, 1,
steps/2}]);
SimpsonIntegral[modf, w, 0, 953883129349/6926, 5000] // N
gives back
-9.68443*10^11
and I think as you increase the steps the result should be more trustworhty - I did not check thoroughly.