Explanation on the Proof of $W(t)=W(t_0)\exp\left(\int_{t_0}^{t} \text{tr}(\underline{A}(s)) \ ds\right)$ In my study of Floquet Theory, I have been given a sketch proof on the following definition of the Wronskian, $$W(t)=W(t_0)\exp\left(\int_{t_0}^{t} \text{tr}(\underline{A}(s)) \ ds\right).$$

Proof:\begin{align}
\underline{x}(t)&=\underline{x}(t_0)+(t-t_0)\underline{x'}(t_0)+O(t-t_0)^2 \\
&=\underline{x}(t_0)+(t-t_0)\underline{A}(t_0)\underline{x}(t_0)+O(t-t_0)^2,
\end{align}
  as $\underline{x'}=\underline{A}\underline{x}$ and thus $\underline{X'}=\underline{A}\underline{X}$ where $\underline{X}$ denotes the fundamental matrix.
  Now, \begin{align}
W(t)&=\det(\underline{X}(t)) \\
&=\det((\underline{I}+(t-t_0)\underline{A}(t_0))\underline{X}(t_0)+O(t-t_0)^2) \tag{1}\\
&=W(t_0)(1+(t-t_0)\text{tr}(\underline{A}(t_0))+O(t-t_0)^2 \tag{2}.
\end{align}
  Using Taylor expansion:
  $$W(t)=W(t_0)+(t-t_0)W'(t_0)+O(t-t_0)^2. \tag{3}$$ Letting $t\rightarrow t_0$, $$W'(t)=W(t)\text{tr}(\underline{A}(t))\implies W(t)=W(t_0)\exp\left(\int_{t_0}^{t} \text{tr}(\underline{A}(s)) \ ds\right)$$

There are many parts that I do not understand. Are there any resources that could help explain this? For instance, how is the last line derived (where did $W'(t)$ appear from)?
 A: So, firstly the Taylor series expansion of $X(t)$ near $t=t_0$ is given by
$$X(t)=X(t_0)+X'(t_0)(t-t_0)+\mathcal{O}\big((t-t_0)^2\big).$$
Next, we can use $X'(t_0)=A(t_0)X(t_0)$ to get
$$X(t)=X(t_0)\big(I+(t-t_0)A(t_0)\big)+\mathcal{O}\big((t-t_0)^2\big). $$
To take the determinant of both sides, we can use $\det(X(t_0)B)=\det(X(t_0))\det B$:
$$ \begin{array}{ll} W(t) & =W(t_0)\det\big(I+(t-t_0)A(t_0)+\mathcal{O}((t-t_0)^2)\big). \\ & =W(t_0)\det\big(I+(\color{Red}{t-t_0})\big[\color{Blue}{A(t_0)+\mathcal{O}(t-t_0)}\big]\big) \end{array}$$
Note when you factor $X(t_0)$ out of $\mathcal{O}((t-t_0)^2)$, you just get $\mathcal{O}((t-t_0)^2)$ since $X(t_0)$ is constant.
Next we can use the fact $\det(I+\color{Red}{\varepsilon} \color{Blue}{X})=1+\color{Red}{\varepsilon}\mathrm{tr}(\color{Blue}{X})+\mathcal{O}(\color{Red}{\varepsilon}^2)$ (which follows from the Leibniz formula for the determinant, itself the final result of expansion by minors), where $\varepsilon=t-t_0$. Note factoring $(t-t_0)$ out of $\mathcal{O}((t-t_0)^2)$ will be $\mathcal{O}(t-t_0)$, but everything gets absorbed back in the end:
$$ \begin{array}{ll} W(t) & =W(t_0)\big[1+(\color{Red}{t-t_0})\mathrm{tr}\big(\color{Blue}{A(t_0)+\mathcal{O}(t-t_0)}\big)+\mathcal{O}((\color{Red}{t-t_0})^2)\big] \\ & =W(t_0)\big[1+(t-t_0)\mathrm{tr}\,A(t_0)+\mathcal{O}((t-t_0)^2)\big]. \end{array}$$
On the other hand, the Taylor expansion of $W(t)$ is
$$ W(t)=W(t_0)+W'(t_0)(t-t_0)+\mathcal{O}((t-t_0)^2). $$
Equating coefficients of $(t-t_0)$ yields $W'(t_0)=W(t_0)\mathrm{tr}\,A(t_0)$. Equivalently, the other expansion of $W(t)$ we can subtract $W(t_0)$ from both sides, divide by $t-t_0$ to obtain
$$ \frac{W(t)-W(t_0)}{t-t_0}=W(t_0)\mathrm{tr}\,A(t_0)+\mathcal{O}(t-t_0). $$
Letting $t\to t_0$ yields $W'(t_0)=W(t_0)\mathrm{tr}\,A(t_0)$. Now replace $t_0$ with $t$ (since it was arbitrary):
$$ W'(t)=A(t)W(t). $$
This is a separable ODE which can be solved with the integrating factor method. First divide by $W(t)$ and then notice $W'(t)/W(t)$ is the derivative of $\ln W(t)$, so integrate from $t_0$ to $t$:
$$ W'(t)/W(t)=\mathrm{tr}\,A(t) $$
$$ \ln W(t)-\ln W(t_0)=\int_{t_0}^t \mathrm{tr}\,A(s)\,\mathrm{d}s $$
Notice so the LHS is $\ln(W(t)/W(t_0))$, so exponentiate and multiply by $W(t_0)$ to get
$$ W(t)=W(t_0)\exp\left(\int_{t_0}^t \mathrm{tr}\,A(s)\,\mathrm{d}s\right). $$
