# Second Order Non-homogeneous Constant Coefficient Differential Equation

1. Oct 12, 2011

### retracell

1. The problem statement, all variables and given/known data
Find a general solution to $$\frac{d^2x}{dt^2}-2\frac{dx}{dt}=1-4t+e^t$$

2. Relevant equations
None really.

3. The attempt at a solution
I know that a complimentary solution is $$x=c_1+c_2e^{2t}$$
But when I try to guess say: $$x_p=At+B+Ce^t$$ and plug into the DE, I do not get anything to equate to 4t. Do I have to guess a degree higher? And if so, do I include all coefficients such that my guess becomes $$x_p=At^2+Bt+C+De^t$$?

2. Oct 12, 2011

### aeroplane

You're right, with a polynomial in the inhomogeneous part of your equation, you should check a degree higher than it. You should include all the coefficients as well, but it turns out C has no constraints (no x(t) part of your differential equation on the L.S.) so you can set it to 0. The rest comes out easily after substituting back into the DE.

3. Oct 12, 2011

### HallsofIvy

Staff Emeritus
"At+ B" corresponds to characteristic root 0 which is already a characteristic root of your homogeneous equation. Try $y= At^2+ Bt+ Ce^t$ instead.

4. Oct 13, 2011

### retracell

Great thanks! Worked it out. So I guess I'm going by the fact that because my complementary solution has a constant term, I just multiply (At+B) by t.