Q:

Assigning multiple solutions different replacement names

Let's say we are solving a homogeneous differential equation, such as
$$y^{\prime\prime} + a y^{\prime} + b y = 0$$
with characteristic equation
$$s^2 + a s+ b = 0.$$
Using the Solve function,
sols = Solve[s^2 + a*s + b == 0, s]

we get
{{s -> 1/2 (-a - Sqrt[a^2 - 4 b])}, {s -> 1/2 (-a + Sqrt[a^2 - 4 b])}}. 

Now, the family of solutions is given by
$$y(t) = C_1 e^{s_1 t} + C_2 e^{s_2 t}$$
where $s_1$ and $s_2$ are the roots of the characteristic equation.  
How best to automatically substitute sols, which has two assignments for s into an expression like
C1*Exp[s1*t] + C2*Exp[s2*t]

or something more general (that adapts to the number of solutions)?  All I can come up with are pretty inelegant hacks.  
It would nice to give Solve an option to return something like
{{s[1] -> 1/2 (-a - Sqrt[a^2 - 4 b])}, {s[2] -> 1/2 (-a + Sqrt[a^2 - 4 b])}}

but I couldn't find an option like this in the documentation. 

A:

There are many possibilities.  You could do something like
sols = Flatten@Module[{i=1}, Solve[s^2 + a*s + b == 0, s] /. s :> s[i++]];
(* {s[1] -> 1/2 (-a - Sqrt[a^2 - 4 b]), s[2] -> 1/2 (-a + Sqrt[a^2 - 4 b])} *)

Alternatively,
sols = Solve[s^2 + a*s + b == 0, s];
exprs = {c1 Exp[s t], c2 Exp[s t]};
Plus @@ MapThread[#1 /. #2 &, {exprs, sols}]
(* c1 E^(1/2 (-a - Sqrt[a^2 - 4 b]) t) + c2 E^(1/2 (-a + Sqrt[a^2 - 4 b]) t) *)

A:

Another possibility is 
sol = Solve[s^2 + a*s + b == 0, s]//Flatten; 
Sum[C[i] Exp[sol[[i, 2]] t], {i, Length[sol]}]

But, why not just
DSolve[y''[t] + a y'[t] + b y[t] == 0, y[t], t][[1, 1, 2]]

both of which give
(* E^(1/2 (-a - Sqrt[a^2 - 4 b]) t) C[1] + E^(1/2 (-a + Sqrt[a^2 - 4 b]) t) C[2] *)

Addendum
A bit more compact is
Total[MapIndexed[C[First@#2] Exp[Last@#1 t] &, Solve[s^2 + a*s + b == 0, s], {2}], 2]

