# How to compute the cohomology of a local system?

Suppose we have a reasonable topological space $$X$$ (i.e. a complex algebraic variety or a manifold) whose integral singular cohomology and fundamental group we understand well.

Suppose that we are given a monodromy representation $$\rho: \pi_1(X,x) \longrightarrow \text{GL}(V)$$.

How does one compute the cohomology $$H^i(X,L)$$ of the local system $$L$$ associated to $$\rho$$?

Suppose $$X$$ is a connected CW complex with fundamental group $$\pi:=\pi_1(X,x)$$. Then the cellular chain complex $$C_*(\widetilde{X})$$ of the universal cover is a chain complex of free $$\mathbb{Z}\pi$$-modules, where $$C_i(\widetilde{X})$$ has rank equal to the number of $$i$$-cells of $$X$$. We can also regard $$L$$ as a $$\mathbb{Z}\pi$$-module. By definition $$H^i(X;L)$$ is the $$i$$-th homology of the cochain complex $$\operatorname{Hom}_{\mathbb{Z}\pi}(C_*(\widetilde{X}),L)$$. This can sometimes be computed directly, if the cell structure of $$X$$ and the boundary maps are well enough understood.
Then there are various tricks involving long exact sequences associated to short exact sequences of coefficient systems, transfer arguments, Shapiro's lemma, spectral sequences, and so on. For manifolds, there is Poincaré duality with local coefficients, which can sometimes inform computations. These methods are descirbed in Brown's "Cohomolgy of Groups" for $$X=K(\pi,1)$$, but mostly they apply more generally.
In general you should have $$H^1(\pi_1(X,x),V)\cong H^1(X,L)\,,$$ where on the left we have the group cohomology of $$\pi_1(X,x)$$ acting on $$V$$ according to the representation. You will also have an embedding $$H^2(\pi_1(X,x),V)\hookrightarrow H^2(X,L)\,,$$ that will be an isomorphism if $$X$$ has $$\pi_2(X)=0\,.$$ In general you will have, if $$\pi_k(X)=0$$ for all $$2\le k\le n\,,$$ that $$H^n(\pi_1(X,x),V)\cong H^n(X,L)\,,$$ and you will have an embedding $$H^{n+1}(\pi_1(X,x),V)\hookrightarrow H^{n+1}(X,L).$$