# How to calculate partial derivatives of $f(x+iy)=x^2-y^2 + 5xi$ using limits

Let $f(x+iy)=x^2-y^2 + 5xi$. So hence $u(x,y)=x^2-y^2$ and $v(x,y)=5x$

In my notes it calculated $\frac{\partial u}{\partial x}$ at $0$ as follows:

$\frac{\partial u}{\partial x}(0,0)=\displaystyle\lim_{h\rightarrow 0}\frac{u(x+h,y)-u(x,y)}{h} \\=\displaystyle\lim_{h\rightarrow 0}\frac{u(h,0)-u(0,0)}{h}\\=\displaystyle\lim_{h\rightarrow 0}\frac{h^2}{h}=\displaystyle\lim_{h\rightarrow 0}h=0$

But is it possible to calculate $\frac{\partial u}{\partial x}$ at $0$ by just finding that $\frac{\partial u}{\partial x} = 2x$, and then substituting $x=0,y=0$ and thus getting $\frac{\partial u}{\partial x}=0$?

If so, it seems easier that way rather than taking limits as above.

-
Yes, it is possible to use the result $\frac{\partial u}{\partial x}$ and do the substitution. The results will be the same since $u$ is differentiable. – Sasha May 24 '12 at 17:30
Thanks @Sasha , but is there any advantage or reason as to why one would use $\frac{\partial u}{\partial x}(0,0)=\displaystyle\lim_{h\rightarrow 0}\frac{u(x+h,y)-u(x,y)}{h}$ instead of just calculting $\frac{\partial u}{\partial x}$? – Derrick May 24 '12 at 17:36
The limit you wrote is the definition of $\frac{\partial u}{\partial x}(x,y)$, not of $\frac{\partial u}{\partial x}(0,0)$. The definition of the latter is $\lim_{h \to 0} \frac{ u(0+h,0) -u(0,0)}{h}$. – Sasha May 24 '12 at 17:40
@Sasha , Whoops sorry, my bad. I meant, is there any advantage/reason to use $\frac{\partial u}{\partial x}(x,y)=\displaystyle\lim_{h\rightarrow 0}\frac{u(x+h,y)-u(x,y)}{h}$ instead of calculating $\frac{\partial u}{\partial x}$? – Derrick May 24 '12 at 17:48
If you can obtain $\frac{\partial u}{\partial x}$ algebraically, it is a preferred way, otherwise, the definition in terms of the limit may be used to work out the result from the first principles. – Sasha May 24 '12 at 18:01

There are situations where the derivative rules do not apply, but the derivative nonetheless exists. For example, $$f(x)= \begin{cases} x^2\sin(1/x) \quad & x\ne 0 \\ 0 & x=0 \end{cases}$$ has $f'(0)=0$, although derivative rules do not apply at $0$. Such examples occur with complex numbers as well.