Edit page

Derivada de Ordem Superior. Extremos

Derivada de Ordem Superior

A derivada de ordem superior de uma função é simplesmente a derivada da derivada.
Por exemplo, podemos representar a derivada parcial de segunda ordem de ff segundo xix_i e xjx_j da seguinte forma:

∂2f∂x1∂xj=∂∂xi(∂f∂xj)\frac{\partial^2f}{\partial x_1 \partial x_j} = \frac{\partial}{\partial x_i}\left(\frac{\partial f}{\partial x_j}\right)

DEFINIÇÃO

f:Rn→Rf: \R^n \to \R diz-se de classe CkC^k se cada uma das derivadas parciais de ordem k

∂kf∂x1…∂xd\frac{\partial^k f}{\partial x_1 \dots \partial x_d}

(os índices podem-se repetir) existir e for função contínua.

Exemplo

Seja ff, uma função diferenciável em qualquer ponto do seu domínio.

f(x,y)=x2y+xy3=p1(x,y)2p2(x,y)+p1(x,y)p2(x,y)3f(x,y)=x^2y+xy^3=p_1(x,y)^2 p_2(x,y) + p_1(x,y)p_2(x,y)^3

∂f∂x(x,y)=∂∂x(x2y+xy3)=y⋅2x+y3⋅1=2xy+y3\frac{\partial f}{\partial x}(x,y)=\frac{\partial}{\partial x}(x^2y+xy^3)=y\cdot 2x + y^3 \cdot 1 = 2xy+y^3 ∂f∂y(x,y)=∂∂y(x2y+xy3)=x2+3xy2\frac{\partial f}{\partial y}(x,y)=\frac{\partial}{\partial y}(x^2y+xy^3)=x^2+3xy^2

∂2f∂x2(x,y)=∂∂x(2xy+y3)=2y\frac{\partial^2 f}{\partial x^2}(x,y)=\frac{\partial}{\partial x}(2xy+y^3)=2y ∂2f∂y∂x(x,y)=∂∂y(2xy+y3)=2x+3y2\frac{\partial^2 f}{\partial y \partial x}(x,y)=\frac{\partial}{\partial y}(2xy+y^3)=2x+3y^2 ∂2f∂y2(x,y)=∂∂x(x2+3xy2)=6xy\frac{\partial^2 f}{\partial y^2}(x,y)=\frac{\partial}{\partial x}(x^2+3xy^2)=6xy ∂2f∂x∂y(x,y)=∂∂x(x2+3xy2)=2x+3y2\frac{\partial^2 f}{\partial x \partial y}(x,y)=\frac{\partial}{\partial x}(x^2+3xy^2)=2x+3y^2

Teorema de Schwarz

Este teorema mostra-nos que a ordem por que derivamos não é importante. Se derivarmos uma função segundo xx e de seguida derivarmos esse resultado segundo yy, vamos obter o mesmo resultado se derivarmos segundo yy e depois xx.

DEFINIÇÃO

Seja f∈C2f \in C^2, então

∂2f∂xi∂xj=∂2f∂xj∂xi\frac{\partial ^2 f}{\partial x_i \partial x_j} = \frac{\partial^2 f}{\partial x_j \partial x_i}

Fórmula de Taylor

Recordar de CDI 1

Seja f:R→Rf: \R \to \R , CkC^k tem-se

f(x+h)=f(a)+f′(a)h+12!f′′(a)h2+⋯+1k!f(k)(a)hk+Rk(a,h)f(x+h)=f(a)+f'(a)h+\frac{1}{2!}f''(a)h^2 + \dots + \frac{1}{k!}f^{(k)}(a) h^k + R_k(a,h)

com lim⁡h→0Rk(a,h)hk=0\lim_{h\to 0} \frac{R_k(a,h)}{h^k}=0

Também tínhamos restos, por exemplo o resto de Lagrange:

Rk(a,h)=f(k+1)(a+ϵh)hk+1(k+1)!,0<ϵ<1R_k(a,h)=\frac{f^{(k+1)}(a+\epsilon h) h^{k+1}}{(k+1)!}, 0 < \epsilon < 1

Para dimensões superiores a 1

DEFINIÇÃO

Seja f:Rn→Rf: \R^n \to \R, ff é Cn+1C^{n+1}, e sejam a∈Rna \in \R^n e v∈Rnv \in \R^n
Seja g:R→Rg: \R \to \R, Ck+1C^{k+1}, tal que g(t)=f(a+tv)g(t) = f(a+tv).

Então, a fórmula de taylor em gg e em t=0t = 0 de ordem kk é representada pela expressão:

