Cauchy's Theorem, Stokes' Theorem, de Rham Cohomology I've been struggling these last couple of days to see the connection, if at all there is one, between the following facts:


*

*For holomorphic functions $f$, $\mathrm{d}(f(z)\mathrm{d}z) = 0$.

*In a simply connected domain, a holomorphic function has a primitive, i.e. there exists a function $g$ defined over this domain such that $g'=f$.

*The de Rham Cohomology "measures the failure of closed forms to be exact".


Trying to convince myself that Cauchy's theorem is somehow geometrically intuitive led me to the one-line proof where point 1 above is combined with Stoke's theorem, which in turn has led me to wonder if there was something going on at the level of differential forms over $\mathbb{C}$. I apologise if the question is unclear; as I said, I have the feeling like there's a revelation about holomorphic functions dancing just out of my reach.
 A: There are easy and hard things to see here. Let me see if I can help.
Complex valued differential forms First of all, throughout this answer, I'll want to work with differential forms that take complex values. So a differential $k$-form, at each point of $\mathbb{C}$, will take as input $k$ tangent vectors and output a complex number. The formalism is exactly the same as the real-valued case. So, if $z=x+iy$, we literally have the equation $dz = dx + i dy$, meaning that if $z$ is the coordinate function on $\mathbb{C}$, with $x$ the real part of $z$ and $y$ the imaginary part of $z$, then $dz$, $dx$ and $dy$ are one forms which obey the relation $dz=dx+i dy$.
For any smooth function $f : \mathbb{C} \to \mathbb{C}$, we have $df = \tfrac{\partial f}{\partial z} dz + \tfrac{\partial f}{\partial \overline{z}} d\overline{z}$, where
$$\frac{\partial f}{\partial z} = \frac{1}{2} \left( \frac{\partial f}{\partial x} - i \frac{\partial f}{\partial y} \right) \ \mbox{and} \ \frac{\partial f}{\partial \overline{z}} = \frac{1}{2} \left( \frac{\partial f}{\partial x} + i \frac{\partial f}{\partial y} \right).$$
The Cauchy-Riemann equations tell us that $f$ is holomorphic if and only if $\tfrac{\partial f}{\partial x} + i \tfrac{\partial f}{\partial y}=0$, so $f$ is holomorphic if and only if $\overline{\partial}(f)=0$. In that case, $df = \partial f$. 
If $g$ is holomorphic, then $d \left( g\ dz \right) = dg \wedge dz = g'(z) dz \wedge dz = 0$. 
So, what does this mean for de Rham cohomology of open subsets of $\mathbb{C}$?  Let $g(z)$ be holomorphic. From the last paragraph above, $g dz$ is closed. By de Rham's theorem, $g dz$ will be exact if and only if $\oint_{\gamma} g=0$ for every closed path $\gamma$. 
Now, all that de Rham's theorem gives us is that $g dz = df$ for some smooth function $f$. But then we have $g dz = \tfrac{\partial f}{\partial z} dz + \tfrac{\partial f}{\partial \overline{z}} d \overline{z}$ so, comparing coefficients of $d \overline{z}$ on both sides, $\tfrac{\partial f}{\partial \overline{z}} =0$ and $f$ will actually be holomorphic.
So just using de Rham's theorem for (complex valued) $1$-forms, and good notation, immediately tells us the statement for holomorphic functions.
A much harder issue A much harder and more interesting question is whether the holomorphic analogue of the de Rham complex will compute cohomology. For some open region $U$ of $\mathbb{C}^n$, let $\Omega^p$ be the $p$-forms of the form $\sum g_{i_1 i_2 \cdots i_p}(z_1, \ldots, z_n) dz_{i_1} \wedge \cdots \wedge dz_{i_p}$, with $g_{i_1 \cdots i_p}$ holomorphic functions. Take the cohomology of the complex $0 \to \Omega^0 \to \Omega^1 \to \cdots \to \Omega^n \to 0$. There is always a map from this cohomology to de Rham, because every class is represented by a closed form, and we can consider that form as a de Rham class. But will that map be an isomorphism?  (In the first draft, I called this Dolbeault cohomology, but that's something else. No deep reason for the error, I just wasn't thinking.)
In general, the answer is no! For example, $\mathbb{C}^2 \setminus \{ (0,0) \}$ retracts onto the $3$-sphere, so it has nontrivial $H^3$, but the holomorphic complex only goes up to degree $2$. 
There is also a more subtle possible issue -- there are complex $3$-folds with holomorphic $3$-forms which are exact but are not the differential of a holomorphic $2$-form; see Cordero, Fernandez and Gray "The Frölicher spectral sequence and complex compact nilmanifolds".
But for open subsets of $\mathbb{C}$, the answer is yes! In general, the answer is yes for Stein spaces. If you are looking for motivation to get into the sort of harder multivariable complex analysis where the Stein condition comes up, this is a great starting point.
