Showing if all eigenvalues of $A$ have negative real parts then our system has a strong Lyapunov function of the form $x^TSx$. Can I please have help solving the problem? I am having a tough time working out the details for $S$ and how to do it without assuming diagonability. Thank you!
Show that if all eigenvalues of $A$ have negative real parts then our system has a strong Lyapunov function of the form $x^TSx$. I want to show that $$S = \int_0^\infty e^{\tau A^T} e^{\tau A} d\tau,$$ satisfies $A^TS + SA = -I.$ So I know we can left-multiply by $e^{\tau A^T}$ and right-multiply by $e^{\tau A}$ and show that the result is a total derivative. Then we can use this to compute $S$ for the matrix $$A = \begin{pmatrix} -2 & 1 \\ 0 & -2  \end{pmatrix}.$$
$\textbf{Solution:}$ Assume $\lambda$ is an eigenvalue of $A$. Then the real parts of $\lambda$ are less than $0$. 
Let us consider $L = x^TSx, S^T = S$ and $x'= Ax$. By differentiating, we arrive at $$\frac{dL}{dt} = x^T(A^TS + SA)x.$$ From the hint, $$\frac{dL}{dt} = x^T(-I)x = -||x|| < 0.$$ Thus, $L$ is a strong Lyapunov function.
Next, let $$S = \int_0^\infty e^{\tau A} e^{\tau A} d\tau.$$ Moreover, $$A^TS + SA = \int_0^\infty A^Te^{\tau A^T} + e^{\tau A} A d\tau$$ $$= \int_0^\infty \frac{d}{d\tau} (e^{\tau A^T} e^{\tau A}) d\tau$$ and $$A^Te^{\tau A^T} +e^{\tau A} A = \frac{d}{d\tau}(e^{\tau A^T} + e^{\tau A}).  
Now, without loss of generality, assume $A$ is diagonalizable such that $$A = PDP^{-1} \implies A^T = (P^{-1})^TDP^T$$ implies $$A^TS + SA = [e^{\tau A^T} e^{\tau A}]_0^\infty$$ $$= [Pe^{\tau D} P^{-1}(P^{-1})^Te^{\tau D} P^T]_0^\infty$$ $$= [Pe^{-\infty}P^{-1}(P^{-1})^Te^{-\infty} P^T] - [(PIP^{-1})(P^{-1})^T I P^T] = - I.$$

Assume all eigenvalues of $A$ have negative real parts. Consider $x'=Ax,$ $$L=x^TSx \text{ where } S=S^T \text{ and } x\ne 0.$$ We must show that $\frac{dL}{dt} < 0$ so $$\frac{dL}{dt} =  (x^T)'Sx + x^TSx' = (x')^TSx + x^TSx' = x^TA^TSx + x^TSAx$$ $$=x^T(A^TS+SA)x.$$ Since we know that $A^TS+SA = -I$ so $$\frac{dL}{dt} = -x^T(I)x = -||x||^2 < 0 \text{ since } x\ne 0.$$ So $L$ is a strong Lyapunov function. 
Next, let $$S= \int_0^\infty e^{\tau A^T}e^{\tau A} d\tau.$$ We need $A^TS + SA=-I.$ So $$A^TS+SA = \int_0^\infty A^Te^{\tau A^T}+e^{\tau A} A d\tau$$ $$= \int_0^\infty \frac{d}{d\tau} (e^{\tau A^T}e^{\tau A})=[e^{\tau A^T}e^{\tau A}]_0^\infty. \hspace{8pt} (1)$$ Since $A$ has negative eigenvalues, $A^T$ does to. Assume $A$ diagonalizable, so $A=PDP^{-1}$, $A^T = (P^{-1})^TDP^T.$ $P$ consists of eigenvectors corresponding to eigenvalues of $A$, $D$ has eigenvalues of $A$ in the diagonal. So, from (1) we have $$(1) = \left[(P^{-1})^Te^{\tau D}P^T(Pe^{\tau D}P^{-1}) \right ]_0^\infty = 0 - \left[((P^{-1})^TIP^T)(PIP^{-1})\right] = -I \text{ and implies } A^TS+SA=-I.$$
Take, $$A= \begin{pmatrix} -2 & 1 \\ 0 & -2\end{pmatrix}$$ $$A^T = \begin{pmatrix} -2 & 0 \\ 1 & -2 \end{pmatrix}$$ $$A=-2I + N, \text{ where } N = \begin{pmatrix} 0&1 \\0&0 \end{pmatrix}$$ $$A^T = -2I + M, \text{ where } M = \begin{pmatrix} 0 & 0 \\ 1 & 0\end{pmatrix}$$ $$N^2 = M^2 = \begin{pmatrix} 0 & 0 \\ 0&0 \end{pmatrix} \text{ and } -2IN = N(-2I), -2IM = M(-2I)$$ $$\implies e^{\tau A} = e^{\tau(-2I + N)}= e^{-2\tau}Ie^{\tau N} = e^{-2\tau}(I)(I+N) = e^{-2\tau}I + e^{-2\tau}N$$ $$e^{\tau A^T} = e^{-2\tau}I e^{-2\tau}M=e^{-2\tau}I+e^{-2\tau}M$$ $$\implies S = \int_0^\infty (e^{-2\tau}I+e^{-2\tau}N)(e^{-2\tau}I+e^{-2\tau}M)d\tau$$ $$= \int_0^\infty (e^{-4\tau}I+e^{-4\tau}R_1+e^{-4\tau}R_2) d\tau$$ where $R_1 = \begin{pmatrix} 0&1\\1&0\end{pmatrix}$ and $R_2 = \begin{pmatrix} 1&0\\0&0\end{pmatrix}.$ 
So $$S= I\int_0^\infty e^{-4\tau}d\tau + R_1\int_0^\infty e^{-4\tau}d\tau + R_2\int_0^\infty e^{-4\tau}d\tau$$ $$=I\left[\frac{e^{-4\tau}}{-4} \right]_0^\infty + R_1\left[\frac{e^{-4\tau}}{-4} \right]_0^\infty + R_2\left[\frac{e^{-4\tau}}{-4} \right]_0^\infty$$ $$=I(\frac{1}{4}) + R_1(\frac{1}{4}) + R_2(\frac{1}{4})$$ $$=\begin{pmatrix} \frac{1}{4} & 0 \\ 0 & \frac{1}{4} \end{pmatrix} +\begin{pmatrix} 0&\frac{1}{4} \\ \frac{1}{4} &0 \end{pmatrix} + \begin{pmatrix} \frac{1}{4} & 0 \\ 0 & 0 \end{pmatrix}$$ $$=\begin{pmatrix} \frac{1}{2} & \frac{1}{4} \\ \frac{1}{4} & \frac{1}{4} \end{pmatrix}.$$
