For the equation $y'=a(x)y+b(x)$ we can express the function y as $$y=C(x)\exp{ \int_{x_0}^x}{a(s)ds}$$ Which means that if we find the function $C(x)$ we'll have ourselves a solution.
Now, my lecture notes say two things I don't understand.
First, that finding such function $C(x)$ is actually the variable substitution, and second, that the final formula for $y$ is: $$ y=e^{\int{a(x)dx}}(C+\int{e^{-\int{a(x)dx}}b(x)dx}) $$
What does it mean that finding $C(x)$ is the variable substitution and how is the final formula for $y$ derived?
Thanks in advance!
This method is known as variation of constants, we now that for $y'=a(x)y$, the general solution is $y(x)=\exp\int_{x_0}^x a(\eta)d\eta$. Now, we have the equation $y'(x)=a(x)y+b(x)$, so we assume that we can write the solution as $y(x)=c(x)z(x)$. Then $y'(x)=c'(x)z(x)+c(x)z'(x)=a(x)y+b$ with $z(x)=\exp\int_{x_0}^xa(\eta)d\eta$.
So $z'(x)=z(x)a(x)$, and we have that $c'(x)(z(x)+c(x)z(x)a(x)=a(x)y+b=a(x)c(x)z(x)+b$, from whcih we obtain the differential equation of $c$: $$ c'(x)z(x)=b(x)$ $$ so $$c(x)=\int\frac{b(\xi)}{z(\xi)}d\xi=\int b(\xi)\exp(-\int a(\eta)d\eta)$$ and $$y(x)=c(x)z(x)=y_0+\exp\int_{x_0}^x a(\eta)d\eta\bigg(\int_{x_0}^x\frac{b(\xi)}{\exp\int_{x_0}^{\xi}a(\eta)d\eta}d\xi\bigg)$$