The following code is the method I have tried to use myself: however, the results are incorrect when judging the parity of some functions. What methods can be used to accurately determine the parity of each type of function?
f[x_] := x^3
dn = FunctionDomain[f[x], x]
Reduce[ForAll[x, dn, #], x, Reals] & /@ {f[-x] == -f[x], f[-x] == f[x]}
There were no errors in judging the parity of the following functions.
f[x_] := x^3
dn = FunctionDomain[f[x], x]
Reduce[ForAll[x, dn, #], x, Reals] & /@ {f[-x] == -f[x], f[-x] == f[x]}
f[x_] := x - Sin@x
dn = FunctionDomain[f[x], x]
Reduce[ForAll[x, dn, #], x, Reals] & /@ {f[-x] == -f[x], f[-x] == f[x]}
However, errors occur in the following cases:
The judgment is incorrect when the domain of the function is not symmetric about the origin.
f[x_] := x^2 - Abs@x + 1
dn = -1 <= x <= 4
Reduce[ForAll[x, dn, #], x, Reals] & /@ {f[-x] == -f[x], f[-x] == f[x]}

Errors occur when judging the parity of functions containing parameters.
f[x_] := 1/(a^x - 1) + 1/2
dn = FunctionDomain[f[x], x]
Reduce[ForAll[x, dn, #], x, Reals] & /@ {f[-x] == -f[x], f[-x] == f[x]}

What methods can correctly determine the parity of each type of function?