It is immediate that the partial derivative is zero by definition. I tried to point this out for OP, but he doesn't seem to think so. I can't figure out if he has not tried effectively enough, or if I am being dismissive. The fact that an answer addresses the problem in an indirect way via chain rule also weighs on me to try to give the more direct answer, in contrast.
@AloizioMacedo Even after the party is over (answer accepted and all), I would not know what the OP understood from the math question they asked, and what they are still missing. To wit, they seem determined to stay with the approach in their Edit, which is neither the most natural nor the most direct, whatever others are explaining to them. To step in in such situations is to run the risk of getting involved in non productive, ultimately frustrating, exchanges. So, my take on this would be ...
... to wait for the OP, on this page or on others, to demonstrate that they are open to approaches explained to them, different from the unique one they had in mind at the start. Just my two cents. (Note: And I wish I would be wise enough to always follow this advice for myself, but...)
@Did That seems very good advice. Thanks. I've browsed through other questions by the user, but I don't think I was able to reach anything conclusive. I'll refrain from answering, since I think the answer would be most useful to him only and not of relevant content for the community, and as you say it may not be so useful to him after all.