Hot answers tagged

3

You can use a conditional replacement rule to set any power of x higher than 1 to zero: simp[expr_, x_] := ExpandAll[expr] /. {Power[x, a_] /; a > 1 -> 0} simp[(1/x - 3 x + 4 - x)^4, x] simp[(1 - x)^2, x] (* -416 + 1/x^4 + 16/x^3 + 80/x^2 + 64/x - 256 x *) (* 1 - 2 x *) Of course, the easy way to do it would be to just take the Series and convert ...


3

It is important to keep in mind that ArcTan[Tan[x]] is not always equal to x. When x is between -Pi/2 and Pi/2, it is valid. So we have In[24]:= ArcTan[Tan[x]] Out[24]= ArcTan[Tan[x]] And In[25]:= FullSimplify[ArcTan[Tan[x]], -Pi/2 < x < Pi/2] Out[25]= x Similarly, it follows that In[26]:= FullSimplify[ArcTan[Cos[x], Sin[x]], ...


3

I received a prompt response from Wolfram Technical Support: "...there is an option in system setting called 'AssumptionsMaxNonlinearVariables'. This option specifies the maximal number of variables in non-linear inequality assumptions. By default, this option is set as 4. After changing it to 5, the issue is solved" ...


3

This is in reaction to a comment: A closer example to my application is this: 1.*10^-22 Sqrt[1.035998097490982*^47 - 6.518057203453232*^45 x]. Rationalize[] does not give a substantial simplification. In this case the scenario is quite different than in the original formulation of the question which would suggest that the numbers involved are still ...


2

Instead of a combination of Rationalize and MantissaExponent, as shown in the answer by JasonB, one can use a combination of FromDigits and RealDigits: Sqrt[3.1 10^45 + x 10^47]/(1 10^22) /. x_Real :> Sign[x]*FromDigits@RealDigits[x] // Simplify $\ $Sqrt[31 + 1000 x]


2

Hopefully someone can come up with a better way to do this. If I understand correctly, the issue is that Simplify[Sqrt[3 10^45 + x 10^47]/(1 10^22)] gives a nice and short result, with no large powers of 10, (* Sqrt[30 + 1000 x] *) while this Simplify[Sqrt[3.1 10^45 + x 10^47]/(1 10^22)] (* Sqrt[3.1*10^45 + 1.*10^47 x]/10000000000000000000000 *) ...


2

% refers to the last output, which is A (2 x1 + 2 x2) + A B (y1 + y2) in your code; and [[1]] means the first part of that expression in level 1, which is the first part of Plus[A (2 x1 + 2 x2), A B (y1 + y2)], yields A (2 x1 + 2 x2). Similarly the second part is A B (y1 + y2). However, the usage of Simplify here is treating A B (y1 + y2) as an assumption. ...


2

You can use the ExcludeForms option described in the Simplify documentation. For example, Simplify[{x^2 + 2 x + 1 == 0, 4 x^2 == 0}, ExcludedForms -> {0}] (* returns {(x + 1)^2 == 0, 4 x^2 == 0} *) Alternatively, Simplify[{x^2 + 2 x + 1 == 0, 4 x^2 == 0}, ExcludedForms -> {x^2, 0}] (* returns {1 + 2 x + x^2 == 0, 4 x^2 == 0} *) The actual ...


2

Try this: Sqrt[Im[z1]^2 - 2 Im[z1] Im[z2] + Im[z2]^2 + (Re[z1] - Re[z2])^2] // ComplexExpand // Simplify (* ((z1 - z2)^4)^(1/4) *) Have fun!


1

On the other hand, we can use DifferentialRootReduce[] on LegendreP[1/2 (-1 + Sqrt[17]), x] to see what linear differential equation is satisfied by it: Operate[FullSimplify, DifferentialRootReduce[LegendreP[1/2 (-1 + Sqrt[17]), x], x]] DifferentialRoot[Function[{y, x}, {-4 y[x] + 2 x y'[x] + (-1 + x^2) y''[x] == 0, y[0] == ...


1

I think the problem is because the pattern n_/x_ ** y_ doesn't match the expression 1/b ** a. You can see that in the full form: FullForm[1/b ** a] (*Power[NonCommutativeMultiply[b,a],-1]*) FullForm[n/x ** y] (*Times[n,Power[NonCommutativeMultiply[x,y],-1]]*) So this deosn't work Simplify[- (1/a) ** (1/b) + 1/b ** a, Assumptions -> {n_/x_ ** y_ == ...


1

You can use the TargetFunctions option of ComplexExpand[]: FullSimplify[ComplexExpand[(2 (ArcCot[E^(-((I ϕ)/2)) r] + ArcCot[E^((I ϕ)/2) r]))/π, TargetFunctions -> {Re, Im}], r > 1 && -π < ϕ < π] (2 (ArcCot[Sec[ϕ/2] (r + Sin[ϕ/2])] + ArcCot[r Sec[ϕ/2] - Tan[ϕ/2]]))/π One could probably argue for the ...


1

The answer is completely satisfactory. It returns the result in terms of Arg which is always a real number. If look for its imaginary part Im@ComplexExpand[(2 (ArcCot[E^(-((I \[Phi])/2)) r] + ArcCot[E^((I \[Phi])/2) r]))/\[Pi]] 0 So your answer is a Real quantity.


1

$Version (* "10.4.1 for Mac OS X x86 (64-bit) (April 11, 2016)" *) expr = Assuming[{r > 1, -π < ϕ < π, ϕ ∈ Reals}, Sum[ r^-n 4/π Sin[n π/2]/n Cos[n ϕ/2], {n, 1, ∞}]] // FullSimplify expr2 = Assuming[{r > 1, -π < ϕ < π, ϕ ∈ Reals}, expr // ComplexExpand[#, TargetFunctions -> {Re, Im}] & // ...


1

I am not sure whether the symbolic calculation is correct, but I would suggest that you don't pre-calculate the value of the sum; rather, let the sum be calculated when the values of $n_1$ and $n_2$ are on hand by using SetDelayed in your definition of K1: Clear[Kin] Kin[n1_, n2_] := Sum[(-1)^(m1 + m2 + 1) * Binomial[n1 + 1, m1 + 2] * Binomial[n2 + 1, m2 ...



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