a) Intuitively, I calculate the derivative using the definition, but I'm not sure why(?) I should do this.

Which is the same as without applying the definition. Was it necessary to apply the definition? When is it that we can apply "normal" derivation methods?

I think it's because the function is given by parts and we don't know if the derivative exists, but correct me if I'm wrong.

b) Because the function is given by polinomials which are continuous, and it's continuous at x=4, I apply the definition to see if it's differentiable there. If it's differentiable:

when

But I don't know how to apply this directly.

With this formula i should find where does tend to. I read the demonstration that it tends to 0 when :

by definition gives me

Replacing,

which if expanded leads to a mess really... (I can't expand it because it doesn't fit)

What should I do now? I know I have to somehow use inecuations and modules but I can't figure out how to proceed.

Also, if someone could check the formulas used, it would be of great help because I'm not sure they're correct.

There's also a theorem that says that if are continuous, then f is differentiable at .

Having calculated both derivatives and knowing they're continuous, do I have to prove differentiability by definition? Aren't there functions in which the theorem does not work or I didn't understand what my teacher said?

That is only correct if h>0. If h<0 then 4+h<4, and . You have calculated the limit when from above (through positive values). You need to check that this is the same as the limit when from below. If these two limits are different then is not defined.