finding a derivative using chain rule

80 Views Asked by At

suppose $g,f\in \mathcal{C}^2,:\mathbb{R} \rightarrow \mathbb{R}$ define $u(x,y)=xf(x+y)+y*g(x+y)+xy$
cumpute $$u_{xx}-2u_{xy}+u_{yy}$$

I think im having some problems with the notation of the chain rule because of that (x+y) i've managed to show that

  1. $u_{xx}=2f_x+xf_{xx}+yg_{xx}$
  2. $u_{yy}=2g_y+yg_{yy}+xf_{yy}$
  3. $u_{xy}=f_y+xf_{xy}+yg_{xy}+g_x+1$ but nothing cancels out so I'm pretty sure I have a problem with the notation
2

There are 2 best solutions below

2
On

The notation $f_x$ is not correct since $f$ is a one variable function. Indeed, the partial derivatives of the composition $h(x,y)=f(t)\circ (x+y)$ are $$\frac{\partial f(x+y)}{\partial x}=f'(t)\circ (x+y)\cdot 1=f'(x+y)=h_x,\,\frac{\partial f(x+y)}{\partial y}=f'(t)\circ (x+y)\cdot 1=f'(x+y)=h_y,$$ same for $g$. Then $h_x=h_y$, $h_{xx}=h_{yy}=h_{xy}$, and the same holds for the composition $g(t)\circ (x+y) $, then from your calculations (but now with the correct notations) we have $$u_{xx}-2u_{xy}+u_{yy}=2f'+xf''+yg''+2g'+yg''+xf''-2f'-2xf''-2yg''-2g'-2=-2.$$

0
On

OPs derivation is fine. The usage of $f_x,f_y, g_x, g_y$ is adequate, since we consider $f(x+y), g(x+y)$ as functions in two independent variables $x$ and $y$.

Here we calculate the derivatives and look at a small example as plausibility check.

We consider a function $u$ \begin{align*} &\color{blue}{u:\mathbb{R}^2\to\mathbb{R}}\\ &\color{blue}{u(x,y)=xf(x+y)+yg(x+y)+xy}\tag{1} \end{align*} and functions $f,g$ \begin{align*} &\color{blue}{f:\mathbb{R}\to\mathbb{R}}&\color{blue}{g:\mathbb{R}\to\mathbb{R}}\tag{2}\\ &\color{blue}{f(z)=z^3}&\color{blue}{g(z)=\frac{z}{2}}\\ \end{align*}

At first we calculate $u_x,u_y,u_{xx},u_{xy},u_{uu}$ from (1). We use some parentheses that are not necessary, but they can help to better understand the derivations.

We obtain using a compact notation \begin{align*} u_x&=\left(f+xf_x\right)+\left(yg_x\right)+y\\ u_y&=\left(xf_y\right)+\left(1\cdot g+yg_y\right)+x\\ \\ \color{blue}{u_{xx}}&=f_x+\left(1\cdot f_x+xf_{xx}\right)+\left(yg_{xx}\right)\\ &\,\,\color{blue}{=2f_x+xf_{xx}+yg_{xx}}\tag{3.1}\\ \color{blue}{u_{xy}}&=f_y+xf_{xy}+\left(1\cdot g_x+yg_{xy}\right)+1\\ &\,\,\color{blue}{=1+f_y+g_x+xf_{xy}+yg_{xy}}\tag{3.2}\\ \color{blue}{u_{yy}}&=\left(x_{yy}\right)+\left(g_y+\left(1\cdot g_y+yg_{yy}\right)\right)\\ &\,\,\color{blue}{=2g_y+xf_{yy}+yg_{yy}}\tag{3.3} \end{align*} and observe we get the same result as OP.

Example: Now we calculate as small plausibility check the partial derivatives from $u=u(x,y)$ using $f,g$ as specified in (2). We obtain \begin{align*} \color{blue}{u(x,y)}&=xf(x+y)+yg(x+y)+xy\\ &=x(x+y)^3+y\frac{1}{2}(x+y)+xy\\ &\,\,\color{blue}{=x^4+3x^3y+3x^2y^2+xy^3+\frac{3}{2}xy+\frac{1}{2}y^2}\tag{4.1} \end{align*} We calculate the partial derivatives from (4.1) and obtain \begin{align*} u_x(x,y)&=4x^3+9x^2y+6xy^2+y^3+\frac{3}{2}y\\ u_y(x,y)&=3x^3+3y+6x^2y+3xy^2+\frac{3}{2}x+y\\ \\ \color{blue}{u_{xx}(x,y)}&\color{blue}{=12x^2+18xy+6y^2}\tag{5.1}\\ \color{blue}{u_{xy}(x,y)}&\color{blue}{=9x^2+12xy+3y^2+\frac{3}{2}}\tag{5.2}\\ \color{blue}{u_{yx}(x,y)}&\color{blue}{=9x^2+12xy+3y^2+\frac{3}{2}}=u_{xy}(x,y)\\ \color{blue}{u_{yy}(x,y)}&\color{blue}{=6x^2+6xy+1}\tag{5.3} \end{align*} Now we calculate $u_{xx}, u_{xy}$ and $u_{yy}$ using formulas (3.1) to (3.3). We obtain this time using full notation \begin{align*} \color{blue}{u_{xx}(x,y)}&=2f_x(x+y)+xf_{xx}(x+y)+yg_{xx}(x+y)\\ &=2\frac{\partial}{\partial x}(x+y)^3+x\frac{\partial^2}{\partial x^2}(x+y)^3+y\frac{\partial^2}{\partial x^2}\left(\frac{x+y}{2}\right)\\ &=2\cdot 3(x+y)^2+x\frac{\partial}{\partial x}\left(3(x+y)^2\right)+y\frac{\partial}{\partial x}\left(\frac{1}{2}\right)\\ &=6x^2+12xy+6y^2+3x\cdot2(x+y)\\ &\,\,\color{blue}{=12x^2+18xy+6y^2}\tag{$\to (5.1)$}\\ \\ \color{blue}{u_{xy}(x,y)}&=1+f_y(x+y)+g_x(x+y)+xf_{xy}(x+y)+yg_{xy}(x+y)\\ &=1+\frac{\partial}{\partial y}(x+y)^3+\frac{\partial}{\partial x}\left(\frac{x+y}{2}\right)\\ &\qquad+x\frac{\partial^2}{\partial x\partial y}(x+y)^3+y\frac{\partial^2}{\partial x\partial y}\left(\frac{x+y}{2}\right)\\ &=1+3(x+y)^2+\frac{1}{2}+x\frac{\partial}{\partial x}\left(3(x+y)^2\right)+y\frac{\partial}{\partial x}\left(\frac{1}{2}\right)\\ &=\frac{3}{2}+3x^2+6xy+3y^2+3x\cdot 2(x+y)\\ &\,\,\color{blue}{=\frac{3}{2}+9x^2+12xy+3y^2}\tag{$\to (5.2)$}\\ \\ \color{blue}{u_{yy}(x,y)}&=2g_y(x+y)+xf_{yy}(x+y)+yg_{yy}(x+y)\\ &=2\frac{\partial}{\partial y}\left(\frac{x+y}{2}\right)+x\frac{\partial^2}{\partial y^2}(x+y)^3 +y\frac{\partial^2}{\partial y^2}\left(\frac{x+y}{2}\right)\\ &=2\left(\frac{1}{2}\right)+x\frac{\partial}{\partial y}\left(3(x+y)^2\right)+y\frac{\partial}{\partial y}\left(\frac{1}{2}\right)\\ &=1+3x\cdot 2(x+y)\\ &\,\,\color{blue}{=1+6x^2+6xy}\tag{$\to (5.3)$} \end{align*} and get the same results as in (5.1) to (5.3).