Hi!
The answer to this problem should be 1 / 3. So, I tried running this code on my computer and discovered that this issue is because of operator precedence.
f(x) = x - sin(sin(x))/ x * x * x.
would end up as
which is not the function that we are aiming for. This happens because of operator precedence, meaning which operator must first execute. To avoid this, we will have to use parentheses.
Correct code would be:-
limit( ( x - sin(sin(x)) ) / (x * x * x) , 0)
ans =
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1309565/image.png)
output:-
Hope this helps !