%% Simplify a symbolic expression
%% (live script: simplify_expressions.mlx)
%

syms x real
e1=((exp(-x*1i)*1i) - (exp(x*1i)*1i));
e2=(exp(-x*1i) + exp(x*1i));
espr=e1/e2;
s1=simplify(e1), s2=simplify(e2)
S=simplify(espr)

%% Increase to 10 the number of  simplification steps

S10=simplify(espr,'Steps',10)

%% Increase to 30 the number of  simplification steps

S30=simplify(espr,'Steps',30)

%% Increase to 50 the number of  simplification steps

S50=simplify(espr,'Steps',50)
S=simplify(espr,'Steps',50,'All',true)