# System of ODE without constant coefficients

I've got following system of ODE...

$$y_1'(x) = (3x-1)y_1(x)-(1-x)y_2(x)$$ $$y_2'(x)=-(x+2)y_1(x)+(x-2)y_2(x)$$

I'd like to have some tips on how to solve that. I've researched a lot on the Internet and on this site here but the message is always the same "It's hard to solve that but in this case, it's easy because you can use trick xy".

Well I don't see the trick here. Only thing I can think of, is to solve the first equation for $$y_2$$, so that...

$$y_2 = \frac{3x-1}{1-x}y_1(x) - \frac{1}{1-x}y_1'$$

and then differentiate so that I get $$y_2' = ...$$ and plug $$y_2, y_2'$$ into the second equation.

But that cant be a good idea, can it?

$$y_1'(x) = (3x-1)y_1(x)-(1-x)y_2(x)$$ $$y_2'(x)=-(x+2)y_1(x)+(x-2)y_2(x)$$ Sum both DE: $$(y_1+y_2)'(x)=(2x-3)y_1(x)+(2x-3)y_2(x)$$ This is a separable differential equation. $$u'=(2x-3)u$$ Where $$u=y_1+y_2$$. $$(\ln u)'=2x-3$$ $$\ln u=x^2-3x+C$$ $$y_1+y_2=C_1e^{x^2-3x}$$ $$y_1=-y_2+C_1e^{x^2-3x}$$ Plug this in the second DE and solve.