Tag Info

New answers tagged

7

You can try something like this using Factor to help grease the wheels: expr = Sqrt[u^4 + 4 u^6]; PowerExpand[Factor[expr]] (* u^2 Sqrt[1 + 4 u^2] *) I think this will work in any of your cases. expr = Sqrt[u^6 + 4 u^9] PowerExpand[Factor[expr]] (* u^3 Sqrt[1 + 4 u^3] *)


1

As a place to start I suggest TransformationFunctions: FullSimplify[expr1, TransformationFunctions -> {Automatic, schId, sortarg}] 0 This works even if both sortarg and schId are defined with /. rather than //.. For more manual application consider MapAt. Also familiarize yourself with levelspec.


1

Here is a way of computing the result that you seek. Define the operators. I have used a convention in which upper/lower indices are given as first/second arguments. Clear[op1, op2] op1[mu_, nu_, alf_, bet_] := -p^2 (eta[{mu, alf}, {}] eta[{nu, bet}, {}] + eta[{mu, bet}, {}] eta[{nu, alf}, {}] - eta[{mu, nu}, {}] eta[{alf, bet}, {}]) ...


3

Edit: I started from the assumption that m and X are matrices, because of the Dotfunction you used. Then the following is valid: Try this: expr = D[(1/2)*m.X[t]^2, X[t]] (* 1/2 m.(2 X[t]) *) then expr /. Dot[a_, Times[2, b_]] -> Times[2, Dot[a, b]] (* m.X[t] *) As soon as you state that they are simple variables, just replace the Dot(.) by ...


3

