f := proc (x) options operator, arrow; `+`(`*`(`^`(x, 4)), `-`(`*`(2, `*`(`^`(x, 3)))), `*`(5, `*`(`^`(x, 2))), `-`(6)) end proc 

proc (x) options operator, arrow; `+`(`*`(`^`(x, 4)), `-`(`*`(2, `*`(`^`(x, 3)))), `*`(5, `*`(`^`(x, 2))), `-`(6)) end proc (1)
 

fp := D(f) 

proc (x) options operator, arrow; `+`(`*`(4, `*`(`^`(x, 3))), `-`(`*`(6, `*`(`^`(x, 2)))), `*`(10, `*`(x))) end proc (2)
 

fp(1.5) 

15.0 (3)
 

tanline := proc (x) options operator, arrow; `+`(`*`(fp(1.5), `*`(`+`(x, `-`(1.5)))), f(1.5)) end proc 

proc (x) options operator, arrow; `+`(`*`(fp(1.5), `*`(`+`(x, `-`(1.5)))), f(1.5)) end proc (4)
 

evalf(%) 

proc (x) options operator, arrow; `+`(`*`(fp(1.5), `*`(`+`(x, `-`(1.5)))), f(1.5)) end proc (5)
 

fp(1.5) 

15.0 (6)
 

f(1.5) 

3.5625 (7)
 

f(1.21756) 

-0.22625e-4 (8)
 

newtin := proc (x) options operator, arrow; `+`(x, `-`(`/`(`*`(f(x)), `*`(fp(x))))) end proc 

proc (x) options operator, arrow; `+`(x, `-`(`/`(`*`(f(x)), `*`(fp(x))))) end proc (9)
 

newtin(1.5) 

1.262500000 (10)
 

newtin(%) 

1.218807774 (11)
 

newtin(%) 

1.217563128 (12)
 

newtin(%) 

1.217562155 (13)
 

newtin(%) 

1.217562155 (14)
 

f(%) 

0.1e-8 (15)