# Differentiability in $\mathbb{R}^n$ and chain rule

I have a question:

Consider a function $g:\mathbb{R}^{n}\rightarrow \mathbb{R}$ is differentiable. Find the derivative of the function: $G(x)=[ g\left ( x,x^{2},...,x^{n} \right )]^{2}$ where $x\in \mathbb{R}$.

Here, G is a function of one variable, so I tried to apply the chain rule to find its derivative as follows: $G^{'}\left ( x \right )=2H^{'}\left ( x \right )H(x)$ where $H\left ( u_{1},u_{2},...,u_{n} \right )=g\left ( x,x^{2},...,x^{n} \right )$. Now to find the derivative of $H$, I did the following: $$\frac{d}{dx}H=\frac{\partial H}{\partial u_{1}}\frac{\partial u_{1}}{\partial x}+...\frac{\partial H}{\partial u_{n}}\frac{\partial u_{n}}{\partial x}.$$ Does what I did make sense?

-

– Zev Chonoles♦ Jan 29 '12 at 19:18
Provided one replaces $H(u_1,u_2,\ldots,u_n)$ by $H(x)$ and each $\partial H/\partial u_k$ by $\partial g/\partial u_k$, the answer is: yes. – Did Jan 29 '12 at 19:22
@ Zev Chonoles: Yes, I just mean simple brackets only. – pin296 Jan 29 '12 at 19:24
@pin296: Ah, I see that you actually did have brackets, but my browser was for some reason not displaying them correctly - apologies. – Zev Chonoles♦ Jan 29 '12 at 19:28
Here is my answer based on the above comments:  $G^{'}\left ( x \right )=2.g\left ( x,x^{2},...,x^{n} \right ).\left [ \frac{\partial g}{\partial u_{1}}.1+\frac{\partial g}{\partial u_{2}}.2x +...+nx^{n-1}.\frac{\partial g}{\partial u_{n}} \right ]$. where : $u_{i}=x^{i}$. I am not convinced to the presence of the variables $u_{i}=x^{i}$ in my final answer. Does anyone have a better idea on how to solve the problem? – pin296 Jan 29 '12 at 21:01

## 1 Answer

It's almost correct. You have a function $$u(\cdot):\quad {\mathbb R}\to{\mathbb R}^n\ ,\qquad x\mapsto u(x):=(x,x^2,\ldots, x^n)$$ and a second function $$g:\quad {\mathbb R}^n\to {\mathbb R}\ ,\qquad (u_1,\ldots, u_n)\mapsto g(u_1,\ldots, u_n)\ .$$ The real-valued function $H:x\mapsto H(x)$ is defined as the composition of the two: $$H(x)\ :=\ g\bigl(u(x)\bigr)\ .$$ By the chain rule the derivative of $H$ is given by $$H'(x)={\partial g\over\partial u_1} u_1'(x) +\ldots+ {\partial g\over\partial u_n} u_n'(x) =\nabla g\bigl(u(x)\bigr)\cdot u'(x)\ ,$$ where the $\cdot$ denotes the scalar product.

-

I think my final answer looks like yours: $G^{'}\left ( x \right )=2.g\left ( x,x^{2},...,x^{n} \right ).\left [ \frac{\partial g}{\partial u_{1}}.1+\frac{\partial g}{\partial u_{2}}.2x +...+nx^{n-1}.\frac{\partial g}{\partial u_{n}} \right ]$. Is my expression true? – pin296 Jan 29 '12 at 21:06
Your "final answer" is correct. You can write $g_k$ instead of ${\partial g\over\partial u_k}$ if you want to avoid the appearance of the letter $u$ "out of nowhere". – Christian Blatter Jan 30 '12 at 8:52
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 21, "mathjax_display_tex": 5, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9281069040298462, "perplexity_flag": "head"}