Hi, I am having a little trouble finding the roots of Bessel's function J0 between -4 and 4 using the newton Raphson method, the main issue I am having is not knowing what to input at a certain point.
f:=x->x-evalf(cos(x));
f := x -> x - evalf(cos(x))
> low:=-10;
low := -10
> up:=10;
up := 10
> step:=1;
step := 1
>
> dp:=5;
dp := 5
>
> for i from low to up-step by step do
>
> a:=i:
> b:=i+step:
>
> if f(a)*f(b) < 0 then
>
> print(`root in interval`,a,b):
>
> fi:
>
> od:
root in interval, 0, 1
As you can see above I was able to get maple to find me the root interval,
How would I do the same for Bessel's function? What would I put into f:=