g(t)=g(0)+g′(0)t+12!g′′(0)t2+⋯+g(k)(0)k!tk+Rk(t)g(t)=g(0)+g'(0)t+\frac{1}{2!}g''(0)t^2 + \dots + \frac{g^{(k)}(0)}{k!}t^k + R_k(t)

Tentando agora obter os valores para as derivadas de gg para t=0t=0:

  • g(0)=f(a+0⋅v)=f(0)g(0)=f(a+0\cdot v)=f(0)
  • g′(0)=∇f(a+tv)⋅v∣t=0=∇f(a)⋅v=∑i=1n∂f∂xi(a)vi\displaystyle g'(0) = \nabla f(a+tv)\cdot v \big|_{t=0} = \nabla f(a)\cdot v = \sum^n_{i=1} \frac{\partial f}{\partial x_i}(a)v_i
  • g′′(t)=∑i,j=1n∂2f∂xj∂xy(a+tvi)vivj\displaystyle g''(t)=\sum_{i,j=1}^n \frac{\partial^2 f}{\partial x_j \partial x_y}(a+tv_i)v_i v_j
  • g′′(0)=∑i,j=1n∂2f∂xj∂xy(a)vivj\displaystyle g''(0) = \sum_{i,j=1}^n \frac{\partial^2 f}{\partial x_j \partial x_y}(a)v_i v_j

Então, podemos obter a Fórmula de Taylor de ff até à segunda ordem:

f(a+tv)=f(a)+∇f(a)⋅tv+12∑i,j=1n∂2f∂xi∂xj(a)⋅(tvi)⋅(tvj)+R2(t)f(a+tv)=f(a)+\nabla f(a)\cdot tv + \frac{1}{2} \sum^n_{i,j=1} \frac{\partial^2 f}{\partial x_i \partial x_j} (a)\cdot (tv_i)\cdot(tv_j)+ R_2(t)

Se assumirmos h=tvh = tv, ∣∣v∣∣=1||v||=1, obtemos a definição da Fórmula de Taylor de 2ª ordem:

DEFINIÇÃO

Sejam f:Rn→Rf: \R^n \to \R de classe C3C^3, h=tvh = tv e ∣∣v∣∣=1||v||=1, podemos obter a Fórmula de Taylor de ff de 2ª ordem pela expressão:

f(a+h)=f(a)+∇f(a)⋅h+12⋅∑i,j=1n∂2f∂xi∂xj(a)⋅hi⋅hj+R2(t)f(a+h)=f(a)+\nabla f(a)\cdot h + \frac{1}{2} \cdot \sum_{i,j=1}^n \frac{\partial^2 f}{\partial x_i \partial x_j} (a)\cdot h_i\cdot h_j+ R_2(t)

com lim⁡h→0⃗R2(h)∣∣h∣∣2=0⃗\displaystyle \lim_{h\to \vec 0}\frac{R_2(h)}{||h||^2}=\vec 0

Matriz Hessiana

Pode-se reescrever a expressão da Fórmula de Taylor de 2ª ordem da seguinte forma:

f(a+h)=f(a)+∇f(a)⋅h+12(h1h2…hn)⋅Hf(a)⋅(h1h2⋮hn)+R2(h)f(a+h)=f(a)+\nabla f(a)\cdot h+\frac{1}{2}\begin{pmatrix} h_{1} & h_{2} & \dotsc & h_{n} \end{pmatrix} \cdot Hf(a)\cdot \begin{pmatrix} h_{1}\\ h_{2}\\ \vdots \\ h_{n} \end{pmatrix} + R_2(h)

ou ainda

f(a+h)=f(a)+∇f(a)⋅h+12hTHf(a)h+R2(h)f(a+h)=f(a)+\nabla f(a)\cdot h + \frac 12 h^T H_f(a)h + R_2(h)

com lim⁡h→0⃗R2(h)∣∣h∣∣2=0⃗\lim_{h \to \vec 0} \frac{R_2(h)}{||h||^2}=\vec 0
em que Hf(a)Hf(a) é a matriz Hessiana de ff em aa, que é uma matriz simétrica pelo Teorema de Schwarz.

