%% Solve Polynomial and Nonpolynomial Equations
% Solve a polynomial equation. For polynomial equations, vpasolve returns all solutions.

syms x
S = vpasolve(2*x^4 + 3*x^3 - 4*x^2 - 3*x + 2 == 0, x)

% Solve a nonpolynomial equation. For nonpolynomial equations, vpasolve returns the first solution that it finds.

S = vpasolve(sin(x) == 1/2, x)

%
% Copyright 2012-2019 The MathWorks, Inc.