Solving the differential equation in control system engineering
How the author solve the differential equation ? I didn't get his technique nor his method of solving.
  


Typically, you construct a solution from a homogeneous solution and a particular solution.


Homogeneous solution


This is the solution to the problem without excitation, in other words:

$$\frac{dx}{dt} + 7x = 0$$

One way of solving this is by solving the characteristic equation by replacing a derivative with \$\lambda\$, second derivative by \$\lambda^2\$, etc. In this case:

$$\lambda + 7 = 0 \Rightarrow \lambda = -7$$

The homogeneous solution is then:

$$\begin{align}
x_h(t) &amp;= \sum_{\lambda_i} A_i e^{\lambda_it} \\
&amp;= A e^{-7t}
\end{align}$$


Particular solution


This is the solution to the problem with the excitation, ie.

$$\frac{dx}{dt} + 7x = 5\cos(2t)$$

For particular solutions, we just choose a similar expression to the excitation in a smart way. In this case, the excitation is a cosine, so any derivative will be either a sine or a cosine as well with the same frequency. In other words, the particular solution will look as follows:

$$x_p(t) = B + C\cos(2t) + D\sin(2t)$$

Plugging this test in the equation yields

$$\begin{align}
\frac{d(x_p(t))}{dt} + 7x_p(t) &amp;= 5\cos(2t) \\
&amp;\Downarrow \\
\left(-2C\sin(2t) + 2D\cos(2t)\right) + 7\left(B + C\cos(2t) + D\sin(2t)\right) &amp;= 5\cos(2t) \\
&amp;\Downarrow \\
(7C + 2D)\cos(2t) + (-2C + 7D)\sin(2t) + 7B &amp;= 5\cos(2t)
\end{align}$$

In order for this equation to match for all \$t\$, we need that

$$\begin{align}
7C + 2D &amp;= 5 \\
-2C + 7D &amp;= 0 \\
B &amp;= 0
\end{align}$$


Final solution


The final solution is the sum of the homogeneous and particular solutions, and so

$$x(t) = Ae^{-7t} + C\cos(2t) + D\sin(2t)$$

You can think of it as the sum of all solutions that result in \$0\$ and one particular solution that will result in the excitation signal. It's like saying \$1 = 0 + 1\$ with the right hand side the homogeneous and particular solution.

At this point in time, we still don't have a value for \$A\$. This is found by enforcing a certain initial condition. For example, forcing \$x(0) = 0\$ will yield that

$$x(0) = A + C = 0 \Rightarrow A = -C$$

As is the case in your example.


  
  Is the following link is good enough to refresh my mind on how to solve differential equation ?
  


I am not planning on watching this series of video's so I will reserve my answer for this.


  
  Does control system engineers still solve differential equation by hand like this, or Matlab is always used to win some time ?
  


While this method does work, I don't think many engineers will still solve differential equations. In control theory, you usually reason with poles and zero's, and how the system behaves if they are moving, are added or removed. A simulator such as Matlab's Simulink can then be used to verify your reasoning and tune the positions of these poles and zero's.

Actually solving differential equations by hand only works for relatively simple (they often aren't) and linear (they often aren't) systems. I believe you will find these types of problems more often in an educational context rather than in practice.

Nevertheless, it is in my personal opinion a good idea to keep these things in the back of your head. There may always be cases where a simple and linear approximation of the problem at hand would be enough.

On a side note, my preferred way of solving this type of problems is by using the Laplace transform. As such:

$$\begin{align}
\mathcal{L}\left\{\frac{dx}{dt} + 7x\right\} &amp;= \mathcal{L}\left\{5\cos(2t)\right\} \\
&amp;\Downarrow \\
sX(s) - x(0) + 7X(s) &amp;= \frac{5s}{s^2 + 4} \\
&amp;\Downarrow \\
X(s) &amp;= \frac{1}{s + 7}\frac{5s}{s^2 + 4}
\end{align}$$

Then you split in partial fractions (I won't calculate the coefficients for keeping this answer shorter)

$$\begin{align}
X(s) &amp;= \frac{A}{s + 7} + \frac{Bs}{s^2 + 4} + \frac{2C}{s^2 + 4} \\
&amp;\Downarrow \\
x(t) &amp;= \mathcal{L}^{-1}\left\{X(s)\right\} \\
&amp;= Ae^{-7t} + B\cos(2t) + C\sin(2t)
\end{align}$$

They should both give the same result. I prefer this method because it doesn't require me to split the solution into a homogeneous and particular one. The downside is that you need to remember your Laplace transforms. It also helps greatly if you know some tricks for splitting in partial fractions.