Hf(a)=[∂2f∂x12∂2f∂x2∂x1…∂2f∂xn∂x1∂2f∂x1∂x2∂2f∂x22…∂2f∂x2∂x1⋮⋮⋱⋮∂2f∂x1∂xn∂2f∂x2∂xn…∂2f∂xn2]Hf( a) =\begin{bmatrix} \frac{\partial ^{2} f}{\partial x^{2}_{1}} & \frac{\partial ^{2} f}{\partial x_{2} \partial x_{1}} & \dotsc & \frac{\partial ^{2} f}{\partial x_{n} \partial x_{1}}\\ \frac{\partial ^{2} f}{\partial x_{1} \partial x_{2}} & \frac{\partial ^{2} f}{\partial x^{2}_{2}} & \dotsc & \frac{\partial ^{2} f}{\partial x_{2} \partial x_{1}}\\ \vdots & \vdots & \ddots & \vdots \\ \frac{\partial ^{2} f}{\partial x_{1} \partial x_{n}} & \frac{\partial ^{2} f}{\partial x_{2} \partial x_{n}} & \dotsc & \frac{\partial ^{2} f}{\partial x^{2}_{n}} \end{bmatrix}
Exemplos de Polinómios de Taylor de 2ª ordem

Escrever o polinómio de Taylor de 2ª ordem da função f(x,y)=ex−eyf(x,y) = e^x - e^y em torno da origem, a=(0,0)a=(0,0)

Começamos por ver se é diferenciável. Como f(x,y)=ep1(x,y)−ep2(x,y)f(x,y)=e^{p_1(x,y)}-e^{p_2(x,y)} é diferenciável.

O primeiro passo é obter o gradiente de ff, ∇f(0,0)\nabla f(0,0).

∂f∂x=∂∂x(ex−ey)=ex∂f∂x(0,0)=e0=1∂f∂y=∂∂y(ex−ey)=−ey∂f∂y(0,0)=−e0=−1\begin{darray}{l l} \frac{\partial f}{\partial x}=\frac{\partial}{\partial x}(e^x-e^y)=e^x & \frac{\partial f}{\partial x}(0,0)=e^0=1\\ \\ \frac{\partial f}{\partial y}=\frac{\partial}{\partial y}(e^x-e^y)=-e^y & \frac{\partial f}{\partial y}(0,0)=-e^0 =-1 \end{darray}

Obtemos assim

∇f(0,0)=(1−1)\nabla f(0,0) = \begin{pmatrix} 1 & -1 \end{pmatrix}

De seguida, vamos calcular a Matriz Hessiana de ff em (0,0)(0,0):

∂2f∂x2=∂∂x(∂f∂x)=∂∂xex=ex∂2f∂x2(0,0)=e0=1∂2f∂y2=∂∂y(∂f∂y)=∂∂y(−ey)=−ey∂2f∂y2(0,0)=−e0=−1∂2f∂x∂y=∂f∂x(∂f∂y)=∂∂x(−e)y=0∂2f∂x∂y(0,0)=0\begin{darray}{l l} \frac{\partial^2 f}{\partial x^2}=\frac{\partial}{\partial x}\left(\frac{\partial f}{\partial x}\right)=\frac{\partial }{\partial x}e^x=e^x & \frac{\partial^2 f}{\partial x^2}(0,0)=e^0=1\\ \\ \frac{\partial^2 f}{\partial y^2}=\frac{\partial}{\partial y}\left(\frac{\partial f}{\partial y}\right)=\frac{\partial }{\partial y}\left(-e^y\right)=-e^y & \frac{\partial^2 f}{\partial y^2}(0,0)=-e^0=-1\\ \\ \frac{\partial^2 f}{\partial x \partial y}=\frac{\partial f}{\partial x}\left(\frac{\partial f}{\partial y}\right)=\frac{\partial}{\partial x}\left(-e\right)^y=0 & \frac{\partial^2 f}{\partial x \partial y}(0,0)=0 \end{darray}

Sendo que a Matriz Hessiana será:

Hf(0,0)=(100−1)H_f(0,0)=\begin{pmatrix} 1 & 0\\ 0 & -1 \end{pmatrix}

Obtemos assim o polinómio de Taylor de ordem 22 de ff em (0,0)(0,0)

p2f(x,y)=f(0,0)+∇f(0,0)⋅(xy)+12(xy)Hf(0,0)(xy)=0+(1,−1)(xy)+12(xy)(100−1)(xy)=x−y+12(x−y)(xy)=x−y+12(x2−y2)\begin{aligned} p^{f}_{2} (x,y) & =f(0,0)+\nabla f(0,0)\cdot \begin{pmatrix} x & y \end{pmatrix} +\frac{1}{2}\begin{pmatrix} x & y \end{pmatrix} H_{f} (0,0)\begin{pmatrix} x\\ y \end{pmatrix}\\ & =0+(1,-1)\begin{pmatrix} x & y \end{pmatrix} +\frac{1}{2}\begin{pmatrix} x & y \end{pmatrix}\begin{pmatrix} 1 & 0\\ 0 & -1 \end{pmatrix}\begin{pmatrix} x\\ y \end{pmatrix}\\ & =x-y+\frac{1}{2}\begin{pmatrix} x & -y \end{pmatrix}\begin{pmatrix} x\\ y \end{pmatrix}\\ & =x-y+\frac{1}{2} (x^{2} -y^{2} ) \end{aligned}

