Solve the IVP $\ddot{x}+\dot{x}+x=f(t)$

209 Views Asked by At

The entire question reads:

Consider the mass spring system subject to an external force $f(t)$:

$$\ddot{x}+\dot{x}+x=f(t)$$

Assume $x(0) = 0$ and $\dot{x}(0) = 0$. Assume also that $f(t)$ is the force describing the striking effect on the mass of the mass spring system in a short time period $0<T<\frac{1}{2}$, given as $f(t) = \frac{\pi}{4T}\sin{\frac{\pi t}{2T}}$ when $0 \leq t<2T$ and $f(t) = 0$ when $t \geq 2T$.

(a) Solve the given IVP first for all $t \geq 0$. (b) Compute the limits $\lim_{t \to \infty} x(t)$ and $\lim_{t \to \infty} \dot{x}(t)$. (c) Compute the limits $\lim_{T \to 0}x(T)$ and $\lim_{T \to 0} \dot{x}(T)$, and discuss their physical meanings.

I've been running into trouble on part (a). If I understand correctly, the solution for when $f(t) = 0$ is just simply $x(t) = 0$, but I haven't been able to come up with a solution for when $f(t) = f(t) = \frac{\pi}{4T}\sin{\frac{\pi t}{2T}}$. If someone could walk me through the process of finding these solutions, I know I could do parts (b) and (c). Thanks!

3

There are 3 best solutions below

6
On BEST ANSWER

Hint: Make an Ansatz that a particular solution $x_p$ to your differential equation takes the form $$x_p(t)=A\,\cos\left(\frac{\pi t}{2T}\right)+B\,\sin\left(\frac{\pi t}{2T}\right)\text{ for }t\in\left[0,2T\right]\,.$$ You should be able to get $A$ and $B$ by setting $\ddot{x}_p(t)+\dot{x}_p(t)+x(t)=f(t)$. Be warned that $x_p$ may not satisfy $x_p(0)=\dot{x}_p(0)=0$. If that happens, do you know how to fix this (hint again: solve the homogeneous equation $\ddot{x}+\dot{x}+x=0$)?

The homogeneous solutions $x_h$ are of the form $$x_h(t)=\exp\left(-\frac{t}{2}\right)\,\Biggl(a\,\cos\left(\frac{\sqrt{3}}{2}t\right)+b\,\sin\left(\frac{\sqrt{3}}{2}t\right)\Biggr)\,.\tag{*}$$ For $t\in[0,T]$, we have $x(t)=x_h(t)+x_p(t)$ for some appropriate choice $x_h$ of homogeneous solutions, where $x_p$ is a particular solution.
Use the Ansatz, we have $$\ddot{x}_p(t)=-\omega^2\,A\,\cos(\omega t)-\omega^2\,B\,\sin(\omega t)\,,$$ where $\omega:=\frac{\pi}{2T}$, and $$\dot{x}_p(t)=\omega\,B\,\cos(\omega t)-\omega\,A\,\sin(\omega t)\,.$$ Hence, $$\ddot{x}_p(t)+\dot{x}_p(t)+x_p(t)=\Big((1-\omega^2)\,A+\omega\,B\Big)\,\cos(\omega t)+\Big(-\omega \,A+(1-\omega^2)\,B\Big)\,\sin(\omega t)\,.$$ Then, we balance the coefficients, using $\ddot{x}_p(t)+\dot{x}_p(t)+x_p(t)=f(t)=\frac{\omega}{2}\,\sin(\omega t)$. Therefore, $$(1-\omega^2)\,A+\omega\,B=0\text{ and }-\omega \,A+(1-\omega^2)\,B=\frac{\omega}{2}\,.$$ Thus, $$\small(1-\omega^2)^2 A +\omega^2 A=(1-\omega^2)\big((1-\omega^2)\,A+\omega\,B\big)-\omega\big(-\omega \,A+(1-\omega^2)\,B\big)= (1-\omega^2)\cdot 0 -\omega\left(\frac{\omega}{2}\right)\,.$$ This gives $A=-\frac{\omega^2}{2(1-\omega^2+\omega^4)}$, whence $B=-\frac{1-\omega^2}{\omega}A=\frac{\omega(1-\omega^2)}{2(1-\omega^2+\omega^4)}$.
From the work above, $$x_p(t)=-\frac{\omega^2}{2(1-\omega^2+\omega^4)}\,\cos(\omega t)+\frac{\omega(1-\omega^2)}{2(1-\omega^2+\omega^4)}\,\sin(\omega t)\,.$$ Thus, $x_p(0)=-\frac{\omega^2}{2(1-\omega^2+\omega^4)}$ and $\dot{x}_p(0)=\frac{\omega^2(1-\omega^2)}{2(1-\omega^2+\omega^4)}$. Because $x=x_p+x_h$ with $x(0)=0$ and $\dot{x}(0)=0$, you need $x_h$ such that $x_h(0)=\frac{\omega^2}{2(1-\omega^2+\omega^4)}$ and $\dot{x}_h(0)=-\frac{\omega^2(1-\omega^2)}{2(1-\omega^2+\omega^4)}$. From (*), you immediately get $a=\frac{\omega^2}{2(1-\omega^2+\omega^4)}$. The remaining part is to find $b$, noting that $\dot{x}_h(0)=\frac{\sqrt{3}b-a}{2}$. That is, $b=-\frac{\omega^2(1-2\omega^2)}{2\sqrt{3}(1-\omega^2+\omega^4)}$. Ergo, $$x_h(t)=\exp\left(-\frac{t}{2}\right)\,\Biggl(\frac{\omega^2}{2(1-\omega^2+\omega^4)}\,\cos\left(\frac{\sqrt{3}}{2}t\right)-\frac{\omega^2(1-2\omega^2)}{2\sqrt{3}(1-\omega^2+\omega^4)}\,\sin\left(\frac{\sqrt{3}}{2}t\right)\Biggr)\,.$$ We have now solved the case $t\in[0,2T]$.

