Variation of Parameters to solve Told to solve $y''-2y'+y=e^xcos(x)$ using variation of parameters method. Solution then uses Wronskian, $W$, as $e^x \begin{vmatrix}1 & x\\
1 & 1+x
\end{vmatrix}$ which I understand. However, the next step is that $W\begin{bmatrix}c'_{1}\\c'_{2}\end{bmatrix}=\begin{bmatrix}0\\cos(x)\end{bmatrix}$ which I don't understand at all. Obviously comes out as the right answer for $c_{1}$ and $c_{2}$ as the coefficients of the two solutions of the homogeneous equation but I am not sure how they knew it was $0$ and $cos(x)$. If anyone could explain this step that would be great thanks!
 A: We are given
$$y''-2y'+y= g(x) = e^x \cos(x)$$
Finding the complementary solution
$$y_c(x) = e^x(c_1 + c_2 x)$$
Thus
$$y_1(x) = e^x, ~~~~y_2(x) = x e^x$$
The Wronskian of these two functions is
$$W(y_1, y_2) = \begin{vmatrix} e^x & x e^x \\ e^x & e^x(x+1) \end{vmatrix} = e^{2x}$$
Using VoP, we have
$$y_p(x) = -y_1\int \dfrac{y_2~ g}{W}~dx + y_2 \int \dfrac{y_1~ g}{W}~dx$$
This is
$$y_p(x) =  -e^x \int \dfrac{x e^x( e^x \cos(x))}{e^{2x}}~dx + x e^x \int \dfrac{e^x(e^x \cos(x))}{e^{2x}}~dx$$
Can you proceed? You should get
$$y_p(x) = -e^x \cos(x)$$
The final solution is
$$y(x) = y_c(x) + y_p(x) = e^x(c_1 + c_2 x - \cos(x))$$
Update Maybe the derivation of this process is causing issues. For the DEQ
$$y'' + p(x) y' + q(x) = g(x)$$
Suppose $y_1(x), y_2(x)$ are two linearly independent solutions to  homogeneous and $W(y_1, y_2) \ne 0$.
We seek to determine two functions $u_1(x)$ and $u_2(x)$ such that
$$y_p(x) = u_1(x) y_1(x) + u_2(x) y_2(x)$$
To determine two functions $u_1(x)$ and $u_2(x)$ uniquely, we need to impose two independent conditions.
First, we shall require $y_p(x)$ above be a solution and second
$$u_1'(x) y_1 + u_2'(x) y_2 = 0$$
We thus have
$$u_1' y_1 + u_2' y_2 = 0 \\ u_1' y_1' + u_2' y_2' = g$$
This can be compactly written as
$$W\begin{bmatrix} u_1' \\ u_2' \end{bmatrix}=\begin{bmatrix} 0 \\ e^x \cos(x) \end{bmatrix}$$
Lastly, this is solved as I show in the answer.
This can be extended to higher order non-homogenous DEQs.
A: I'm answering your side question about how to find solutions for linear ODE, you can read first my answer here https://math.stackexchange.com/a/3431378/399263.
Here the roots of the characteristic equation $r^2-2r+1=0$ are $r=1$ with multiplicity $m=2$.
The general solution of the homogeneous ODE is then $y_c=(ax+b)e^x$
The RHS is $e^x\cos(x)$ which is associated to roots $(1\pm i)$, since these roots do not collide with the one of the homogeneous ODE, we can search for a particular solution of the form $y_p(x)=c\,e^x\cos(x)+d\,e^x\sin(x)$, i.e. same degree than RHS (=cst).
After reporting in the ODE, you find $c=-1,d=0$ therefore $y_p(x)=-e^x\cos(x)$.