O polinómio pedido é x−y+12(x2−y2)x-y+\frac 12 ( x^2-y^2)

Extremos

Tal como em CDI-I, sabemos que se um ponto é um extremo, então o gradiente nesse ponto vai ser nulo.

TEOREMA

Seja f:Rn→Rf: \R^n \to \R, que tem extremo em a∈Rna \in \R^n

Então, ∇f(a)=0⃗\nabla f(a) = \vec 0

Estes pontos, chamam-se pontos de estacionariedade ou pontos críticos.

DEFINIÇÃO

Seja f:Rn→Rf: \R^n \to \R. Os pontos a∈Rna \in \R^n para os quais ∇f(a)=0⃗\nabla f(a) = \vec 0 dizem-se pontos de estacionariedade ou pontos críticos.

warning

É importante relembrar que nem todos os pontos ∇f(a)=0⃗\nabla f(a) = \vec 0 são extremos, tal como em CDI-I nem todos os pontos onde a derivada se anulava eram extremos.

Exemplos

Seja f:R2→Rf: \R^2 \to \R, f(x,y)=x2+y2f(x,y)=x^2+y^2, determine os pontos críticos de ff.

(0,0)=∇f(x,y)=(2x,2y)  ⟹  x=0∧y=0(0,0) = \nabla f(x,y) = (2x, 2y) \implies x=0 \land y = 0

Então, o único ponto crítico de ff é (0,0)(0,0).

Como f(x,y)=x2+y2≥0,∀(x,y)∈R2f(x,y)=x^2+y^2 \geq 0, \forall (x,y) \in \R^2 e f(0,0)=0f(0,0) = 0, concluímos que este ponto crítico corresponde a um mínimo, ou seja ocorre mínimo (absoluto) de ff em (0,0)(0,0).


Seja f:R2→Rf: \R^2 \to \R, f(x,y)=11+x2+y2f(x,y) = \frac{1}{1+x^2+y^2}, determine os pontos críticos de ff.

∂f∂x(x,y)=∂∂x11+x2+y2=∂∂x((1+x2+y2)−1)=(−1)(1+x2+y2)−1−1∂∂x(1+x2+y2)=−1(1+x2+y2)22x=−2x(1+x2+y2)2\begin{aligned} \frac{\partial f}{\partial x}(x,y) & = \frac{\partial }{\partial x}\frac{1}{1+x^2+y^2}\\ & =\frac{\partial}{\partial x} \left(\left(1+x^2+y^2\right)^{-1}\right)\\ & =(-1)(1+x^2+y^2)^{-1-1} \frac{\partial}{\partial x}\left(1+x^2+y^2\right)\\ & =\frac{-1}{\left(1+x^2+y^2\right)^2}2x\\ & =\frac{-2x}{\left(1+x^2+y^2\right)^2} \end{aligned}
∂f∂y(x,y)=∂∂y11+x2+y2=∂∂y((1+x2+y2)−1)=(−1)(1+x2+y2)−1−1∂∂y(1+x2+y2)=−1(1+x2+y2)22y=−2y(1+x2+y2)2\begin{aligned} \frac{\partial f}{\partial y}(x,y) & = \frac{\partial }{\partial y}\frac{1}{1+x^2+y^2}\\ & =\frac{\partial}{\partial y} \left(\left(1+x^2+y^2\right)^{-1}\right)\\ & =(-1)(1+x^2+y^2)^{-1-1} \frac{\partial}{\partial y}\left(1+x^2+y^2\right)\\ & =\frac{-1}{\left(1+x^2+y^2\right)^2}2y\\ & =\frac{-2y}{\left(1+x^2+y^2\right)^2} \end{aligned}
(0,0)=∇f(x,y)=(−2x(1+x2+y2)2−2y(1+x2+y2)2)  ⟹  x=0∧y=0(0,0) = \nabla f(x,y) = \begin{pmatrix} \frac{-2x}{\left(1+x^2+y^2\right)^2} & \frac{-2y}{\left(1+x^2+y^2\right)^2} \end{pmatrix} \implies x = 0 \land y = 0

Portanto ff tem um ponto crítico (x,y)=(0,0)(x,y) = (0,0). Será que é extremo relativo?

Pegando novamente na expressão da função, f(x,y)=11+x2+y2f(x,y)= \frac{1}{1+x^2+y^2}, podemos majorá-la.

