Who could have imagined, in the mid 1970s, for example, that by the end of the 20th century, computers would be as common in people’s homes as TV sets?
Actually, no: it is simply the past form of “can” in this sentence. A situation is described in which someone could (not) do something in the past. The same probably applies to “would” here, which simply means “x will happen”, but viewed from a past perspective.
“I know that x will happen” => in the past: “I knew that x would happen”.
In the light of your statement "A situation is described in which someone could (not) do something in the past. ", why did the author not use “who could imagine” replace “who could have imagined”.
According to “could have done” is more clearly past tense than “could do”, should it be reasonable that “could do” is replaced by “could have done” when indicating the past? Such as: She could speak several languages.
should be written like: She could have spoken several languages.
They couldn’t dance very well.
should be written like: They couldn’t have danced very well.
On second thought, I think you’re right. I don’t remember what I was thinking exactly.
“An engineer could have imagined in 1970 that computers would be very common.”
This is clearly the same construction / type of sentence, but I have removed the parts that make it more complicated. This must be a hypothetical clause: “An engineer could have imagined that computers would be very common if he had tried.”
It is simply the past perfect subjunctive as used to describe a hypothetical situation in the past, that is, a situation that did not take place in the past. Is is of the same type as this:
“Napoleon could have known that invading Russia would be a bad idea [if he had been given the correct information], but he didn’t know [because he had not been given the correct information], and so he decided to invade Russia.”
This is a hypothetical situation in the past, for which “would/could/might/should have done” is regularly used.
“She could speak several languages” would normally be understood as past tense, describing past ability. It could theoretically describe suggested or possible future action, but this is rather unlikely with “speak several languages”. This is context-dependent and verb-dependent; for example, sentences like “You could ask them” or “We could go to see a film” normally do have a sense of hypothetical/suggested action in the future.
“She could have spoken several languages” is also past tense, but it does not mean the same thing. The “could speak” sentence means that she had the general ability to speak several languages. The “could have spoken” sentence means that on some particular past occasion the possiblity existed that she might speak several languages. It may also mean that the speaker is uncertain whether she spoke several languages (somewhat informal usage).
“They couldn’t dance very well” is talking about past ability. “They couldn’t have danced very well” would normally be understood as describing the speaker’s conclusion, based on some evidence given by the context, that they didn’t dance very well.