Edit page

Derivada da Função Composta em Rⁿ

Derivada da Função Composta em Rⁿ

DEFINIÇÃO

Seja g:D⊆Rn→Rmg: D \subseteq \R^n \to \R^m diferenciável em a∈Da \in D
Seja f:Rm→Rpf: \R^m \to \R^p diferenciável em g(a)g(a)

Então, f∘g:D⊆Rn→Rpf\circ g: D \subseteq \R^n \to \R^p é diferenciável em aa e

D(f∘g)(a)=Df(g(a))⋅Dg(a)D(f\circ g)(a)=Df(g(a))\cdot Dg(a)

Também podemos obter a Matriz Jacobiana de f∘g(a)f\circ g(a), Jaf∘gJ^{f\circ g}_{a}, visto que é o produto da jacobiana de ff em g(a)g(a), Jg(a)fJ^f_{g(a)} com a jacobiana de gg em aa, JagJ_a^g:

Jaf∘g=Jg(a)f⋅JagJ^{f\circ g}_{a} = J^f_{g(a)}\cdot J^g_a

Isto acontece porque a composta de transformações lineares corresponde ao produto de matrizes.

Exemplos

Considerando as funções gg e ff, determine J(1,1)f∘gJ^{f\circ g}_{(1,1)}.

g:R2→R2g(x,y)=(x2+1,y2)f:R2→R3f(u,v)=(u+v,u,v2)\begin{darray}{l l} g: \R^2 \to \R^2 & g(x,y)=(x^2+1,y^2)\\ f: \R^2 \to \R^3 & f(u,v)=(u+v, u, v^2) \end{darray}
g1(x,y)=x2+1g2(x,y)=y2f1(u,v)=u+vf2(u,v)=uf3(u,v)=v2\begin{array}{l l l} g_1(x,y)=x^2+1 & g_2(x,y)=y^2 &\\ f_1(u,v)=u+v & f_2(u,v)=u & f_3(u,v)=v^2 \end{array}
  • gg é diferenciável porque as componentes são funções polinomiais
  • ff é diferenciável porque as componentes são funções polinomiais
J(x,y)g=[∂g1∂x(x,y)∂g1∂y(x,y)∂g2∂x(x,y)∂g2∂y(x,y)]=[2x002y]J^{g}_{(x,y)} =\begin{bmatrix} \frac{\partial g_{1}}{\partial x} (x,y) & \frac{\partial g_{1}}{\partial y} (x,y)\\ \frac{\partial g_{2}}{\partial x} (x,y) & \frac{\partial g_{2}}{\partial y} (x,y) \end{bmatrix} =\begin{bmatrix} 2x & 0\\ 0 & 2y \end{bmatrix}
J(u,v)f=[∂f1∂u(u,v)∂f1∂v(u,v)∂f2∂u(u,v)∂f2∂v(u,v)∂f3∂u(u,v)∂f3∂v(u,v)]=[111002v]J^{f}_{(u,v)} =\begin{bmatrix} \frac{\partial f_{1}}{\partial u} (u,v) & \frac{\partial f_{1}}{\partial v} (u,v)\\ \frac{\partial f_{2}}{\partial u} (u,v) & \frac{\partial f_{2}}{\partial v} (u,v)\\ \frac{\partial f_{3}}{\partial u} (u,v) & \frac{\partial f_{3}}{\partial v} (u,v) \end{bmatrix} =\begin{bmatrix} 1 & 1\\ 1 & 0\\ 0 & 2v \end{bmatrix}

Então, através do produto matricial:

