# Chain Rule Question

1. Feb 7, 2013

### Contingency

1. The problem statement, all variables and given/known data
$g:ℝ^{ 2 }\rightarrow ℝ$ is everywhere differentiable.
For all (x,y) and for all t: $g\left( tx,ty \right) =tg\left( x,y \right)$.
Prove $g$ is linear (that there exist constants A, B such that for all (x,y): $g\left( x,y \right) =Ax+By$ .
I think my solution is correct, but the solution given after the problem is different. I'd like to know where i'm wrong and why!

2. Relevant equations
$g\left( tx,ty \right) =tg\left( x,y \right)$
Chain rule

3. The attempt at a solution
Define $f\left( x,y,t \right) =g\left( tx,ty \right)$.
We then have $f\left( x,y,t \right) =g\left( tx,ty \right) =tg\left( x,y \right)$.
Define $u\left( x,t \right) =tx,\quad v\left( x,y \right) =ty$.
By the chain rule: $\frac { \partial f }{ \partial t } =\frac { \partial g(u,v) }{ \partial u } \frac { \partial u(x,t) }{ \partial t } +\frac { \partial g(u,v) }{ \partial v } \frac { \partial v(y,t) }{ \partial t } =g(x,y)$
$\Leftrightarrow\quad \frac { \partial f }{ \partial t } =\frac { \partial g(u,v) }{ \partial u } x+\frac { \partial g(u,v) }{ \partial v } y=g\left( x,y \right)$. This holds for any (x,y) and t.
Now choose $t=0\quad \Rightarrow \quad { \frac { \partial f(x,y,t) }{ \partial t } }_{ (x,y,0) }={ \frac { \partial g(u,v) }{ \partial u } }_{ (0,0) }x+{ \frac { \partial g(u,v) }{ \partial v } }_{ (0,0) }y=g\left( x,y \right)$, but ${ \frac { \partial g(u,v) }{ \partial u } }_{ (0,0) },{ \frac { \partial g(u,v) }{ \partial v } }_{ (0,0) }$ are constants, so we have found proper A,B and therefore the function is linear.

The problem is that in the solution, the differentiation process was different and I have no idea why.. It doesn't make sense. Here's an exact copy of what's written there (u,v are defined the same way):
... By the chain rule: $\frac { \partial f }{ \partial t } =\frac { \partial g(u,v) }{ \partial x } \frac { \partial u(x,t) }{ \partial t } +\frac { \partial g(u,v) }{ \partial y } \frac { \partial v(y,t) }{ \partial t } =g(x,y)$
$\Leftrightarrow \quad \frac { \partial f }{ \partial t } =\frac { \partial g(u,v) }{ \partial x } x+\frac { \partial g(u,v) }{ \partial y } y=g\left( x,y \right)$
$...=\frac { \partial f }{ \partial t } =\frac { \partial g(xt,yt) }{ \partial x } x+\frac { \partial g(xt,yt) }{ \partial y } y=g\left( x,y \right)$. Then they choose t=0 and arrive at:
${ g }_{ x }(0,0)x+{ g }_{ y }(0,0)y=g\left( x,y \right)$ where ${ g }_{ x }(0,0),\quad { g }_{ y }(0,0)$ are constants.
I don't understand the differentiation process in the solution, and it's really confusing me.
Please let me know where the mistake is!
Thanks!!

Last edited: Feb 7, 2013
2. Feb 7, 2013

### Dick

I don't think there's any mistake in your work. You presented the solution much better than they did. They were simply being really sloppy about the notation and variables.

3. Feb 8, 2013

### Fredrik

Staff Emeritus
The only difference between the two solutions you posted is that in the first one, the partial derivatives with respect to the first and second variables are denoted by $\partial/\partial u$ and $\partial/\partial v$ respectively, and in the second one, the same partial derivatives are denoted by $\partial/\partial x$ and $\partial/\partial y$. I prefer notations that don't mention the symbols that we intend to insert into the two variable "slots" of g, notations like $D_ig(tx,ty)$ or $g_{,i}(tx,ty)$, where i is of course either 1 or 2.

On the other hand, I don't have a problem with notations like
$$\frac{d}{dt}g(tx,ty)$$ because here the d/dt tells us something. This notation means "the value at t of the derivative of the function $s\mapsto g(sx,sy)$". The notation
$$\frac{d}{dt}\!\bigg|_0 g(tx,ty)$$ means "the value at 0 of the derivative of the function $s\mapsto g(sx,sy)$". In both cases, the t's tell us what function to take the derivative of, and in the first case, it also tells us at what point in its domain to evaluate the derivative (which is another function). Since you have already solved the problem, I can show you how I would do this:

For all $x,y\in\mathbb R$, we have
$$\frac{d}{dt}\!\bigg|_0 g(tx,ty)=D_1g(tx,ty)\frac{d}{dt}\!\bigg|_0 tx +D_2g(tx,ty)\frac{d}{dt}\!\bigg|_0 ty=D_1g(0,0)x +D_2g(0,0)y$$ and
$$\frac{d}{dt}\!\bigg|_0 tg(x,y)=g(x,y).$$
Since $g(tx,ty)=tg(x,y)$ for all $t,x,y\in\mathbb R$, the two left-hand sides above are equal. So
$$g(x,y)=D_1g(0,0)x +D_2g(0,0)y.$$ Done-diddly-done.

I would also recommend against writing strings of equalities like
$$\frac { \partial f }{ \partial t } =\frac { \partial g(u,v) }{ \partial u } \frac { \partial u(x,t) }{ \partial t } +\frac { \partial g(u,v) }{ \partial v } \frac { \partial v(y,t) }{ \partial t } =g(x,y)$$ where the third expression is easily seen to be equal to the first, but not so easily seen to be equal to the one in the middle. It's easier to understand what you're doing if you just change the order:
$$g(x,y)=\frac { \partial f }{ \partial t } =\frac { \partial g(u,v) }{ \partial u } \frac { \partial u(x,t) }{ \partial t } +\frac { \partial g(u,v) }{ \partial v } \frac { \partial v(y,t) }{ \partial t }.$$