@mmcdara first of all thanks a lot, both your and nm's solution agree perfectly with the solution that dsolve/numeric gave me. There is only one thing left that I need to plot, which is why I needed the indefinite integral of f(t). If you can spare some more of your time and take a look at this I would really appreciate it.
I have the following code:
As := t -> [A0*(abs(z(t))/(1 + a*(g(t)^2 - g(t)^4)))^(1/2)]/omegas(t):
nm := t->1450669/1681*t + 4459704101248/1067737900495*hypergeom([131537/203808, 1], [335345/203808], 36887*exp(342569/506*t)/(57154 + 36887*exp(342569/506*t)))/(1 + 57154/36887/exp(342569/506*t))^(131537/203808):
h2 := t -> As(t)*exp(-I*nm(t)):
plot(h2(t), t = -0.005 .. 0.005);
Warning, unable to evaluate the function to numeric values in the region; see the plotting command's help page to ensure the calling sequence is correct
f := t -> 862.979774 + 1825.011621/((1 + 1.54943476*exp((-1)*677.0138344*t))^(131537/203808));
LL := limit(f(t), t = -infinity);
LR := limit(f(t), t = infinity);
LL := 862.9797740
LR := 2687.991395
tf := unapply(CurveFitting:-Spline([seq([t, f(t)], t in [seq](-0.065 .. 0.05, 0.001))], t, degree = 1), t);
eval(diff(tf, t), t = -0.06);
eval(diff(tf, t), t = 0.05);
approx_f := t -> piecewise(t < -0.065, LL, 0.05 < t, LR, tf(t));
approx_int := t -> int(approx_f(t), t);
h3 := t -> As(t)*exp(-I*approx_int(t));
plot(h3(t), t = -0.005 .. 0.005);
Warning, unable to evaluate the function to numeric values in the region; complex values were detected
I want to plot either h2 or h3; both of them work for me since both nm(t) and approx_int(t) work well. It seems like there is a problem when I try plotting either one of them.
Can you please help me with this?