Tag Info

New answers tagged

1

Different version of Bob Hanlon's solution: f = (1 - # &)@*(1 - # &)@(# &) (*#1 &*) f@x (*x*)


0

Just another way to look f = (1 - #) & (*your function*) g[f__] := (a f@ # + b f@f@#)& (*your arbitrary complicated function of function*) h[x_] := Simplify[g[f][x]] (*your final function*) (I just wanted to use Simplify somehow)


4

Since, Attributes[Function] {HoldAll, Protected} Use Evaluate f = Function[{x}, Evaluate[(1 - # &)@*(1 - # &)@x]] Function[{x}, x] f@x x


1

ToExpression[ "{a-> POR, b-> D610, c-> 0, d-> \"300/7\", e -> \"1/400\"}" ] /. s_String :> Defer @ ToExpression[s] {a -> POR, b -> D610, c -> 0, d -> ToExpression["300/7"], e -> ToExpression["1/400"]} response to comment: ToExpression[ "{a-> POR, b-> D610, c-> 0, d-> \"300/7\", e -> ...


3

Perhaps the closest thing to what you want is to use HoldForm to prevent the sorting behavior of Times due to Orderless: str = "one Test String to see"; HoldForm @@ MakeExpression @ str one Test String to see However it is important to realize that the HoldForm head is still present, only that it is not shown in standard formatted output. Also know ...


1

The issue arises due to numerical rounding differences between the expression and its simplified form. If you Rationalize the original expression you will get the expected results. Eqs = {{-((3 \[Rho]^2 q1[x])/(1 - x^2)^2) - 2. \[Rho]^2 q1[ x] q4[x]^2 - (1/(16 x (-1 + x^2)^2 q1[x] q2[x]^2 q3[ x])) \[Rho]^2 (-4 x q1[x] + (-1 + x^2) ...


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 ...



Top 50 recent answers are included