%% Shorten Result with Simplification Rules
% Try to solve the equation \exp \left(\log \left(x\right)\log \left(3x\right)\right)=4. By default, solve does not apply simplifications that are not always mathematically correct. As a result, solve cannot solve the equation symbolically.

syms x
eqn = exp(log(x)*log(3*x)) == 4;
S = solve(eqn,x)

% Set 'IgnoreAnalyticConstraints' to true to apply simplification rules that might allow solve to find a solution. For details, see Algorithms.

S = solve(eqn,x,'IgnoreAnalyticConstraints',true)

% solve applies simplifications that allow the solver to find a solution. The mathematical rules applied when performing simplifications are not always valid in general. Thus, the solutions in this mode might not be correct or complete, and need verification.
%
% Copyright 2006-2019 The MathWorks, Inc.