# The origins of complex differentiation/integration

What questions led to the invention of complex differentiation/integration? How were their definitions agreed upon?
Real differentiation/integration has an obvious meaning. To extend calculus to the complex numbers, why would this be done, is it even meaningful to call it 'differentiation'/'integration'?

There is no difference in differentiation. Derivative of a complex function of a complex variable is defined by the same formula $$f'(z)=\lim_{h\to 0} (f(z+h)-f(z))/h$$ as for the real variable. Concerning integration, one reason was the desire to investigate integrals of real functions. One of the consequences (and motivations) of Cauchy theory is that it evaluates integrals of real functions on real intervals by manipulating with integrals in the complex domain.
But there is a more important and more profound reason. Many equations (differential and functional) can be solved in the form of power series. This was essentially discovered by Newton, and he considered this his main discovery in Calculus. A power series, if it converges anywhere except $x=0$, converges in a disk in the complex plane, and it is impossible to understand its properties while staying in the real domain only. This is the most important motivation of extending Calculus to complex domain.
Here is a simple example: we have a power series expansion $$f(x)=\frac{1}{1+x^2}=1-x^2+x^4-x^6+\ldots.$$ It converges in the real domain for $-1<x<1$ only. But the left hand side $f(x)=1/(1+x^2)$ is a nice function on the whole real line. By looking at this function on the real line only it is impossible to understand what happens at $\pm 1$, why the series suddenly stops to converge.