Hi, I am attempting to run a simulation of a complex mathematical equation from Equation. The simulation is run from 0-1 second in 0.01 second steps. The exponential terms are causing serious issues, as the integral in the exponent becomes a very large value very quickly. Because of this i am attempting to use arbitrary precision to calculate with tens of thousands of decimal places, however i am getting errors telling me e^-73000 (approximately) cannot be represented as a machine number even though i am not trying to represent it as a machine number. I am also having trouble inside the large integral, as the exponential term in there goes towards infinity. I know there is likely a very simple solution, but i just cant seem to work out what im doing wrong and it is somewhat time sensitive. I would appreciate any help anyone can offer.
This is the code i am currently using to compute the equation:
input[v_] := N[A0*Sin[(w*v) + \[Theta]] + A0];
term1[j_] := N[(\[Sigma]*input[j])/(R*\[CurlyEpsilon]0), 100000];
term2[x_] := N[(d + input[x])/(R*S*\[CurlyEpsilon]0), 100000];
negintegrand[f_] :=
NIntegrate[(d + input[a])/(R*S*\[CurlyEpsilon]0), {a, 0, f},
AccuracyGoal -> Infinity];
term3[y_] := N[Exp[-negintegrand[y]], 100000];
innerintegrand[g_] := N[Exp[negintegrand[g]], 100000];
integrand[h_] :=
N[(\[Sigma]*input[h])/(R*\[CurlyEpsilon]0)*innerintegrand[h],
100000];
term4[z_] :=
N[NIntegrate[integrand[n], {n, 0, z}, AccuracyGoal -> Infinity],
100000];
output[t_] := N[term1[t] - term2[t]*term3[t]*term4[t], 100000];