Como calcular o gradiente

Calcule o gradiente de uma função escalar (o vetor de derivadas parciais, ∇f). Processo: calcule as derivadas parciais para cada variável, monte o vetor e avalie em um ponto. Exemplo: f(x,y)=x^2 y + 3y → ∇f=(2xy, x^2+3); em (1,2) → (4,4).

Como calcular o gradiente

O que: O gradiente de uma função escalar é o vetor de suas derivadas parciais e aponta na direção do aumento mais rápido. Uso: insira uma função multivariável, calcule cada derivada parcial, forme o vetor gradiente e avalie num ponto específico. Cenários: otimização, derivadas direcionais, física e análise de campos.

Steps

  1. Take the partial derivative of the function with respect to each variable: $partial f/partial x_i$.
  2. Assemble these partial derivatives into the gradient vector: $ abla f = (partial f/partial x_1, partial f/partial x_2, ...)$.
  3. Evaluate the gradient at the desired point by substituting coordinates.

Example

f(x,y) = x^2 y + 3y
∂f/∂x = 2xy
∂f/∂y = x^2 + 3
∇f = (2xy, x^2 + 3)
At (1,2): ∇f = (4,4)

Use this approach for scalar fields in physics, optimization, and directional derivative calculations.