I go for E too but you should probably also look at "by memory" vs "from memory" as well. 'by memory" is not correct here so A and D are out. C completely changes the meaning of the sentence. for B, "from memory" position in the sentence is amiguous so E is the only one that makes sense.
This picture of Beethoven was sketched by a close friend of his by memory a few weeks after his death.
A. was sketched by a close friend of his by memory a few weeks after his death
B. was sketched by his close friend from memory a few weeks after his death
C. on his death bed, was sketched by a close friend of his from memory a few weeks later
D. was sketched by a close friend a few weeks after his death by memory
E. was sketched from memory a few weeks after his death by a close friend of his
I agree that by memory/from memory is useful. However, I disagree that "from memory" placement is ambiguous in B. A prepositional phrase can be either a noun modifier or adverbial modifier:
(1) Adverbial modifiers don't have to touch the modified verb/whatever. So if we mean "sketched by memory," then "sketched by his close friend from memory" is acceptable, especially since "by his close friend" also modifies "sketched," so it's understandable that the modifiers can't both touch "sketched."
(2) If "from memory" is interpreted as a noun modifier, then it must modify "friend." But this is far less reasonable than the interpretation in (1) above. And in any case, (E) has a similar issue: "death by a close friend" is a more common turn of phrase than "friend from memory," and is a more concerning ambiguity (logically). Also, (E) has greater distance between its troublesome modifier and "sketched" than (B) does!
In summary: I'm willing to concede that E may be OK, but I do not agree that B is wrong. In my view, B is somewhat preferable to E. I think we must conclude that this question has two acceptable answers and is therefore flawed.
Very nice explanation. I also confused between B and E. Based on your points, I was really convinced B is the correct one. Thanks.