J(1,1)f∘g=Jg(1,1)f⋅J(1,1)g=J(12+1,12)f⋅J(1,1)g=J(2,1)f⋅J(1,1)g=[111002⋅1]⋅[2002]=[222004]\begin{aligned} J^{f\circ g}_{(1,1)} & =J^{f}_{g(1,1)} \cdot J^{g}_{(1,1)}\\ & =J^{f}_{(1^{2} +1,1^{2} )} \cdot J^{g}_{(1,1)}\\ & =J^{f}_{(2,1)} \cdot J^{g}_{(1,1)}\\ & =\begin{bmatrix} 1 & 1\\ 1 & 0\\ 0 & 2\cdot 1 \end{bmatrix} \cdot \begin{bmatrix} 2 & 0\\ 0 & 2 \end{bmatrix}\\ & =\begin{bmatrix} 2 & 2\\ 2 & 0\\ 0 & 4 \end{bmatrix} \end{aligned}

Seja f:R2→R3f(x,y)=(exy,x+y,y2)f: \R^2 \to \R^3 \quad f(x,y) = (e^{xy}, x+y,y^2), verifique se é diferenciável.

f1(x,y)=exyf2(x,y)=x+yf3(x,y)=y2\begin{array}{l l l} f_1(x,y)=e^{xy} & f_2(x,y)=x+y & f_3(x,y)=y^2 \end{array}
  • f1(x,y)=f12∘f11(x,y)f_1(x,y)=f^2_1\circ f^1_1(x,y) com:

    • f11(x,y)=xy=p1(x,y)⋅p2(x,y)f^1_1(x,y)=xy=p_1(x,y)\cdot p_2(x,y), um produto de funções diferenciáveis, logo diferenciável
    • f12(t)=etf^2_1(t)=e^t função diferenciável

    Então, f1(x,y)f_1(x,y) sendo a composta de duas funções diferenciáveis é diferenciável.

  • f2(x,y)=x+y=p1(x,y)+p2(x,y)f_2(x,y) = x+y = p_1(x,y) + p_2(x,y), uma soma de funções diferenciáveis, logo diferenciável

  • f3(x,y)=y2=(p2(x,y))2=p2(x,y)∘p2(x,y)f_3(x,y)= y^2=(p_2(x,y))^2 = p_2(x,y)\circ p_2(x,y), um produto de funções escalares diferenciáveis, logo diferenciável

Como cada uma das três funções componentes da ff são funções diferenciáveis então ff é diferenciável.

Considerando agora g:R3→R2g: \R^3 \to \R^2, diferenciável em (1,0,0)(1,0,0) e com

J(1,0,0)g=[−10252−2]J^{g}_{(1,0,0)} =\begin{bmatrix} -1 & 0 & 2\\ 5 & \sqrt{2} & -\sqrt{2} \end{bmatrix}

Calcule D(g∘f)(0,0)D(g\circ f)(0,0).

Como gg é diferenciável em (1,0,0)(1,0,0) e ff é diferenciável em f(0,0)=(1,0,0)f(0,0)=(1,0,0) então g∘fg\circ f é diferenciável em (0,0)(0,0). Portanto faz sentido calcular D(g∘f)(0,0)D(g\circ f)(0,0).

J(0,0)g∘f=J(1,0,0)g⋅J(0,0)f=[−10252−2][yexyxexy1102y](x,y)=(0,0)=[−10252−2][001100]=[0022]\begin{aligned} J^{g\circ f}_{(0,0)} & =J^{g}_{(1,0,0)} \cdot J^{f}_{(0,0)}\\ & =\begin{bmatrix} -1 & 0 & 2\\ 5 & \sqrt{2} & -\sqrt{2} \end{bmatrix}\begin{bmatrix} ye^{xy} & xe^{xy}\\ 1 & 1\\ 0 & 2y \end{bmatrix}_{( x,y) =( 0,0)}\\ & =\begin{bmatrix} -1 & 0 & 2\\ 5 & \sqrt{2} & -\sqrt{2} \end{bmatrix}\begin{bmatrix} 0 & 0\\ 1 & 1\\ 0 & 0 \end{bmatrix}\\ & =\begin{bmatrix} 0 & 0\\ \sqrt{2} & \sqrt{2} \end{bmatrix} \end{aligned}

Fórmula da Cadeia (Chain Rule)

