The Problem
Discuss the stability of the solution $x(t)=0$ of the equation $$mx''(t)+bx'(t)+qx'(t-r)+kx(t)=0$$ where $m>0,b\geq 0,q\geq 0,$ and $k\geq 0$ are all constants, by constructing an appropriate lyapunov functional.
Why I need help
I am having difficulty constructing an appropriate lyapunov functional needed to determine the stability as I do not have much experience with delayed differential equations.
I am also not sure that my overall approach is correct as I have not see a problem of this type (a delay differential equation of order 2) before.
Also note that lyapunov functionals, are similar but different to lyapunov functions.
My Work on the problem (so far):
First we use lyapunov functionals to determine stability (rather than use them to determine instability)as this will allow the determination of asymptomatic stability if $x=0$ is stable. If $x=0$ is not stable, then it is unstable.
In an attempt to make the problem simpler we rewrite the equation to eliminate the second derivative: let $y(t)=x'(t)$ then \begin{align} y'(t)=x''(t)&=-\frac{b}{m}x'(t)-\frac{q}{m}x'(t-r)-\frac{k}{m}x(t)\\ &=-\frac{b}{m}y(t)-\frac{q}{m}y(t-r)-\frac{k}{m}x(t) \end{align} thus we get the following system \begin{cases} x'(t)=y(t) \\ y'(t)=-\frac{1}{m}(b y(t)+q y(t-r)+k x(t)) \end{cases}
Here is my attempt at a appropriate lyapunov functional: $$V(x(t),y(t))=\frac{1}{2}y(t)^2+\frac{1}{2}x(t)^2 $$
I've only got it for $b=q$ but I think you can adapt it and what follows is the way the answer should go. I'll make it clear where I use this and what I think might work to fix it. This should still be pretty helpful.
As a rule of thumb, integral terms are good for delay terms.
For some constants, $C_1,C_2,C_3>0$, suppose $$ V(\phi,\psi) = C_1\phi^2(t) + C_2\psi^2(t) + \frac{C_3}{m}\int_{-r}^0\psi^2(t+\theta)d\theta. $$ Clearly, $V\geq 0$. Now, \begin{align*} \frac{d}{dt}V(x(t),y(t))&= \frac{\partial}{\partial x}V(x(t),y(t))\frac{dx}{dt} + \frac{\partial}{\partial y}V(x(t),y(t))\frac{dy}{dt}. \end{align*} First term: \begin{align*} \frac{\partial}{\partial x}V(x(t),y(t))\frac{dx}{dt}&= 2C_1x(t)x'(t) = 2C_1x(t)y(t) \end{align*} Second term: \begin{align*} \frac{d}{d y}V(x(t),y(t))\frac{dy}{dt}&= 2C_2y(t)\frac{dy}{dt} + \frac{C_3}{m}\frac{d}{d t}\left[\int_{-r+t}^ty^2(\theta)d\theta\right],\\ &= 2C_2y(t)\frac{dy}{dt} + \frac{C_3}{m}\frac{d}{d t}\left[\int_{0}^ty^2(\theta)d\theta-\int^{-r+t}_0y^2(\theta)d\theta\right],\\ &= 2C_2y(t)\frac{dy}{dt} + C_3\left[y^2(t)-y^2(t-r)\right],\\ &= 2C_2y(t)(-by(t)-qy(t-r)-kx(t)) + C_3\left[y^2(t)-y^2(t-r)\right],\\ \end{align*} Putting this together and choosing $C_1=kC_2$ to cancel the cross term gives the quadratic form
\begin{align*} \frac{d}{dt}V(t) &=(C_3-2bC_2)y^2(t)-2qC_2y(t)y(t-r)-C_3y^2(t-r),\\ &=\begin{bmatrix} y(t) & y(t-r)\end{bmatrix} \begin{bmatrix} C_3-2bC_2 & -qC_2\\ -qC_2 & -C_3 \end{bmatrix} \begin{bmatrix} y(t)\\ y(t-r) \end{bmatrix}. \end{align*} This matrix has determinant $-(C^2_3-2\frac{b}{q}qC_2C_3+q^2C_2^2)=-(C_3-qC_2)^2$ This is where I use $b=q$, can't factor it nicely otherwise. Now, choose $C_3,C_2$ such that $C_3-2bC_2<0$ and this matrix is negative definite, so the quadratic form $\frac{d}{dt}V$ is negative definite and hence decreasing along trajectories.
Okay, so how to fix the b=q problem? I think setting $C_1=kC_2$ was the wrong thing to do, I think you want to keep the $x$ term and end up with a 3x3 matrix. I don't think you'll be able to get it negative definite, but you should be able to get it negative semi-definite because there is no $x^2$ term. It might be that the $b\neq q$ is only neutrally stable for the right initial condition, could be worth hunting for that as part of your answer.