der2: Symbolic differentiation of second order of an expression

View source: R/calculus.R

der2R Documentation

Symbolic differentiation of second order of an expression

Description

Symbolic differentiation of second order of an expression

Usage

der2(expr, vars, simplify = TRUE)

Arguments

expr

A caracas_symbol

vars

variables to take derivate with respect to

simplify

Simplify result

Examples

if (has_sympy()) {
  x <- symbol("x")
  y <- symbol("y")
  f <- 3*x^2 + x*y^2
  der2(f, x)
  h <- der2(f, list(x, y))
  h
  dim(h)
  H <- matrify(h)
  H
  dim(H)
}


caracas documentation built on June 22, 2024, 10:59 a.m.