When we apply the superposition theorem and we have 1 voltage source defined with a cosine funtion and 1 current source(ideal), do we have to leave only the resistors when we remove the voltage source? Could you explain in brief why the capacitors and the inductors are removed(if this is correct)?

Thanks.