Let $X\subset\mathbb{P}^n$ be an irreducible and reduced hypersurface of degree $d$. How can one explicitly compute the dimension of the vector spaces $H^0(X,T_X),H^1(X,T_X),H^2(X,T_X)$? Here $T_X$ is the tangent sheaf of $X$. For instance $h^0(X,T_X)$ gives the dimension of the automorphism group of $X$.
Use the normal sequence $$ 0 \to T_X \to T_{\mathbb{P}^n}\vert_X \to N_{X/\mathbb{P}^n} \to 0, $$ exact sequences $$ 0 \to \mathcal{O}_{\mathbb{P}^n} \to \mathcal{O}_{\mathbb{P}^n}(d) \to i_*N_{X/\mathbb{P}^n} \to 0 $$ (we identify here $N_{X/\mathbb{P}^n}$ with $\mathcal{O}_X(d)$ and denote by $i$ the embedding $X \to \mathbb{P}^n$) and $$ 0 \to T_{\mathbb{P}^n}(d) \to T_{\mathbb{P}^n} \to i_*(T_{\mathbb{P}^n}\vert_X) \to 0, $$ and BorelBottWeil Theorem to compute cohomology on $\mathbb{P}^n$.

1$\begingroup$ I think that the first exact sequence you wrote holds only if $X$ is smooth. What if $X$ is singular? $\endgroup$ – user125056 Mar 5 at 18:57

2$\begingroup$ This is right (I missed the absence of the smoothness assumption in the question). In the singular case the first sequence is not exact in the right term, but its cokernel is not so hard to control. It is isomorphic to $\mathcal{O}_Z(d)$, where $Z \subset \mathbb{P}^n$ is the subscheme defined by $\{ \partial F/\partial x_0 = \partial F/\partial x_1 = \dots \partial F/\partial x_n = 0 \}$, where $F$ is the equation of $X$. $\endgroup$ – Sasha Mar 5 at 19:31

$\begingroup$ An addendum: this nice paper by Sernesi (arxiv.org/pdf/1306.3736.pdf) gives informations on how to control the deformations of a singular reduced hypersurface in terms of the local cohomology of the cokernel that Sasha was mentioning. $\endgroup$ – Enrico Mar 5 at 23:08