For $t>2T$, the solution should be a homogeneous solution. From the work above, you get $x(t)$ for $t\in[0,2T]$. Therefore, you will know the value $x(2T)$ and $\dot{x}(2T)$. Which homogeneous solution satisfies these new boundary conditions?

Observe that $$x(2T)=\small\frac{\omega^2}{2(1-\omega^2+\omega^4)}+\exp(-T)\,\left(\frac{\omega^2}{2(1-\omega^2+\omega^4)}\,\cos\left(\sqrt{3}T\right)-\frac{\omega^2(1-2\omega^2)}{2\sqrt{3}(1-\omega^2+\omega^4)}\,\sin\left(\sqrt{3}T\right)\right)$$ and that $$\dot{x}(2T)=-\small\frac{\omega^2(1-\omega^2)}{2(1-\omega^2+\omega^4)}-\exp(-T)\,\left(\frac{\omega^2(1-\omega^2)}{2(1-\omega^2+\omega^4)}\,\cos\left(\sqrt{3}T\right)+\frac{\omega^2(1+\omega^2)}{2\sqrt{3}(1-\omega^2+\omega^4)}\,\sin\left(\sqrt{3}T\right)\right)\,.$$ You can write $$x(t+2T)=\exp\left(-\frac{t}{2}\right)\,\Biggl(\alpha\,\cos\left(\frac{\sqrt{3}}{2}t\right)+\beta\,\sin\left(\frac{\sqrt{3}}{2}t\right)\Biggr)\,.$$ Then, we get $\alpha=x(2T)$ and $\frac{\sqrt{3}\beta-\alpha}{2}=\dot{x}(2T)$. This gives you $$x(t+2T)=\exp\left(-\frac{t}{2}\right)\,\Biggl(x(2T)\,\cos\left(\frac{\sqrt{3}}{2}t\right)+\frac{x(2T)+2\,\dot{x}(2T)}{\sqrt{3}}\,\sin\left(\frac{\sqrt{3}}{2}t\right)\Biggr)$$ for $t\geq 0$. Use $x(2T)$ and $\dot{x}(2T)$ from above, and you will get one ugly expression for $x(t+2T)$, when $t\geq 0$. You may then also write $$x(t)=\small\exp\left(-\frac{(t-2T)}{2}\right)\,\Biggl(x(2T)\,\cos\left(\frac{\sqrt{3}}{2}(t-2T)\right)+\frac{x(2T)+2\,\dot{x}(2T)}{\sqrt{3}}\,\sin\left(\frac{\sqrt{3}}{2}(t-2T)\right)\Biggr)$$ for $t\geq 2T$. In other words, $x(t)=\exp\left(-\frac{t}{2}\right)\,\Biggl(C\,\cos\left(\frac{\sqrt{3}}{2}t\right)+S\,\sin\left(\frac{\sqrt{3}}{2}t\right)\Biggr)$ for $t\geq 2T$, where $$C:=\frac{\omega^2}{2(1-\omega^2+\omega^4)}\,\big(\exp(T)\,\cos(\sqrt{3}T)+1\big)+\frac{\omega(1-2\omega^2)}{2\sqrt{3}(1-\omega^2+\omega^4)}\,\exp(T)\,\sin(\sqrt{3}T)$$ and $$S:=-\frac{\omega(1-2\omega^2)}{2\sqrt{3}(1-\omega^2+\omega^4)}\,\exp(T)\,\cos(\sqrt{3}T)-\frac{\omega^2}{2(1-\omega^2+\omega^4)}\,\big(\exp(T)\,\sin(\sqrt{3}T)+1\big)\,.$$

