Answer
$\approx$0.561096 is the absolute maximum value of f
Work Step by Step
f(x) = xcosx, 0\leq x \leq\ pi
f'(x) = (1)cosx + x(-sinx) = cosx - xsinx
We are looking for the critical numbers of f(x), which means we are looking for the zeros of f'(x). Putting f' and f'' in Newton's method formula seems to confuse some people, so let's call f' "g(x)".
g(x) = cosx - xsinx
g'(x) = -sinx - (sinx +xcosx) = -2sinx -xcosx
Check a graph or sketch of g(x) and pick numbers close to the zeros to be the initial approximation. We can use x_{1} = 0.8
Starting with x_{n} = x_{1} as the initial approximation, we keep repeating
x_{n+1} = x_{n} - \frac{gx_{n}}{g'x_{n}} = x_{n} - \frac{cos x_{n} - x_{n}sinx_{n}}{-2sinx_{n} - x_{n}cosx_{n}}
until the numbers in the first 8 decimal places don't change anymore. ( I use 8 to get a little more accuracy since the final answer will be 6 decimal places)
Each x_{n+1} we get will get plugged back into the formula to get x_{n+2}.
x_{1} = 0.8
x_{2} = 0.8 - \frac{g(0.8)}{g'(0.8)} \approx 0.8616551483
x_{3} = 0.8616551483 - \frac{g(0.8616551483)}{g'(0.8616551483)} \approx 0.8603341356
x_{4} = 0.8603341356 - \frac{g(0.8603341356)}{g'(0.8603341356)} \approx 0.8603335890
x_{5} = 0.8603335890 - \frac{g(0.8603335890)}{g'(0.8603335890)} \approx 0.8603335890
x \approx 0.8603335890
For finding absolute extrema on closed intervals, we check the function values at the interval endpoints, and at the critical numbers.
f(0) = 0
f(0.8603335890) \approx 0.561096
f(\pi) = -\pi \approx - 3.141593
\approx 0.561096 is the absolute maximum value of f