x2+y2≥0  ⟹  1+x2+y2≥1  ⟹  11≥11+x2+y2x^2+y^2\geq 0 \implies 1+x^2+y^2 \geq 1 \implies \frac 11 \geq \frac{1}{1+x^2+y^2}
f(x,y)=11+x2+y2≤1,∀(x,y)∈R2f(0,0)=11+02+02=1\begin{darray}{l l} f(x,y)=\frac{1}{1+x^2+y^2}\leq 1, \forall (x,y) \in \R^2 & f(0,0)= \frac{1}{1+0^2+0^2}=1 \end{darray}

Portanto ocorre máximo de ff em (0,0)(0,0).


Seja f:R2→Rf: \R^2 \to \R, f(x,y)=xyf(x,y) = xy, determine os pontos críticos de ff.

∂f∂x=∂∂x(xy)=y∂x∂x=y⋅1=y∂f∂x=∂∂x(xy)=x\begin{darray}{l l} \frac{\partial f}{\partial x}=\frac{\partial}{\partial x}(xy) = y\frac{\partial x}{\partial x} = y\cdot 1 = y\\ \frac{\partial f}{\partial x}=\frac{\partial}{\partial x}(xy) = x \end{darray}

Podemos agora calcular os pontos críticos:

(0,0)=∇f(x,y)=(y,x)  ⟹  y=0∧x=0(0,0) = \nabla f(x,y) = (y, x) \implies y = 0 \land x = 0

Assim, o único ponto crítico de ff é (x,y)=(0,0)(x,y) = (0,0)

Será que ocorre extremo de ff em (0,0)(0,0)?

Como é que esta função se comporta junto a (0,0)(0,0)?

f(x,y)=xyf(0,0)=0\begin{darray}{l l} f(x,y) = xy & f(0,0) = 0 \end{darray}
  • xy>0xy > 0 se xx e yy têm o mesmo sinal (x>0∧y>0)∨(x<0∧y<0)(x > 0 \land y > 0) \lor (x < 0 \land y < 0)
  • xy<0xy < 0 se xx e yy têm o sinais distintos (x>0∧y<0)∨(x<0∧y>0)(x > 0 \land y < 0) \lor (x < 0 \land y > 0)

Então, temos ponto de sela em (0,0)(0,0).

Este é um exemplo de ponto crítico que não é extremo.


Seja f:R2→Rf: \R^2 \to \R, f(x,y)=x2−y2f(x,y) = x^2-y^2, quais são os pontos críticos de ff?

(0,0)=∇f(x,y)=(2x,−2y)  ⟹  x=0∧y=0(0,0)=\nabla f(x,y) = (2x, -2y) \implies x=0 \land y=0

Portanto ponto crítico de ff é (x,y)=(0,0)(x,y)=(0,0).

Será que ocorre extremo de ff em (0,0)(0,0)?

  • Se x=0x = 0 então f(x,y)=−y2≤0f(x,y) = -y^2 \leq 0.
  • Se y=0y = 0 então f(x,y)=x2≥0f(x,y) = x^2 \geq 0

Então, este ponto crítico não corresponde a extremo, pois temos ponto de sela em (0,0)(0,0).

Propriedades de uma Matriz Simétrica

Como a Matriz Hessiana é uma matriz simétrica, podemos usar as suas propriedades para determinar os extremos de uma função.

Se AA é matriz simétrica então existe base ortonormada de vetores próprios (de AA), u1,u2,…,unu_1, u_2, \dots, u_n correspondentes ao valores próprios reais λ1,λ2,…,λn\lambda_1, \lambda_2, \dots, \lambda_n (i.e. Aui=λiuiAu_i = \lambda_i u_i, i=1,…,ni = 1, \dots, n).

Escrevendo h=a1u1+a2u2+⋯+anunh=a_1u_1+a_2u_2+\dots+a_nu_n com ai∈Ra_i \in \R, então obtemos a forma quadrática determinada por AA.

hTAh=hi(Ah)=(a1u1+a2u2+⋯+anun)⋅(a1λ1u1+a2λ2u2+⋯+anλnun)=λ1a12+λ2a22+⋯+λnan2\begin{aligned} h^T A h &= h_i(Ah)\\ &=(a_1u_1+ a_2u_2+ \dots + a_nu_n) \cdot (a_1\lambda_1 u_1 + a_2 \lambda_2 u_2 + \dots + a_n \lambda_n u_n)\\ &= \lambda_1 a^2_1 + \lambda_2 a^2_2 + \dots + \lambda_n a^2_n \end{aligned}

O sinal desta expressão é dado pelos λi\lambda_i's.

