Second order differential equation solution error

ordinary differential equations

Assume a second order system is described by:
$$a_0 \frac{d^2x(t)}{dt^2} + a_1 \frac{dx(t)}{dt} + a_2x(t) = b_0u(t)$$
where $a_i$ and $b_i$ are real constants, and $x(t)$ and $u(t)$ are real functions. Assuming that the roots of the homogeneous are a pair of conjugate complex numbers:
$$\lambda_{1,2} = -\alpha \pm j\beta$$
where $\alpha$ is a positive real number and $\beta$ is a real positive number, then we have:
$$x_h(t) = e^{-\alpha t} [C_1 cos(\beta t) + C_2 sin(\beta t)]$$
Next let's assume that the function $u(t)$ is of the form:
$$u(t) = kh(t)$$
where $k$ is a positive real number, and h(t) is the Heaviside step function with amplitude one. For $x(0) = 0$ and $x'(0) = 0$ we have the particular solution:
$$ x_p(t) = K$$
$$x(t) = x_h(t) + x_p(t) = K + e^{-\alpha t} [-K cos(\beta t) -K \frac{\alpha}{\beta} sin(\beta t)]$$
For:
$$C_1 cos(\beta t) + C_2 sin(\beta t) = R sin(\beta t + \varphi)$$
we have:
$$\frac{C_1}{C_2} = tg(\varphi) \Rightarrow \varphi = arctg(\frac{C_1}{C_2})$$
and from the previous values for $C_1$ and $C_2$ we have:
$$R = K \sqrt{1 + (\frac{\alpha}{\beta})^2} $$
so finally(for $t \geq 0 ) $:
$$x(t) = K\left( 1 + e^{-\alpha t}\sqrt{1 + (\frac{\alpha}{\beta})^2}sin(\beta t + \varphi) \right) $$
when it should be (at least that's what it says in my book):
$$x(t) = K\left( 1 – e^{-\alpha t}\sqrt{1 + (\frac{\alpha}{\beta})^2}sin(\beta t + \varphi) \right) $$
When thinking about the solution which I arrived at, I see it doesn't make sense from a physical point of view, but I don't see my error. The question is what am I missing?

Edit:
With all the restrictions on the variables, we have that $C_1$ and $C_2$ are negative real numbers, so we have:
$$-K cos(\beta t) -K \frac{\alpha}{\beta} sin(\beta t) = R sin(\beta t + \varphi)$$
Note that $\alpha$, $\beta$, and $K$ are positive, so basic trigonometry…
$$-1(K cos(\beta t)+ K \frac{\alpha}{\beta} sin(\beta t)) = R sin(\beta t + \varphi)$$
$$R = -K \sqrt{1 + (\frac{\alpha}{\beta})^2} $$

Best Answer

You forgot to multiply with $h(t)$. Everything else looks correct. Note that $R(\cos\phi,\sin\phi)=(\fracαβ,1)$.

Every solution has the form $x(t)=h(t)u(t)$, as the solution is assumed to have $x(t)=0$ for $t<0$. $u$ is a solution for the right side without the $h$ factor, as you computed, with $u(0)=0$, $u'(0)=0$. That this indeed is the solution with the correct initial conditions can be confirmed by inserting the Taylor expansions \begin{align} e^{αt}-\cos(βt)−\fracαβ\sin(βt) &=(1+αt+\frac12(αt)^2+...)-(1-\frac12(βt)^2\pm...)-\fracαβ((βt)-\frac16(βt)^3\pm)+...\\ &=\frac12(α^2+β^2)t^2+\dots, \end{align} so you get a $C^1$ transition at $0$.


Note that in the angle determination for $$ K-Ke^{-αt}\left(\cos(βt)+\fracαβ\sin(βt)\right)=K-R\,e^{-αt}\sin(βt+φ) $$ you will need $R\,(\cos(φ),\sin(φ))=K\,(\fracαβ,1)$ where the right side is in the first quadrant by construction and thus $R=K\sqrt{1+(\fracαβ)^2}$ and $φ=\arctan(\fracβα)$.

Related Question