Uncontrolled second-order linear system

Differential equation

Define simple second-order differential equation

diffeq = m  x''[t] + b  x '[t] + k  x[t] == 0 ;

Display differential equation

diffeq // TraditionalForm

k x(t) + b x^′(t) + m x^′′(t) 0

Differential equation solution

Solution to differential equation

DisplayDSolve[diffeq]

x^((-b - (b^2 - 4 k m)^(1/2)) t)/(2 m) c_1 + ^(((b^2 - 4 k m)^(1/2) - b) t)/(2 m) c_2

Set up initial conditions

initCond = {x[0] x0, x '[0] dx0} ; displayRule = {x0x_0, dx0Overscript[x, .] _0} ;

Solution to differential equation with initial conditions

DisplayDSolve[{diffeq, initCond}] /. displayRule

x1/(2 (b^2 - 4 k m)^(1/2)) (-b ^((-b - (b^2 - 4 k m)^(1/2)) t)/(2 m) x_0 + b & ... 2 m) m Overscript[x, .] _0 + 2 ^(((b^2 - 4 k m)^(1/2) - b) t)/(2 m) m Overscript[x, .] _0)

Characteristic equation

Compute characteristic equation

chareq = DiffEqToCharEq[diffeq] ;

Display characteristic equation

chareq // TraditionalForm

m s^2 + b s + k0

Roots of characteristic equation

