Tag Info

Hot answers tagged

5

Just to summarize my understanding: First of all, the documentation states that Simplify assumes that variables are real when they occur algebraically in inequalities. Clearly, there are no inequalities in the logical expression y == 0 && x^2 == -1, and therefore x and y should be assumed to be general complex numbers. If they were real, then the ...


5

Use ComplexExpand expr1 = E^(-2*t*g)*Sqrt[E^(4*t*(g + 2*I*l))]; expr2 = expr1 // ComplexExpand // FullSimplify[#, {l > 0, g > 0, t > 0}] & Sqrt[E^(8*Ilt)] expr1 == expr2 // FullSimplify[#, {l > 0, g > 0, t > 0}] & True


4

Often, it is desirable to apply Simplify or FullSimplify to parts of an expression and then recombine the parts. A particularly effective function for this purpose is Collect. For instance, Collect[expr, a^2 - b^2, Simplify] (* (4 a^2 - 3 b^2)/(a^2 - b^2)^2 - 8/(b^2 - c^2)^2 *) Although there is no need to use FullSimplifyin this case, it runs faster ...


4

I think the following code will do the trick: Collect[expr, Derivative[_, _][g][_, _]] If you want Mathematica to try to simplify each "coefficient", you can use this version instead: Collect[expr, Derivative[_, _][g][_, _], Simplify] I can't claim full credit for this code — there's an example in the "Scope" section of the documentation for Collect ...


4

I can see your surprise, but Mathematica seems to be behaving as you would expect according to the documentation. In particular, it may seem careless to you, but it is clearly spelled out in the documentation that any variable involved in an inequality is implicitly considered a real number. As a reference, see: the Assumptions and Domains page of the ...


3

Extended comment: $Version "10.1.0 for Mac OS X x86 (64-bit) (March 24, 2015)" eq = 0.0055356626 + 0.000029 x + 0.000034 y <= 1000.; eq // Simplify x + 1.17241 y <= 3.44826*10^7 Use of assumptions reproduces the problem: Simplify[eq, {x > 0, y > 0}] False However, use of Rationalize avoids the problem with using ...


2

EDIT The CoefficientRules method given below won't work if one wants to collect by patterns like Log[_] or _Log (although it will work if the stuff inside the Log is explicitly given). In this case, my instinct is that Collect is then the way to go, and the method supplied by the OP will work pretty well as it is. CoefficientRules method Variables ...


1

It's a badly written example. What it is trying to show is something like the following behavior, where the local Assumptions option overrides the global $Assumptions. $Assumptions = x == -1; FullSimplify[E^(LogGamma[x] + LogGamma[y])] FullSimplify::infd : "Expression LogGamma[x] + LogGamma[y] simplified to ∞. ∞ FullSimplify[E^(LogGamma[x] + ...


1

The following works on the two "Simple Examples" logSimplify = FullSimplify[#, (# > 0) & /@ Union@Cases[Cases[#, Log[z_] -> z, Infinity], z_Symbol -> z, Infinity]] & logSimplify[x Log[a] + x Log[b]] (* x Log[a b] *) logSimplify[x Log[a/b] + y Log[b/a]] (* (x - y) Log[a/b] *) and also on some variants logSimplify[x Log[a^2/b^3] + y ...


1

Maybe you could extract the arguments of your Logs, then turn them into a list of assumptions to feed to e.g. FullSimplify: arguments = Cases[ {(3 Log[whatever/argument + you have] + 5)/2 + some other crud / and + many Exp[4^more] Log[expressions]}, Log[a_] -> a, Infinity ]; arguments > 0 (* Out: {expressions > 0, ...


1

I feel I've worked on a problem like this before. Maybe there is a similar question on the site, but I can't find it. It reminds me a little of Why does Mathematica simplify $x/x\to1$?, in which the symbolic result is generically true. Analysis The method used in the sum is Method -> "IteratedSummation" so we can examine the major steps: Sum[ ...



Only top voted, non community-wiki answers of a minimum length are eligible