How to find the 3 roots of the equation 2sinx=x?
3 views (last 30 days)
Show older comments
I entered as following: syms x vpasolve(2*sin(x)==x, x)
Matlab gives one answer only ans=0. But the correct answer should have 3 solutions. x=-1.89549, or x=0, or x=1.89549
Please help. Thanks
0 Comments
Accepted Answer
madhan ravi
on 6 Oct 2018
Edited: madhan ravi
on 6 Oct 2018
syms x
fplot(2*sin(x)-x)
grid on
vpasolve(2*sin(x)==x,x,2)
vpasolve(2*sin(x)==x,x,-2)
vpasolve(2*sin(x)==x,x)
Remark: See the graph guess the nearest root and get the exact root results
1 Comment
madhan ravi
on 8 Oct 2018
Edited: madhan ravi
on 8 Oct 2018
If something is not clear let know, if not accept the answer.
More Answers (1)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!