General Solution to a Differential Equation containing both x and y? 
Find the general solution of the differential equation:
  $$\frac{d^2 y}{dx^2}-9\frac{dy}{dx}+20y=60x+13$$

I found this interesting question, I've never had a problem with solving differential equations with $y$'s but I have no idea how this is done when there is an $x$ involved too? Do I integrate both sides? I would kindly appreciate any hints or ideas. Thank you :)
 A: $$\frac{d^2y}{dx^2}-9\frac{dy}{dx}+20y=60x+13$$
Then the auxilliary equation (which arises by letting $y=e^{\lambda x}$): $$\lambda^2 -9\lambda+20=0\implies (\lambda-4)(\lambda-5)=0\implies \lambda =4\quad\text{or}\quad\lambda=5$$
Then the complementary function:
$$y_{CF}=c_1e^{4x}+c_2e^{5x}$$
Now we try a particular integral $y_{PI} = ax+b$
Then $y'=a,\quad y''=0$. Substituting this in:
$$0-9a+20(ax+b)=60x+13$$
$20b-9a = 13$
$20a = 60\implies a=3$
Then $20b=27+13=40\implies b=2$
Then our general solution is given by:$$y_{GS} =y_{CF}+y_{PI} =c_1e^{4x}+c_2e^{5x}+3x+2$$
Note you can check the answer is correct by differentiating it twice, then substituting back into the original equation to verify that LHS=RHS
A: This is a second order linear non-homogeneous ODE.
$$\frac{d^2 y}{dx^2}+p(x)\frac{dy}{dx}+q(x)y=r(x)$$
One may use Variation of Parameters. An advantage to this method in contrary to the Method of Undetermined Coefficients is that we do not have to guess the form of the particular solution.
We must first find the complementary solution $y_c(x)$. This is done by setting $r(x)=0$. For our case, this is:
$$\frac{d^2 y}{dx^2}-9\frac{dy}{dx}+20y=0$$
This can be solved using the ansatz $y=e^{\lambda x}$. The characteristic equation is thus:
$$\lambda^2-9\lambda+20=0 \implies \lambda=4,5$$
Hence, our complementary solution is:
$$y_c(x)=c_1 e^{4x}+c_2 e^{5x} \tag{1}$$

Let's now find the particular solution $y_p(x)$.
We have the basis solutions $e^{4x}$ and $e^{5x}$. Thus, our Wronskian is:
$$W(x)=\begin{vmatrix} e^{4x} & e^{5x} \\ \frac{d}{dx}(e^{4x}) & \frac{d}{dx}(e^{5x}) \end{vmatrix}=\begin{vmatrix} e^{4x} & e^{5x} \\ 4e^{4x} & 5e^{5x} \end{vmatrix}=e^{9x}$$
Now, we have $r(x)=60x+13$. The particular solution is given by:
$$y_p(x)=v_1(x)e^{4x}+v_2(x)e^{5x} \tag{2}$$
Where:
$$v_1(x)=-\int \frac{r(x)\cdot e^{5x}}{W(x)}~dx=-\int e^{-4x}(60x+13)~dx$$
And:
$$v_2(x)=\int \frac{r(x)\cdot e^{4x}}{W(x)}~dx=\int e^{-5x}(60x+13)~dx$$
Can you continue? After evaluating these integrals and substituting into $(2)$, use the fact that:
$$y(x)=y_c(x)+y_p(x)$$
I strongly recommend you to look at some other problems using Variation of Parameters given by the link I gave above.
