The investigation has already been done by the prosecution and defense.
In theory. I've heard of cases where neither side did a very good job. One such case I remember something about was a woman was accused of poisoning her infant son. She had a 10 minute unsupervised visit, during which she allegedly feed him ethylene glycol (AKA anti-freeze). The child was tested several days later by a hospital and found to have (IIRC) two teaspoons of it still in his system. She was convicted of attempted murder.
She finally got a good defense lawyer, who pointed out that the half-life of ethylene glycol in the human body is 4 hours (IIRC). He back calculated from the hospital's report and found that she would have had to feed him AT LEAST 40 gallons in those 10 minutes. She was quickly released. Turns out he had a rare genetic disorder which causes the body to produce ethylene glycol. Neither the prosecutor nor the initial defense attorney brought up this fact.
Second example: I was on patent infringement jury. The plaintiff claimed he showed information to another company under a non-disclosure agreement (NDA), which the other company violated, and caused the plaintiff's company to go bankrupt. I was one of two jurors that didn't buy it. Thankfully we were given copies of the NDA and the bankruptcy papers. We (the jury) argued over this point for more than 30 minutes before the two of us realized that the others didn't look at the documents (our mistake). The date of the NDA was AFTER the bankruptcy filing. The defense never pointed this out. Once my fellow juror and I pointed this out to the rest of the jurors, the plaintiff's case collapsed.