# Dealing with Infinite expression errors

I'm currently trying to generate a plot showing what happens to a damped oscillator when it's critically damped using the following code:

Remove["Global*"]
DE[β_] = x''[t] + 2 β x'[t] + ω0^2*x[t] == 0;
eqnlist = {DE[β], x == A0, x' == 0};
soln = DSolve[eqnlist, x[t], t] // FullSimplify
xs[t_] := x[t] /. soln;
x3[t_] = xs[t] /. {β -> 2 π};
tmin = 0;
tmax = 10;
A0 = 5;
ω0 = 2 π;
Plot[x3[t], {t, tmin, tmax}]


The problem arises when ω0=β because the denominator becomes 0 at that point, and then you get Power "Infinite expression encountered" errors.

take the limit $$\beta\to\omega_0$$:

Remove["Global*"]
DE[β_] = x''[t] + 2 β x'[t] + ω0^2*x[t] == 0;
eqnlist = {DE[β], x == A0, x' == 0};
soln = DSolve[eqnlist, x[t], t] // FullSimplify;
xs[{ω0_, β_}, t_] = x[t] /. First[soln];
xscritical[ω0_, t_] = Limit[xs[{ω0, β}, t], β -> ω0]


A0 E^(-t ω0) (1 + t ω0)

DE[β_] = x''[t] + 2 β x'[t] + ω0^2*x[t] == 0;
eqnlist = {DE[β], x == A0, x' == 0};
soln = ExpandAll@FullSimplify@DSolve[eqnlist, x[t], t] /. Sinh -> (# Sinc[I #] &)

Block[{tmin = 0, tmax = 10, A0 = 5, ω0 = 2 π, β = 2 Pi},
x3[t_] := x[t] /. soln;
Plot[x3[t], {t, tmin, tmax}, PlotRange -> All]
] 