0
$\begingroup$

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[0] == A0, x'[0] == 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.

$\endgroup$
1
$\begingroup$

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

Remove["Global`*"]
DE[β_] = x''[t] + 2 β x'[t] + ω0^2*x[t] == 0;
eqnlist = {DE[β], x[0] == A0, x'[0] == 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)

$\endgroup$
0
$\begingroup$

Trick of the Week:

DE[β_] = x''[t] + 2 β x'[t] + ω0^2*x[t] == 0;
eqnlist = {DE[β], x[0] == A0, x'[0] == 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]
 ]

Mathematica graphics

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.