MATLAB Answers

non linear implicit equation

5 views (last 30 days)
Good morning, I'm new in using Matlab and I would like to know if it is possible to solve the following implicit equation
sin(x)-y*sin(acos((3+sin(x))/y)) = 0
where: x = linspace(0,2*pi,50)
In particular I would like to explicit y and after plot y against x.
Thank you so much!


Sign in to comment.

Accepted Answer

Alan Stevens
Alan Stevens on 23 Oct 2020
Surprisingly, this has an explicit solution for y (I didn't use Matlab to get it as I don't have the symbolic toolbox to hand) . See the following code:
x = linspace(0,2*pi,50);
y = zeros(1,numel(x));
for i = 1:numel(x)
y(i) = yfn(x(i));
xlabel('x'),ylabel('check functions')
function y = yfn(x)
y = sqrt(6*sin(x)-cos(2*x)+10);
if mod(x,2*pi)>pi
y = -y;
This results in


Show 1 older comment
Alan Stevens
Alan Stevens on 26 Oct 2020
As follows:
I've just taken the positive sign for y above, but you need the negative sign between pi and 2pi.
Hope that helps.
Gregory Cottone
Gregory Cottone on 26 Oct 2020
Thank you very much!!
One more last question: if I would find a numerical method as for example fsolve function, what I have to do to set the problem?
Alan Stevens
Alan Stevens on 26 Oct 2020
fsolve is part of the Optimisation toolbox, which I don't have, so I'm not much help to you on that. I suggest you either type doc fsolve, or ask as a separate question in the forum (or both!).

Sign in to comment.

More Answers (0)


Community Treasure Hunt

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

Start Hunting!