Advertisement
Guest User

Untitled

a guest
Mar 20th, 2019
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. zad.7
  2. a)
  3. f(x)=x^3-x^2+3*x-7
  4. g(x)=f.diff()
  5. show(g(x))
  6. x0=5
  7. x1=x0-f(x0)/g(x0)
  8. show(x0)
  9. show(x1)
  10. show(n(x1))
  11. x2=x1-f(x1)/g(x1)
  12. show(x2)
  13. show(n(x2))
  14. x3=x2-f(x2)/g(x2)
  15. show(x3)
  16. show(n(x3))
  17.  
  18. b)
  19. f(x)=x^3-e^-x-2
  20. g(x)=f.diff()
  21. show(g(x))
  22. x0=1
  23. x1=x0-f(x0)/g(x0)
  24. show(x0)
  25. show(x1)
  26. show(n(x1))
  27. x2=x1-f(x1)/g(x1)
  28. show(x2)
  29. show(n(x2))
  30. x3=x2-f(x2)/g(x2)
  31. show(x3)
  32. show(n(x3))
  33.  
  34.  
  35.  
  36. zad.8
  37. f(x)=cos(x)-2*x^2
  38. g(x)=f.diff()
  39. show(g(x))
  40. x0=1/2
  41. d=0.001
  42. x1=x0-f(x0)/g(x0)
  43. show(x0)
  44. show(x1)
  45. show(n(x1))
  46. show(n(abs(f(x1)))<d)
  47. show(n(abs(x1-x0))<d)
  48. x2=x1-f(x1)/g(x1)
  49. show(x2)
  50. show(n(x2))
  51. show(n(abs(f(x2)))<d)
  52. show(n(abs(x2-x1))<d)
  53. x3=x2-f(x2)/g(x2)
  54. show(x3)
  55. show(n(x3))
  56. show(n(abs(f(x3)))<d)
  57. show(n(abs(x3-x2))<d)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement