First, consider if you are trying to solve the wrong problem.
In your question, you state it as e^2*sin(x) - x = 0
However, in your code, you write exp(2*sin(x)) - x. You do realize there is a difference? What I don't know is if you have miswritten your question, or is it your code?
fun = @(x) exp(2)*sin(x) - x;
fplot(fun,[0,3])
yline(0);
fzero(fun,3)
ans =
2.7589
So the function you claim to want to solve has a zero around x==2.76, which is inconsistent with your claim of where the root lies. Next, look at the function you wrote code for:
fun = @(x) exp(2*sin(x)) - x;
fplot(fun,[-5,3])
yline(0);
Indeed, this does seem to have a root near 2.6357. So, just possibly, you really do want to solve the problem exp(2*sin(x))-x==0.
But now, look at the plot! What happens when you start Newton's method at x==1? THINK! Where will the first iteration go? On which side of that hump is x==1?
The point is, Newton's method tries to drive the functino to zero. But if you start the iterations BELOW x==1.5028, which direction will Newton's method push you?
fminbnd(@(x) -fun(x),1,3)
ans =
1.5028
Think about the meaning of the iterations of Newton's method. What is the goal? What will happen?