Why does:
FullSimplify[(n+1)^2>n^2,n>=2]
evaluate to True
, but:
FullSimplify[Log[n+1]>Log[n],n>=2]
remains unchanged?
Thank you.
Mathematica Stack Exchange is a question and answer site for users of Wolfram Mathematica. It only takes a minute to sign up.
Sign up to join this communityWhy does:
FullSimplify[(n+1)^2>n^2,n>=2]
evaluate to True
, but:
FullSimplify[Log[n+1]>Log[n],n>=2]
remains unchanged?
Thank you.
In addition to:
Resolve[ForAll[n, n >= 1, Log[n + 1] > Log[n]]]
You can try:
FullSimplify[Log[n + 1] > Log[n], n >= 1,
TransformationFunctions -> {Automatic, Exp}]
True
Exp[expr]
is not equivalent to expr
, I don't think I'd count it as a valid transformation. We could really take a short cut and use TransformationFunctions -> {Automatic, True &}
in this case. :)
$\endgroup$
Jun 23 at 18:18
TransformationFunctions -> {Automatic, # /. r : _Greater :> ApplySides[Exp, r] &}
$\endgroup$
Jun 23 at 18:57
Okay, thank you all for your input. I think the simplest approach for obtaining True
is:
FullSimplify[Reduce[Log[n + 1] > Log[n], n], n >= 2]
i.e., allowing Reduce
to do its mathematical reduction, and then FullSimplify
"cleans up" with the assumptions. In (slightly?) more complex cases, Reduce
may require the assumption as part of the list of expressions.
As @Nasser mentioned in a comment, simplification in Mathematica tries to minimize the "complexity" of an expression, which is predominantly measured by LeafCount[]
. There are two difficulties with Full/Simplify
: First, they have only a finite set of transformation functions available and a needed transformation may be missing. Second, they limit how far down rabbit trails they are willing to go in seeking a simpler expression. Consequently, as a discrete global minimization problem, one is not guaranteed to find the minimum.
One can add transformation functions, and if a Simplify
is thrown into them, it might take the search further down a trail toward the minimum.
FullSimplify[Log[n + 1] > Log[n], n >= 2,
TransformationFunctions -> {Automatic,
# /. r : _Greater :> Simplify[SubtractSides[r, Last@r], n >= 2] &}]
(* True *)
If you throw in echo = (Print[#1]; #1) &
as a TransformationFunction
, you see some (maybe all) the expressions that are transformed. While both the OP's FullSimplify
and mine try Log[1 + 1/n]
, only mine tries Log[1 + 1/n] > 0
(within the Simplify[]
transformation function). And that makes the difference.
Reduce[{Log[n + 1] > Log[n], n >=2}]
. $\endgroup$Resolve[ForAll[n, n >= 1, Log[n + 1] > Log[n]]]
$\endgroup$FullSimplify
works for the one, and not the other? And whyReduce
succeeds with both? Do you in general shy away fromFullSimply
, in favor ofReduce
? Asked differently: why wouldResolve
all of a sudden be necessary? Perhaps the key is thatFullSimplify
is pattern matching, whereas the other two are performing mathematical reduction/resolution? Thanx. $\endgroup$