Advertisement
Guest User

Untitled

a guest
Oct 21st, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. curve(f,-3,3,col='red')
  2. abline(h=-0)
  3.  
  4. f=function(x) {1/sqrt(2*pi)*exp(-x^2/2)}
  5. integrate(f,-Inf,Inf)
  6.  
  7. f=function(x) {(x^2)*sin(2*x)}
  8. integrate(f,0,pi)
  9.  
  10. f=function(x) {1/(1+x^2)}
  11. integrate(f,-Inf,Inf)
  12.  
  13. f=function(x) {(6*x)^2+((7/2)*x)-5}
  14. curve(f,-2,2)
  15.  
  16. f=function(x) {6*x^2+7/2*x-5}
  17. curve(f,-2,2)
  18. g=function(x) {-12*x^2-7*x+13}
  19. curve(g,-2,2,add=TRUE,col='red')
  20. h=function(x) {g(x)-f(x)} #f pomocnicza
  21. curve(h,-2,2,add=TRUE,col='red')
  22. library(rootSolve)
  23. x0=uniroot.all(h,c(-2,2)) #pkt przeciecia
  24. integrate(h,x0[1],x0[2]) #pole
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement