# chain rule-implicit function therem

I need help on the following problem:

Let $f\in C^{1}(\mathbb{R}^{2})$. It is given that $f(1,1)=1$ and $\triangledown f(1,1)=(a,b)$. Let: $\psi (x)=f(x,f(x,f(x,x)))$. Find $\psi (1)$ and $\psi ^{'}(1)$.

The easiest part is : $\psi (1)=1$. Now I am stuck what to use to find $\psi ^{'}(1)$. I tried the following: $\psi (x)=f(x,y)$ where $y=f(x,z)$ and $z=f(x,x)$ and then I used the chain rule: $\psi^{'} (x)=\frac{\partial f}{\partial x}.\frac{\partial x}{\partial x}+\frac{\partial f}{\partial y}.\frac{\partial y}{\partial x}$, so $\psi^{'} (1)=\frac{\partial f}{\partial x}(1,1)+\frac{\partial f}{\partial y}(1,1).\frac{\partial y}{\partial x}(1,1)=f_{1}(1,1)+f_{2}(1,1).y^{'}(1)=a+by^{'}(1)$.

Now $y(x)=f(x,f(x,x))=f(x,z(x))$ where $z(x)=f(x,x)$. so $y^{'}(x)=f_{1}+f_{2}.\frac{\partial z}{\partial x}$ and then $y^{'}(1)=f_{1}(1,1)+f_{2}(1,1).z^{'}(1)=a+bz^{'}(1)$. Now: $z(x)=f(x,x)$ and it follows $z^{'}(x)=f_{1}+f_{2}$ and then $z^{'}(1)=f_{1}(1,1)+f_{2}(1,1)=a+b$.

In the end $\psi^{'} (1)=a+b\left [ a+b(a+b) \right ]$

I am not even sure if what I did makes sense or whether it is correct. Please let me know if my answer is wrong and please write down the right one. Also, if you have any easiest method, please share.

-