Se pegarmos na expressão anterior, podemos obter a expressão que nos indica como calcular, individualmente, cada elemento da matriz Jf∘gaJ^{f\circ g}{a}.

[∂(f∘g)i∂xj(a)]j=1,…,n;i=1,…,p=[∂fi∂yk(g(a))]k=1,…,m;i=1,…,p⋅[∂gk∂xj(a)]k=1,…,m;j=1,…,n\left[\frac{\partial (f\circ g)_i}{\partial x_j}(a)\right]_{j = 1,\dots, n;\\ i = 1,\dots, p} = \left[\frac{\partial f_i}{\partial y_k}(g(a))\right]_{k = 1,\dots, m;\\ i = 1,\dots, p}\cdot \left[\frac{\partial g_k}{\partial x_j}(a)\right]_{k = 1,\dots, m;\\ j = 1,\dots, n}

Atendendo ao produto matricial, podemos obter uma expressão mais simples:

DEFINIÇÃO

Seja g:D⊆Rn→Rmg: D \subseteq \R^n \to \R^m diferenciável em a∈Da \in D
Seja f:Rm→Rpf: \R^m \to \R^p diferenciável em g(a)g(a)

∂(f∘g)i∂xj(a)=∑k=1m∂fi∂yk(g(a))⋅∂gk∂xj(a)\frac{\partial (f\circ g)_i}{\partial x_j}(a)=\sum^m_{k=1} \frac{\partial f_i}{\partial y_k}(g(a))\cdot \frac{\partial g_k}{\partial x_j}(a)
Exemplos

Sejam ff e gg, diferenciáveis,

f:R3→R3f(x,y,z)=(x2+y2+z2,x+y−z,xyez)g:R3→Rg(u,v,w)=u2−v2+ew\begin{array}{l l} f:\R^3 \to \R^3 & f(x,y,z) = (x^2+y^2+z^2, x+y-z, xye^z)\\ g: \R^3 \to \R & g(u,v,w) = u^2-v^2+e^w \end{array}
∂(g∘f)∂y(x,y,z)==∂g∂u(f(x,y,z))∂f1∂y(x,y,z)+∂g∂v(f(x,y,z))∂f2∂y(x,y,z)+∂g∂w(f(x,y,z))∂f3∂y(x,y,z)=2u∣(u,v,w)=f(x,y,z)⋅2y∣(x,y,z)+(−2v)∣(u,v,w)=f(x,y,z)⋅1+ew∣(u,v,w)=f(x,y,z)⋅xez∣(x,y,z)=2(x2+y2+z2)⋅2y−2(x+y−z)+exyez⋅xez=4y(x2+y2+z2)−2(x+y−z)+xez⋅exyez\begin{darray}{ l } \frac{\partial (g\circ f)}{\partial y} (x,y,z)=\\ \\ =\frac{\partial g}{\partial u} (f(x,y,z))\frac{\partial f_{1}}{\partial y} (x,y,z)+\frac{\partial g}{\partial v} (f(x,y,z))\frac{\partial f_{2}}{\partial y} (x,y,z)\\ +\frac{\partial g}{\partial w} (f(x,y,z))\frac{\partial f_{3}}{\partial y} (x,y,z)\\ \\ =2u\Bigl|_{(u,v,w)=f(x,y,z)} \cdot 2y\Bigl|_{(x,y,z)} +(-2v)\Bigl|_{(u,v,w)=f(x,y,z)} \cdot 1+e^{w}\Bigl|_{(u,v,w)=f(x,y,z)} \cdot xe^{z}\Bigl|_{(x,y,z)}\\ \\ =2(x^{2} +y^{2} +z^{2} )\cdot 2y-2(x+y-z)+e^{xye^{z}} \cdot xe^{z}\\ \\ =4y(x^{2} +y^{2} +z^{2} )-2(x+y-z)+xe^{z} \cdot e^{xye^{z}} \end{darray}

Slides: