Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- zad.7
- a)
- f(x)=x^3-x^2+3*x-7
- g(x)=f.diff()
- show(g(x))
- x0=5
- x1=x0-f(x0)/g(x0)
- show(x0)
- show(x1)
- show(n(x1))
- x2=x1-f(x1)/g(x1)
- show(x2)
- show(n(x2))
- x3=x2-f(x2)/g(x2)
- show(x3)
- show(n(x3))
- b)
- f(x)=x^3-e^-x-2
- g(x)=f.diff()
- show(g(x))
- x0=1
- x1=x0-f(x0)/g(x0)
- show(x0)
- show(x1)
- show(n(x1))
- x2=x1-f(x1)/g(x1)
- show(x2)
- show(n(x2))
- x3=x2-f(x2)/g(x2)
- show(x3)
- show(n(x3))
- zad.8
- f(x)=cos(x)-2*x^2
- g(x)=f.diff()
- show(g(x))
- x0=1/2
- d=0.001
- x1=x0-f(x0)/g(x0)
- show(x0)
- show(x1)
- show(n(x1))
- show(n(abs(f(x1)))<d)
- show(n(abs(x1-x0))<d)
- x2=x1-f(x1)/g(x1)
- show(x2)
- show(n(x2))
- show(n(abs(f(x2)))<d)
- show(n(abs(x2-x1))<d)
- x3=x2-f(x2)/g(x2)
- show(x3)
- show(n(x3))
- show(n(abs(f(x3)))<d)
- show(n(abs(x3-x2))<d)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement