Solve second order differential equation Suppose that we have following second order differential equation
$$\frac{d^2y}{dx^2}-\frac{dy}{dx} = 2(1-x).$$
When I saw this  equation in the book, it was said that solution is of the form
$$y(x)=x(a_1+a_2 x).$$
My assumption about this is that because the right-hand side of the differential equation is the linear function $2(1-x)=2-2x$, it means  that a function $y(x)$ whose second and first derivative is linear must be  quadratic, or in other words
$$y(x)=ax^2+bx+c.$$
Is this right? I have posted this question because I wanted to be sure that my assumption is correct. Thanks guys.
 A: No, the structure of the differential equation immediately tells you that there will be one quadratic solution, but there are other solutions of this differential equation that are not quadratic polynomials that are the sum of this solution and the solution of the corresponding homogeneous differential equation.
A: It seems like your book has indicated a particular solution of this equation. Notice that the left-hand-side is a linear equation in $y$. You can then break up your equation into a solution that satisfies the homogenous problem: $h''-h'=0$ and a particular solution $z''-z'=2(1-x)$. Indeed, the particular solution is of the form you mentioned. By the usual theory of differential equations, if you've found the homogoeous solution and a particular solution, then the full solution is of the form $y=h(x)+z(x)$. 
If we solve the homogenous equation, we see that it has a simple root equation $r^2-r=0$, which implies $r=0,1$ so that $z(x)=e^x+C$. Adding your particular solution of $ax^2+bx$ (where $a$ and $b$ are such that you get $2(1-x)$) gives the full solution.
