In court trials, natural sciences such as physics and biology routinely make an appearance, e.g. when estimating the speed of a vehicle based on impact damage or trying to deduce from the condition of a corpse how long ago the person died.
Pure mathematics is found in courtrooms much more rarely (perhaps because of the difficulty of convincing a judge – or worse, a jury – with mathematical arguments). I am currently aware of the following two broad categories of mathematics being invoked in a trial:
Probability and conditional probability, especially the misunderstanding thereof. One instance of this is known as the Prosecutor's fallacy and basically involves a confusion of prior and posterior in Bayesian inference. The Wikipedia page mentions the infamous "Sally Clark case" as a possible example of this fallacy resulting in a wrongful conviction. BBC News also has an article according to which mathematical reasoning about test results played a role in the Knox/Sollecito murder trial.
Benford's First-Digit Law which predicts the approximate frequency distribution of digits in real-life data, is not only used as a heuristic for the detection of possible fraud, but shockingly even accepted as evidence of the same by some jurisdictions.
Are there examples of other branches of mathematics that have played a role (for the better or worse) in the courtroom?
As a side note, is is interesting that much of the key courtroom vocabulary like "trial", "case", "law" etc. is also part of standard mathematics lingo, which makes meaningful web searches for such material quite challenging.