Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Regra-trapezio
f<-function(s){1/(1+s^2)} curve(f,-5,5) x=seq(-5,5,by=0.01); y=f(x) points(x,y,col="red") # Cálculo de integral pela regra dos trapézios Trap<-function(f,v){ # Regra dos trapézios n=length(v) trap=0 for ( i in 1:(n-1)){trap=trap+(f(v[i])+f(v[i+1]))*(v[i+1]-v[i])/2} trap } print("Aproximação para a integral"); print(Trap(f,seq(-5,5,by=0.01)),digits=22) print(atan(5)-atan(-5),digits=22)
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
Gab1A(resumido)
Peso diário
Graficos
Assignmentno1 (3351)
ESTADISTICA
Paired t-test [Shear Strength of Girder]
Análise de Variâncias DIC e teste de Tukey
Chi Square Tests - Goodness of Fit Test [Coffee drinkers]
Mobile-Sprite-image-Interval
Predictive power of a test when False positive rate = False negative rate
Please log in to post a comment.