Se substituirmos este resultado na Fórmula de Taylor de 2ª Ordem em torno de um ponto crítico a∈Rna\in \R^n (∇f(a)=0⃗\nabla f (a) = \vec 0), então obtemos, para f:Rn→Rf: \R^n \to \R:

Então,

f(a+h)=f(a)+0+12hTHf(a)h+R2(h)f(a+h) = f(a) + 0 + \frac 12 h^T H_f(a) h + R_2(h)

com lim⁡h→0⃗R2(h)∣∣h∣∣2=0⃗\lim_{h\to \vec 0} \frac{R_2(h)}{||h||^2} = \vec 0

Donde, pelas contas feitas acima, obtemos

f(a+h)−f(a)=12(λ1a12+λ2a22+⋯+λnan2)+R2(h)f(a+h) -f(a) = \frac 12 (\lambda_1 a^2_1+ \lambda_2 a^2_2 + \dots + \lambda_n a^2_n) + R_2(h)

Assim, como R2(h)R_2(h) é desprezável quando h→0⃗h\to \vec 0, o sinal de f(a+h)−f(a)f(a+h)-f(a) pode ser determinado em função dos valores próprios da matriz.

  • f(a+h)−f(a)>0f(a+h)-f(a) > 0 se todos os λi>0\lambda_i > 0, donde em aa ocorre mínimo
  • f(a+h)−f(a)<0f(a+h)-f(a) < 0 se todos os λi<0\lambda_i < 0, donde em aa ocorre máximo

TEOREMA

Seja f:Rn→Rf: \R^n \to \R, a∈Ra \in \R é ponto crítico de ff, ou seja ∇f(a)=0⃗\nabla f(a) = \vec 0

Se Hf(a)H_f(a) é:

  • definida positiva (cada valor próprio λi>0\lambda_i > 0) - então há mínimo local em aa
  • definida negativa (cada valor próprio λi<0\lambda_i < 0) - então há máximo local em aa
  • indefinida (valores próprios λi>0\lambda_i >0 e λj<0\lambda_j < 0) - então há ponto de sela aa
  • semidefinida positiva (valores próprios λi≥0\lambda_i \geq 0) - então há mínimo ou ponto de sela em aa
  • semidefinida negativa (valores próprios λi≤0\lambda_i \leq 0) - então há máximo ou ponto de sela em aa
Exemplos

Determine e clarifique os pontos de estacionariedade da função f:R2→Rf: \R^2 \to \R

f(x,y)=−x4+2x2−y2+3f(x,y) = -x^4+2x^2-y^2+3

Começamos por determinar o gradiente de ff:

∇f(x,y)=(−4x3+4x,−2y)\nabla f(x,y) = (-4x^3+4x, -2y)

E depois igualá-lo ao vetor nulo, para obtermos os pontos críticos de ff:

∇f(x,y)=(0,0)⇔(−4x3+4x,−2y)=(0,0)⟹{0=−4x3+2x0=−2y⇔{0=4x(1−x2)y=0⇔{x=0∨x=±1y=0\begin{array}{ c } \nabla f( x,y) =( 0,0) \Leftrightarrow \left( -4x^{3} +4x,-2y\right) =( 0,0) \Longrightarrow \\ \begin{cases} 0=-4x^{3} +2x\\ 0=-2y \end{cases} \Leftrightarrow \begin{cases} 0=4x(1-x^{2} )\\ y=0 \end{cases} \Leftrightarrow \begin{cases} x=0\lor x=\pm 1\\ y=0 \end{cases} \end{array}

Os pontos críticos de ff são: (0,0),(1,0),(−1,0)(0,0), (1,0), (-1,0)

∂2f∂x2=∂∂x(−4x3+4x)=−12x2+4∂2f∂y2=∂∂y(−2y)=−2∂2f∂x∂y=∂∂x(−2y)=0\begin{darray}{l} \frac{\partial^2 f}{\partial x^2} = \frac{\partial}{\partial x}(-4x^3+4x) = -12x^2+4\\ \\ \frac{\partial^2 f}{\partial y^2} = \frac{\partial}{\partial y}(-2y) = -2\\ \\ \frac{\partial^2 f}{\partial x \partial y} = \frac{\partial}{\partial x}(-2y) = 0 \end{darray}
  • Em (0,0)(0,0):

    Hf(0,0)=[400−2]H_{f} (0,0)=\begin{bmatrix} 4 & 0\\ 0 & -2 \end{bmatrix}

    Como já está na forma diagonal, tem valores próprios 44 e −2-2.
    Logo, ff tem ponto de sela em (0,0)(0,0).

  • Em (1,0)(1,0):

    Hf(1,0)=[−800−2]H_{f} (1,0)=\begin{bmatrix} -8 & 0\\ 0 & -2 \end{bmatrix}

    Como já está na forma diagonal, tem valores próprios −8-8 e −2-2, ambos negativos. Logo, ff tem máximo em (1,0)(1,0).

  • Em (−1,0)(-1,0):

    Hf(−1,0)=[−800−2]H_{f} (-1,0)=\begin{bmatrix} -8 & 0\\ 0 & -2 \end{bmatrix}

    Como já está na forma diagonal, tem valores próprios −8-8 e −2-2, ambos negativos. Logo, ff tem máximo em (−1,0)(-1,0).

Matriz Hessiana 2x2

Para uma Matriz Hessiana 2×22\times2, podemos obter uma regra que nos permite mais facilmente determinar se um ponto crítico é máximo, mínimo, ou ponto de sela.

Se f:R2→Rf: \R^2 \to \R com ∇f(x)=0⃗\nabla f(x) = \vec 0

Hf(a)=[ABBC]H_{f} (a)=\begin{bmatrix} A & B\\ B & C \end{bmatrix}

com

A=∂2f∂xi2(a)B=∂2f∂x∂y(a)C=∂2f∂y2(a)A= \frac{\partial^2 f}{\partial x_i^2}(a) \quad B=\frac{\partial^2 f}{\partial x\partial y}(a)\quad C=\frac{\partial^2 f}{\partial y^2}(a)
  • Determinante: det⁡A=λ1×λ2×⋯×λn\operatorname{det} A= \lambda_1 \times \lambda_2 \times \dots \times \lambda_n
  • Traço: tr⁡A=λ1+λ2+⋯+λn\operatorname{tr} A = \lambda_1 + \lambda_2 + \dots + \lambda_n

Então, podemos concluir o seguinte:

  • Se det⁡Hf(a)<0\operatorname{det} H_f(a) < 0, então ff tem ponto de sela em aa
  • Se det⁡Hf(a)>0\operatorname{det} H_f(a) > 0 e tr⁡Hf(a)>0\operatorname{tr} H_f(a) > 0 então ff tem mínimo local em aa
  • Se det⁡Hf(a)>0\operatorname{det} H_f(a) > 0 e tr⁡Hf(a)<0\operatorname{tr} H_f(a) < 0 então ff tem máximo local em aa
Exemplos

Determinar e caracterizar os pontos críticos de ff:

f(x,y)=(x−y)2−x4−y4f(x,y) = (x-y)^2 -x^4-y^4
∂f∂x=2(x−y)⋅1−4x3∂f∂y=2(x−y)⋅(−1)−4y3\begin{array}{ll} \frac{\partial f}{\partial x} = 2(x-y)\cdot 1 - 4x^3 & \frac{\partial f}{\partial y} = 2(x-y)\cdot (-1) - 4y^3 \end{array}

Igualando o gradiente de ff a zero:

∇f(x,y)=(0,0)⇔(2(x−y)−4x3,−2(x−y)−4y3)=(0,0)⟹{x−y=2x3x−y=−2y3⇔2x3=x−y=−2y3\begin{array}{ c } \nabla f( x,y) =( 0,0) \Leftrightarrow \left( 2( x-y) -4x^{3} ,-2( x-y) -4y^{3}\right) =( 0,0) \Longrightarrow \\ \begin{cases} x-y=2x^{3}\\ x-y=-2y^{3} \end{cases} \Leftrightarrow 2x^{3} =x-y=-2y^{3} \end{array}

Logo, os pontos críticos de ff são (0,0),(1,−1),(−1,1)(0,0), (1,-1), (-1, 1).

Determinando agora as derivadas de segunda ordem para determinar a Matriz Hessiana:

∂2f∂x2=∂∂x(2(x−y)−4x3)=2−12x2∂2f∂y2=∂∂y(−2(x−y)−4y3)=2−12y2∂2f∂x∂y=∂∂x(−2(x−y)−4y3)=−2\begin{darray}{l} \frac{\partial^2 f}{\partial x^2} = \frac{\partial }{\partial x} (2(x-y)-4x^3)= 2-12x^2\\ \\ \frac{\partial^2 f}{\partial y^2} = \frac{\partial }{\partial y} (-2(x-y)-4y^3)= 2-12y^2\\ \\ \frac{\partial^2 f}{\partial x\partial y} = \frac{\partial }{\partial x} (-2(x-y)-4y^3)= -2 \end{darray}
Hf(x,y)=[2−12x2−2−22−12y2]H_{f} (x,y)=\begin{bmatrix} 2-12x^{2} & -2\\ -2 & 2-12y^{2} \end{bmatrix}
  • Em (1,−1)(1,-1) e/ou (−1,1)(-1,1):

    Hf(1,−1)=Hf(−1,1)=[−10−2−2−10]H_{f} (1,-1)=H_{f} (-1, 1)=\begin{bmatrix} -10 & -2\\ -2 & -10 \end{bmatrix}

    Assim, como o determinante é 96>096 > 0, e o traço é −20<0-20 < 0, ocorrem máximos em (1,−1)(1,-1) e em (−1,1)(-1,1).

  • Em (0,0)(0,0):

    Hf(0,0)=[2−2−22]H_{f} (0,0)=\begin{bmatrix} 2 & -2\\ -2 & 2 \end{bmatrix}

    Assim, o determinante é 00 e o traço é 44.

    Como o determinante é 00, nada podemos concluir e temos de estudar o comportamento da função em (0,0)(0,0).

    Tentamos estudar a função em certas direções:

    • Em y=xy=x, temos f(x,y)=02−x4−x4=−2x4f(x,y) = 0^2 - x^4 - x^4= -2x^4, ou seja, há um máximo local segundo y=xy=x.
    • Em y=0y=0, temos f(x,y)=x2−x4=x2(1−x2)f(x,y) = x^2 - x^4 = x^2(1-x^2), ou seja, há um mínimo local segundo y=0y=0.

    Logo, o ponto (0,0)(0,0) corresponde a um ponto de sela


Identificar e classificar pontos críticos de ff:

f(x,y)=xy+1x+8yf(x,y) = xy + \frac 1x + \frac 8y

Começamos por igualar o gradiente de ff ao vetor nulo, para descobrir os pontos críticos.

∇f(x,y)=(0,0)⇔(y−1x2, x−8y2)=(0,0)⟹{y=1x2x=8y2⟹{y=4x=12\begin{array}{ c } \nabla f( x,y) =( 0,0) \Leftrightarrow \left( y-\frac{1}{x^{2}} ,\ x-\frac{8}{y^{2}}\right) =( 0,0) \Longrightarrow \\ \begin{cases} y=\frac{1}{x^{2}}\\ x=\frac{8}{y^{2}} \end{cases} \Longrightarrow \begin{cases} y=4\\ x=\frac{1}{2} \end{cases} \end{array}

Logo, a função ff tem um ponto crítico em (12,4)(\frac{1}{2}, 4).

Hf(x,y)=[2x31116y3]H_{f} (x,y)=\begin{bmatrix} \frac{2}{x^{3}} & 1\\ 1 & \frac{16}{y^{3}} \end{bmatrix}

Então, a Matriz Hessiana em (12,4)\left(\frac 12, 4\right) é:

Hf(12,4)=[161114]H_{f} \left(\frac 12, 4\right)=\begin{bmatrix} 16 & 1\\ 1 & \frac 14 \end{bmatrix}

Assim, det⁡=3>0\operatorname{det} = 3 > 0 e tr⁡=16+14>0\operatorname{tr} = 16 + \frac 14 > 0.

Logo, a função ff tem mínimo local em (12,4)\left(\frac 12, 4\right).


Identificar e classificar pontos críticos de ff:

f(x,y,z)=x2+y2+z2+xyf (x,y,z) = x^2+ y^2+ z^2+ xy

Começamos, novamente, por igualar o gradiente a zero:

∇f(x,y,z)=(0,0,0)⇔(2x+y,2y+x,2z)=(0,0)⟹{2x+y=02y+x=02z=0⟹{x=0y=0z=0\begin{array}{ c } \nabla f( x,y,z) =( 0,0,0) \Leftrightarrow ( 2x+y,2y+x,2z) =( 0,0) \Longrightarrow \\ \begin{cases} 2x+y=0\\ 2y+x=0\\ 2z=0 \end{cases} \Longrightarrow \begin{cases} x=0\\ y=0\\ z=0 \end{cases} \end{array}

Então, o único ponto crítico de ff é (0,0,0)(0,0,0).

Hf(x,y,z)=[210120002]→[3200120002]→[3200020002]H_{f}( x,y,z) =\begin{bmatrix} 2 & 1 & 0\\ 1 & 2 & 0\\ 0 & 0 & 2 \end{bmatrix}\rightarrow \begin{bmatrix} \frac{3}{2} & 0 & 0\\ 1 & 2 & 0\\ 0 & 0 & 2 \end{bmatrix}\rightarrow \begin{bmatrix} \frac{3}{2} & 0 & 0\\ 0 & 2 & 0\\ 0 & 0 & 2 \end{bmatrix}

Então, os valores próprios da matriz são 32,2,2\frac 32, 2, 2.
Como são todos positivos, há mínimo local de ff em (0,0,0)(0,0,0).


Slides: