%% Apply IgnoreAnalyticConstraints
% Define a symbolic function and compute its indefinite integral.

syms f(x)
f(x) = acos(cos(x));
F = int(f,x)

% By default, int uses strict mathematical rules. These rules do not let int rewrite acos(cos(x)) as x.
% If you want a simple practical solution, set 'IgnoreAnalyticConstraints' to true.

F = int(f,x,'IgnoreAnalyticConstraints',true)

%
% Copyright 2006-2019 The MathWorks, Inc.