Exemplo:
t <- seq(0,50)
y <- function(t) t^2
y_dot <- function(t) 2*t
f <- function(t,y,y_dot) t + y + y_dot
v <- f(t,y(t),y_dot(t))
m <- rbind(c(1, 1), c(2, 3))
layout(m)
plot(t,v,type="l",main="Funcional",bty="l")
grid()
plot(t,y(t),type="l",main="Variável de estado",bty="l")
grid()
plot(t,y_dot(t),type="l",main="Taxa de variação da \n variável de estado",bty="l")
grid()