Parts (b) and (c) can be answered without solving Part (a) completely. We expect an exponential decay of order $\exp\left(-\frac{t}{2}\right)$ for large $t$, so the limits in Part (b) must be $0$. For Part (c), as other users mentioned, $f(t)\to \delta(t)$ as $T\to0^+$, where $\delta$ is the Dirac delta distribution. We see that $x$ is still continuous, so $\lim\limits_{T\to0^+}\,x(T)=x(0)=0$. On the other hand, $\lim\limits_{T\to0^+}\,\dot{x}(T)=\frac{1}{2}\,\left(\dot{x}(0)+\lim\limits_{T\to0^+}\,\dot{x}(2T)\right)=\frac{1}{2}(0+1)=\frac{1}{2}$.

0
On

Another approach: convert to a first order ODE by setting $$ z=\begin{bmatrix}x\\\dot x\end{bmatrix} $$ to get $$ \dot z=\begin{bmatrix}0 & 1\\-1 & -1\end{bmatrix}z+\begin{bmatrix}0\\1\end{bmatrix}f=Az+Bf,\qquad z(0)=\begin{bmatrix}0\\0\end{bmatrix}. $$ The solution is given by $$ z(t)=\int_0^te^{A(t-s)}Bf(s)\,ds. $$ The parts b) and c) can be done now without explicit calculation of the integral. Actually to answer b) you do not need any calculations at all: the system is stable (second order with constant positive coefficients) and $f$ has a finite duration, hence the limits are zero. To answer c): \begin{align} z(T)&=\frac{\pi}{4T}\int_0^Te^{A(T-s)}B\sin\frac{\pi s}{2T}\,ds\\ e^{-AT}z(T)&=\frac{\pi}{4T}\int_0^Te^{-As}B\sin\frac{\pi s}{2T}\,ds=\qquad[\text{change }x=\frac{\pi s}{2T}]\\ &=\frac12\int_0^{\pi/2}e^{-\frac{2ATx}{\pi}}B\sin x\,dx. \end{align} The limit of the LHS is $\lim_{T\to 0}z(T)$, the one that has to be estimated. The limit of the RHS is (by uniform convergence of the exponential to $I$) $$ \frac12\int_0^{\pi/2}I\cdot B\sin x\,dx=\frac12B\int_0^{\pi/2}\sin x\,dx= \frac12B=\begin{bmatrix}0\\\frac12\end{bmatrix}. $$

0
On

Solving with the Laplace Transform we have

$$ (s^2+s+1)X(s) - s \dot x(0) - x(0)= \int_0^{2T}\frac{\pi}{4T}\sin\left(\frac{\pi}{2T}t\right)e^{-s t}dt = \frac{\pi ^2 \left(e^{-2 s T}+1\right)}{2 \left(4 s^2 T^2+\pi ^2\right)} $$

and then using the initial conditions

$$ X(s) = \frac{\pi ^2 \left(e^{-2 s T}+1\right)}{2 \left(4 s^2 T^2+\pi ^2\right)}\frac{1}{s^2+s+1} $$

now anti-transforming with the help of suitable tables

$$ x(t) = \frac{\pi e^{-t/2}}{3 \left(16 T^4-4 \pi ^2 T^2+\pi ^4\right)} \left(\pi \left(e^T \theta (t-2 T) \left(\sqrt{3} \left(\pi ^2-2 T^2\right) \sin \left(\frac{1}{2} \sqrt{3} (t-2 T)\right)+6 T^2 \cos \left(\frac{1}{2} \sqrt{3} (t-2 T)\right)\right)+\sqrt{3} \left(\pi ^2-2 T^2\right) \sin \left(\frac{\sqrt{3} t}{2}\right)+6 T^2 \cos \left(\frac{\sqrt{3} t}{2}\right)\right)+3 e^{t/2} T (\theta (t-2 T)-1) \left(\left(\pi ^2-4 T^2\right) \sin \left(\frac{\pi t}{2 T}\right)+2 \pi T \cos \left(\frac{\pi t}{2 T}\right)\right)\right) $$

Here $\theta(t)$ is the heaviside unit step function. Attached the input-output (red-blue) plot for $T = 0.1$ out of scale.

enter image description here