x para nuestras funcionesx<-(-5:5)
f(x)=3*x+8fx<-3*x+8
fx
## [1] -7 -4 -1 2 5 8 11 14 17 20 23
g(x)=x^2gx<-x^2
gx
## [1] 25 16 9 4 1 0 1 4 9 16 25
f(x)plot(x,fx, type="o")
g(x)plot(x,gx, type="o")
f(x)+g(x)f_mas_g<-fx+gx
f_mas_g
## [1] 18 12 8 6 6 8 12 18 26 36 48
f(x)+g(x)plot(x, f_mas_g, type = "o")
g(x)-f(x)g_menos_f<-gx-fx
g_menos_f
## [1] 32 20 10 2 -4 -8 -10 -10 -8 -4 2
g(x)-f(x)plot(x, g_menos_f, type = "o")
f(x)*g(x):f_por_g<-fx*gx
f_por_g
## [1] -175 -64 -9 8 5 0 11 56 153 320 575
f(x)*g(x):plot(x,f_por_g, type = "o")
g(x)/f(x):g_entre_f<-gx/fx
g_entre_f
## [1] -3.57142857 -4.00000000 -9.00000000 2.00000000 0.20000000 0.00000000
## [7] 0.09090909 0.28571429 0.52941176 0.80000000 1.08695652
g(x)/f(x):plot(x,g_entre_f, type = "o")
tabla<-data.frame(x,fx,gx,f_mas_g,g_menos_f,f_por_g,g_entre_f)
tabla
## x fx gx f_mas_g g_menos_f f_por_g g_entre_f
## 1 -5 -7 25 18 32 -175 -3.57142857
## 2 -4 -4 16 12 20 -64 -4.00000000
## 3 -3 -1 9 8 10 -9 -9.00000000
## 4 -2 2 4 6 2 8 2.00000000
## 5 -1 5 1 6 -4 5 0.20000000
## 6 0 8 0 8 -8 0 0.00000000
## 7 1 11 1 12 -10 11 0.09090909
## 8 2 14 4 18 -10 56 0.28571429
## 9 3 17 9 26 -8 153 0.52941176
## 10 4 20 16 36 -4 320 0.80000000
## 11 5 23 25 48 2 575 1.08695652
Esta obra fue generada mediante R en October 28, 2020 y forma parte de las actividades realizadas en las materias de Matemáticas I y Taller III, Facultad de Economía, UNAM. Esta obra está bajo una licencia de Creative Commons Reconocimiento-NoComercial-CompartirIgual 4.0 Internacional. Creative Commons (CC).