Ok, so this is a second order
**linear** ordinary differential equation. An "n-th" order general form looks like:

a_{n}·u^{(n)}(t)^{ }+ a_{n-1}·u^{(n-1)}(t) + ... + a_{2}·u^{(2)} (t)+ a_{1}·u^{(1)}(t) = F(t)

Theory concludes that the **general** solution to the above is
**the sum** between the **general solution** to the corresponding homogeneous equation:

a_{n}·u^{(n)}(t) + a_{n-1}·u^{(n-1)}(t) + ... + a_{2}·u^{(2)} (t)+ a_{1}·u^{(1)}(t) = 0

and any **particular solution** to the original (non-homogeneous) equation.

In your case here you first must find the solution to u" + 2u' + u = 0,
which you tried and actually succeeded, by attempting u(t) = e^{r·t} as a solution ... and derived that parameter "r" must satisfy r^{2 }+ 2·r + 1 = 0, in order for u(t) = e^{r·t} to
satisfy u" + 2u' + u = 0 .... so you concluded that r= -1, which IS GOOD, it means that your general solution to the
homogeneous equation (u"+2u'+u=0) **must include** a term of the form
**a**_{1}**e**^{-t}.

The question is -- have you exhausted ALL POSSIBILITIES for detecting all components of the **general solution** for your homogeneous equation ? How can you be sure you found
**the** (all-encompassing) general solution ?

Let's start from the fact that a solution of the form u = e^{r·t} for u"+2u'+u = 0 actually yields the
polynomial equation **of second order** in the parameter "r" :

r^{2 }+ 2·r + 1 = (r - 1)^{2} = 0

which in general may have 2 distinct solutions, and solving it as (r - 1)(r - 1) = 0 does actually yield 2 (this time
identical) solutions: r = -1 and r = -1.

To generate a general solution for u"+2u'+u = 0 one should **
add** the exponential functions having parameter "r" take BOTH root values (r_{1} = -1, r_{2} = -1) as u(t) = a_{1}e^{-t} + a_{2}e^{-t}. But such a solution reduces to u(t) = (a_{1}+a_{2})·e^{-t}
indicating that its 2 component terms --
which should have been **independent** of each other -- **
are actually not so**: one can be expressed as the other × a constant. So
**is there a way** to convert one term as to have a new independent pair of terms ???

Let us note that searching for "r" such that u = e^{r·t} satisfies the general case A·u" + B·u' + C·u = 0 will yield "r" values such that A·r^{2} + B·r + C = 0 specifically r_{1,2} = -(B/2A) ± Δ, where Δ=
[ √(B^{2} - 4·A·C) ] / 2A.

The exceptional chance here is that in our case B^{2} = 4·A·C ↔ Δ = 0 ↔ r_{1} = r_{2} = -(B/2A)
and this will help because ...

... if now tried a different solution like u = **t**·e^{r·t} for A·u" + B·u' + C·u = 0 then
parameter "r" would **have to** satisfy: t·(A·r^{2} + B·r + C) + 2Ar + B = 0
which is an identity **if and only if** { r = -(B/2A)
**and** r = -(B/2A) ± Δ } ↔ { r = -(B/2A) **and** Δ = 0 } ↔ { r = -(B/2A)
**and** B^{2} = 4·A·C }. Since in our case this condition is actually fulfilled it follows that
not only u_{1} = a_{1}·**e**^{r·t} but also u_{2} = a_{2}·**t·e**^{r·t} is a solution
for any equation A·u" + B·u' + C·u = 0 in which coefficients satisfy B^{2} = 4·A·C (which includes our equation).

Last but not least, solutions "u_{1}" and "u_{2}" are independent of each other (one cannot be written as a sum with fixed coefficients from the other).

Thus the general solution to u" + 2·u' + u = 0 is u(t) = a_{1}·**e**^{-t} + a_{2}·**t**·**e**^{-t} .

Now as for a particular solution to u" + 2u' + u = 25·sin(t) it suffices to note that cos(t), -sin(t), -cos(t), sin(t), cos(t), .... are each the derivative of the prior — so for any
combination u = A·cos(t) + B·sin(t) we'd have (u" + u) = 0 that simplifies the original equation to 2·u' = 25·sin(t), where upon replacing u' = -A·sin(t) + B·cos(t) we check that we'd
**have to** have B = 0 and A = -25/2.

## Comments

Robert, how did you get 2A-2B=25 and 2A=0?

-2B is the coefficient of cos(t) on the LHS. (I had a typo in 2A-2B.)

2A is the coefficient of sin(t) on the LHS.

No wonder I got confused. Thanks for the help, Robert.