Convert the denominator to a single variable, FullSimplify, and then restore the original denominator. expr = (e*a + e*b + c + f)/(a + b); ((expr /. a -> z - b) // FullSimplify) /. z -> a + b e + (c + f)/(a + b)


3

expr = -(m - 2 r + b^2 (-7 m + 6 r)) ((-m + r)^2 + b^4 (-2 m + 3 r)^2 + b^2 (-3 m^2 + 10 m r - 6 r^2)) + (1 + b^2)^2 m^3 Cos[t]^2; expr2 = (Collect[expr1 /. Cos[t]^2 -> x - b^2, x] // FullSimplify) /. x -> (b^2 + Cos[t]^2) (-1 + 3 b^2)^3 (m - 2 r) (m - r)^2 + (1 + b^2)^2 m^3 (b^2 + Cos[t]^2) expr == expr2 // Simplify True ...


3

It appears Surd is not integrated into Quantity (and it probably should be). This auto simplifies: r = Quantity[10, "Meters"]; v = 4/3 r^3 Pi; (%*3/4/Pi)^(1/3) Quantity[10, "Meters"]


2

You can add ComplexExpand to the transformations FullSimplify will try (since a is real). But FullSimplify seeks to minimize the complexity of the expression, and the starting expression is a local minimum, To get it over the hump, we can penalize Abs. Assuming[0 <= a <= π/2, FullSimplify[Abs[Sin[4 a]] == 2 Abs[Cos[2 a]] Sin[2 a], ...


3

As I was recently informed by Wolfram support, Simplify is not guaranteed to fully solve equalities or inequalities. Take this example: FullSimplify[Log[x] > 1, Element[x, Reals]] (* Log[x] > 1 *) Reduce[Log[x] > 1, x, Reals] (* x > E *) We can also get your equation to simplify by using Reduce. Reduce[Abs[Sin[4 a]] == 2 Abs[Cos[2 a]] Sin[2 ...


3

Via TransformationFunctions: Clear[xf]; xf[e_] := e /. {Integrate[int_, {x_, a_, b_}] - Integrate[int_, {x_, a_, c_}] :> Integrate[int, {x, c, b}], coeff_ Integrate[int_, {x_, a_, b_}] :> Integrate[coeff int, {x, a, b}]}; sol = DSolve[{f'[t] + f[t]*g[t] == h[t], f[0] == f0}, {f[t]}, t]; Simplify[sol, ...


4

Mathematica evidently won't simplify Integrate[f[t], {t, a, b}] + Integrate[f[t], {t, b, c}] to Integrate[f[t], {t, a, c}] on its own. However, you can easily write a function that does what you want, by using Mathematica's ability to have functions do pattern matching on their arguments. Here's a function that will do what we want: ...


0

One complete overkill solution to the problem might be to use the Notation Package.


4

You can use Evaluate to "force evaluation of the right-hand side of a delayed definition" (as stated in its documentation). For example f[x_] := Simplify[Sqrt[x^2], x > 0] Definition@f f[x_] := Simplify[Sqrt[x^2], x > 0] g[x_] := Evaluate@Simplify[Sqrt[x^2], x > 0] Definition@g g[x_] := x


1

expr = (a + b)/r 1/Denominator[expr]


1

It might help you to look at each side separately. Starting with the left-hand side lhs = Sum[(p/(1 - p))^s*(q/(1 - q))^s* Binomial[n, s]*(Binomial[m - 1, s]*(p*q*(m + n) + (2*m - 1)*(-p - q + 1))), {s, 0, n}] -Hypergeometric2F1[1 - m, -n, 1, (pq)/((-1 + p)(-1 + q))] + 2*mHypergeometric2F1[1 - m, -n, 1, (pq)/((-1 + ...


1

I think you are looking for Replace: p4 - p5 == r45 i45 /. r45 -> 1 (* p4 - p5 == i45 *) % /. lhs_ == rhs__ -> rhs - lhs == 0 (* i45 + p5 - p4 == 0 *)


2

ClearAll[a, b, c, d, x, y] expr = a x + b y + c x == d x; You can use any of Collect[(expr /. Equal -> Subtract) == 0, x] Collect[Subtract @@ expr == 0, x] FullSimplify[(expr /. Equal -> Subtract) ] == 0 FullSimplify[Subtract @@ expr] == 0 to get (* (a + c - d) x + b y == 0 *) Alternatively, use a custom ComplexityFunction that makes non-zero ...


2

As you note yourself the difference between b^0 (1/b)^(3/2) and b^0 (1/b)^(5/2) is that the second form results in transformation into Sqrt[1/b]/b^2. This in turn is transformed into (1/b)^(5/2) b^0 causing an infinite loop. You can see some more detail of the process with this: b /: NumericQ[b] = True; $IterationLimit = 20; Trace[Sqrt[1/b]/b^2, ...


3

Probably some internal weirdness with the ComplexityFunction, but: Simplify[Sqrt[1/(a + b c d e )] Sqrt[a + b c d e ]==1] // PowerExpand Simplify[1 == Sqrt[a + b*c*d*e] Sqrt[1/(a + b*c*d*e)], x4 > 0] // PowerExpand (* True True *)


2

I appreciate Jens's answer. However I want to answer literally For example, a sum of several fractions of this form would require isolation of each fraction first, then pattern replacement, then reconstruction of the full expression. Is there a more efficent and general method for this type of replacement/pattern matching? Here are nice functions ...


1

Try f[x_, y_] = Block[{x, y}, Assuming[x ∈ Reals && y ∈ Reals, Log[Det[V[x, y]\[ConjugateTranspose].V[x, y]]] /. e : Conjugate[EllipticTheta[a_, z_, q_]] :> EllipticTheta[a, Conjugate[z], q] // Simplify ] ]; Chop[N[Q[1, 1]]] (* 2.10739 *)


2

expr = 1/((x + a + b) (c + d)); Based on clipping by total degree. Let me make this answer more general. ClearAll@expand Options[expand] = {"SmallTerms" -> Automatic, "Order" -> 1, "Except" -> {}}; expand[expr_, OptionsPattern[]] := Module[{ t, vars = Fold[ DeleteCases, Flatten[{OptionValue["SmallTerms"]} /. Automatic -> ...


0

Given expr = 1/((x + a + b) (c + d)); expr2 = 1/((x + a + b + f) (x + c + d)); While not the most elegant, this appears to do the trick simpliFunc = Numerator[#] / Plus @@ Thread[ Times[ x^# & /@ Range[Length@Rest@CoefficientList[Expand@Denominator[#], {x}]], Rest@CoefficientList[ Expand@Denominator[#], {x}] ] ] & ...


1

expr = 1/((x + a + b) (c + d)); ExpandAll[expr] /. Times[v1_ /; v1 =!= x, v2_ /; v2 =!= x] :> 0 (*1/(c x + d x)*)


7

Here is how I would do it: expr = 1/((x + a + b) (c + d)); Limit[ ϵ expr /. Thread[# -> ϵ #] &@Select[Variables[expr], # =!= x &], ϵ -> 0 ] (* ==> 1/(c x + d x) *) I replaced all variables except x by ϵ times themselves and took the limit of ϵ times the original expression as ϵ goes to zero. This will leave only terms linear in the ...



Top 50 recent answers are included