How to determine whether a system is in resonance with an externally applied voltage - RLC Circuit
In a differential equation class, you find the general solution by adding the homogeneous solution and the particular solution.
Now, how do you know if there will be resonance? If the solution to the homogeneous equation includes the forcing function (the same form) then there will be a resonant term (also known as secular term).
In your example, you found the homegenous solution (the solution to \$q'+0.2q+0.01q=0\$). That turned out to be (as you have it):
$$q_h(t)=C_1e^{-0.1t}+C_2te^{-0.1t} $$
For the purpose of this example, this solution does not contain the particular solution yet (which you already have in your post)
Compare the forcing function, \$g(t)=e^{-0.1t}\cos(10t)\$, to the homogeneous solution. If they have the same form, then you'll have resonance. Even though the forcing function does have an \$e^{-0.1t}\$ term, it is multiplied by a cosine function (not a constant) also, so the forcing function is not in the same form as any of the terms in the homogeneous solution—therefore no resonance in this case.
But notice that the homogeneous solution possesses \$e^{-0.1t}\$ and \$te^{-0.1t}\$ terms by themselves. So if you'd had a forcing function \$g(t)=e^{-0.1t}\$ (I just dropped the cosine term as an example), since this forcing function is of the same form of one of the terms in the homegeneous solution (there is \$e^{-0.1t}\$ in the homogeneous solution), there will be a resonant term. If you find the general solution to this new problem, you get:
$$ q_{gen}(t)=C_1e^{-0.1t}+C_2te^{-0.1t} + 0.5t^2e^{-0.1t} $$
See the term with the \$t^2\$ factor? That is a resonant term. That comes from the fact, that for the particular solution (which is due to the applied signal), you probably 'guess' at the beginning that it has the same form of the forcing function (something like \$Ae^{-0.1t}\$, would be a first guess) but since the homogeneous solution includes a function of the same form as the forcing function, you need to add a \$t\$ factor (now becomes \$Ate^{-0.1t}\$, second guess). In this particular problem, the homogeneous solution also includes an \$te^{-0.1t}\$ which means you end up adding an extra \$t\$ factor to distinguish the particular solution to the homogeneous one (now becomes \$At^2e^{-0.1t}\$, third guess)—that's why you get a \$t^2\$ term, and the 0.5 constant is what you find for \$A\$ after working through the math.
The key is to take a look at the homogeneous solution and that will tell you which type of forcing function leads to a resonant behavior (having to add \$t\$ factors). So in your differential equation, the forcing function (the applied signal) is not in resonance with the system because it s not contained in the homogeneous equation. Notice that the \$t\$ factor in the homogeneous solution comes from having a repeated root, it does not have to do with the external excitation.
To give you a different idea, if in your RLC circuit, \$R=0\$, your differential equation becomes:
$$q'+0.01q=g(t) $$
which will have a homogeneous solution:
$$q_h(t)=C_1\sin(0.1t)+C_2\cos(0.1t) $$
If you happen to choose a forcing function of the the form \$\cos(0.1t)\$ or \$\sin(0.1t)\$, you will end you with a resonant term for the particular solution (something like \$t\sin(0.1t)\$ or \$t\cos(0.1t)\$), which means growing oscillations...As in:

(maybe an earthquake)
Hope this gives some insight.