roots = (s/.#) & /@ Solve[chareq, s] ;

Display roots of characteristic equation

roots // TraditionalForm

{(-b - (b^2 - 4 k m)^(1/2))/(2 m), ((b^2 - 4 k m)^(1/2) - b)/(2 m)}

Solution classes

Characteristic equation normalized with respect to m

chareq = DiffEqToCharEq[diffeq] ; chareq1 = (chareq[[1]]/m  0 // ExpandAll) ; chareq1 // TraditionalForm

s^2 + (b s)/m + k/m0

Equivalent representation (ζ = damping ration, ω = natural frequency)

chareq2 = s^2 + 2ζ ω s + ω^2  0 ; chareq2 // TraditionalForm

s^2 + 2 ζ ω s + ω^20

Roots of above characteristic equation

(s /. #) & /@ Solve[chareq2, s] // TraditionalForm

{-ζ ω - (ζ^2 ω^2 - ω^2)^(1/2), (ζ^2 ω^2 - ω^2)^(1/2) - ζ ω}

Solution classes

{{ζ<1, "underdamped"}, {ζ1, "critically damped"}, {ζ>1, "overdamped"}} // TableForm

ζ<1 underdamped
ζ == 1 critically damped
ζ>1 overdamped

Solution for ζ and ω in terms of system parameters (m, b, k)

ωs = Solve[ω^2 k/m, ω] // Flatten // Last ; ωs // TraditionalForm

ωk^(1/2)/m^(1/2)

ζs = Solve[2ζ ω  b/m /. ωs, ζ] // Flatten // Last ; ζs //TraditionalForm

ζb/(2 k^(1/2) m^(1/2))

Overdampled example (unequal negative real roots, ζ > 1)

Numeric values

vals = {m->1, b->9, k->6, x01, dx00} // N ;

Damping ratio and natural frequency

{ζ, ω} /. {ζs, ωs} /. vals

RowBox[{{, RowBox[{1.83712, ,, 2.44949}], }}]

Corresponding roots

roots /. vals

RowBox[{{, RowBox[{RowBox[{-, 8.27492}], ,, RowBox[{-, 0.725083}]}], }}]

Differential equation solution

fx = ProcessDSolve[{diffeq, initCond} /. vals] ; x[t] == fx // TraditionalForm

FormBox[RowBox[{x(t), , RowBox[{RowBox[{RowBox[{-, 0.0960396}],  , RowBox[{, ^ ... wBox[{, ^, RowBox[{(, RowBox[{RowBox[{-, 0.725083}],  , t}], )}]}]}]}]}], TraditionalForm]

Plot length

RowBox[{RowBox[{tmax,  , =,  , 10.}], ;}]

Plot solution

g1 = Plot[fx, {t, 0, tmax}, PlotStyleBlue, FrameTrue, PlotRangeAll] ;

[Graphics:../HTMLFiles/index_47.gif]

Underdamped system (conjugate complex roots with negative real parts, ζ < 1)

Numeric values

vals = {m->1, b->1, k->4, x01, dx00} // N ;

Damping ratio and natural frequency

{ζ, ω} /. {ζs, ωs} /. vals

RowBox[{{, RowBox[{0.25, ,, 2.}], }}]

Corresponding roots

roots /. vals

RowBox[{{, RowBox[{RowBox[{RowBox[{-, 0.5}], -, RowBox[{1.93649,  , }]}], ,, RowBox[{RowBox[{-, 0.5}], +, RowBox[{1.93649,  , }]}]}], }}]

Differential equation solution

fx = ProcessDSolve[{diffeq, initCond} /. vals] ; x[t] == fx // TraditionalForm

FormBox[RowBox[{x(t), , RowBox[{RowBox[{1.,  , RowBox[{, ^, RowBox[{(, RowBox[ ... [{-, 0.5}],  , t}], )}]}],  , RowBox[{sin, (, RowBox[{1.93649,  , t}], )}]}]}]}], TraditionalForm]

Plot length

RowBox[{RowBox[{tmax,  , =,  , 10.}], ;}]

Plot solution

g2 = Plot[fx, {t, 0, tmax}, PlotStyleRed, FrameTrue, PlotRangeAll] ;

[Graphics:../HTMLFiles/index_57.gif]

Critically damped system (equal negative real roots, ζ = 1)

Numeric values

The values below are exact, because of numeric instability in DSolve[ ]. Use NDSolve[ ] for non-exact values.

vals = {m->1, b->4, k->4, x01, dx00} ;

Damping ratio and natural frequency

{ζ, ω} /. {ζs, ωs} /. vals

{1, 2}

Corresponding roots

roots /. vals

{-2, -2}

Differential equation solution

fx = ProcessDSolve[{diffeq, initCond} /. vals] ; x[t] == fx // TraditionalForm

x(t) 2 ^(-2 t) t + ^(-2 t)

Plot length

RowBox[{RowBox[{tmax,  , =,  , 10.}], ;}]

Plot solution

g3 = Plot[fx, {t, 0, tmax}, PlotStyleMagenta, FrameTrue, PlotRangeAll] ;

[Graphics:../HTMLFiles/index_67.gif]

Compare three stable examples

Show[g1, g2, g3] ;

[Graphics:../HTMLFiles/index_69.gif]

Unstable system (roots have positive real parts)

Numeric values

The values below are exact, because of numeric instability in DSolve[ ]. Use NDSolve[ ] for non-exact values.

vals = {m->1, b -1, k10, x01, dx00} ;

Damping ratio and natural frequency

{ζ, ω} /. {ζs, ωs} /. vals

{-1/(2 10^(1/2)), 10^(1/2)}

Corresponding roots

roots /. vals

{1/2 (1 -  39^(1/2)), 1/2 (1 +  39^(1/2))}

Differential equation solution

fx = ProcessDSolve[{diffeq, initCond} /. vals] ; x[t] == fx // TraditionalForm

x(t) ^(t/2) cos((39^(1/2) t)/2) - (^(t/2) sin((39^(1/2) t)/2))/39^(1/2)

Plot length

RowBox[{RowBox[{tmax,  , =,  , 10.}], ;}]

Plot solution

g4 = Plot[fx, {t, 0, tmax}, PlotStyleGreen, FrameTrue] ;

[Graphics:../HTMLFiles/index_79.gif]


Created by Mathematica  (November 12, 2003)