So I previously made a post Showing a complex function is NOT holomorphic
I am needing to ask about if my methods are correct, and I also have a few general questions that are easiest to ask with an example. So I have a few equations and I want to show they are holomorphic, however, in the examples and solutions provided, I am confused.
I have in my notes for example, show $g(z)=\sin(z)-\frac{z^2}{z+1}$ is holomorphic.
So, I thought I would have to write everything in terms of x and y and do partial derivatives to check Cauchy Riemann. But then I also have in my notes that if g has a derivative everywhere then it is holomorphic. So the solution given was simply, it is holomorphic for $z \neq -1$ because $$g'(z)=cos(z)-\frac{(z+1)(2z)-(z^2)}{(z+1)^{2}}$$
Consider,
$$f(z)=\frac{\cos(z)}{z^2+1}$$
and say we wanted to show it was holomorphic. Is really all I have to do is say $$f'(z)=\frac{(z^2+1)(-\sin(z))-(\cos(z))(2z)}{(z^2+1)^2}$$
Just doing it for the first time it feels like I must be wrong because it almost seems to easy. Is there something I am not realizing?