Complex roots of sin(2*x)-2*x=0
Show older comments
How can i use fsolve to obtain the complex roots of the equation: sin(2*x)-2*x=0?
1 Comment
Matt J
on 7 Aug 2021
Well, you definitely can't find more than one. fsolve is a numerical solver.
Accepted Answer
More Answers (1)
This seems to find a non-trivial complex root:
opts=optimoptions('fsolve','StepTol',1e-14,'FunctionTol',1e-14,'OptimalityTol',1e-14);
[p,fval]=fsolve(@eqnfun,[3,3],opts);
x=complex(p(1), p(2)),
sin(2*x)-2*x
function F=eqnfun(p)
x=complex(p(1), p(2));
y=sin(2*x)-2*x;
F=[real(y); imag(y)];
end
2 Comments
Matt J
on 7 Aug 2021
There is obviously also a solution at x = -3.7488 - 1.3843i
Categories
Find more on Mathematics in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!