TITLE: Variation of Parameters to solve
QUESTION [1 upvotes]: 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!

REPLY [0 votes]: 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)$.
{"set_name": "stack_exchange", "score": 1, "question_id": 3999525}