How to find the 3 roots of the equation 2sinx=x?

3 views (last 30 days)
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

Accepted Answer

madhan ravi
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
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.

Sign in to comment.

More Answers (1)

Shanghong Cao
Shanghong Cao on 9 Oct 2018
Thank you so much, Madhan It works well. Appreciate your help.

Categories

Find more on Mathematics in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!