Tag Info

New answers tagged

0

Well, if it is only for $\frac{1-cos[c x]}{c}$, I tried the following which works perfectly (even without assumptions): FullSimplify[((1 - Cos[c x])/(c x))/ Sinc[c x]] Sinc[c x] which in turn yields: Sinc[c x] Tan[(c x)/2] I am not sure about the bigger context where you want to use that, expanding this technique depends on what you want to do exactly. ...


2

Simplify[(Cos[2*a + b + c]*Tan[a + 2*b + 2*c])/ Sin[(b + c - a)/2]] /. (b -> Pi - a - c) // TrigExpand Tan[a] Simplify[(Sin[(6*Pi)/5 + x])^2 + (Sin[(4*Pi)/5 - x])^2 // Simplify, Pi/5 + x == ArcCos[m^-1]] // Together (2*(-1 + m^2))/m^2


3

Pardon me if I misunderstand your request. {0, 0} /. CoefficientRules[f[x, y], {x, y}] 1 Fold[Coefficient[##, 0] &, f[x, y], {x, y}] 1 CoefficientList[f[x, y], {x, y}][[1, 1]] 1 Or far more elegantly in this case as J.M. recommends in a comment: f[0, 0] 1


7

One idea is to extend the domain with a piecewise function by taking limits at singularities. ExtendFunctionDomain[expr_, vars_] := Module[{domain, antidomain, locassums, lims}, domain = FunctionDomain[expr, vars, Reals] /. { NotElement[f_, S_] :> Not[f == C[1] && Element[C[1], S]] }; antidomain = Reduce`ToDNF[Reduce[!domain, vars, ...


3

♯ = # & @@ # & ♯ @ q -72 tl;dr ♯♯ = # & @ ## & @@ # & ♯♯ @ q -72


2

q /. Power -> (0 &) -72 Notes: Since 0&[x,y] 0 then Power[x, y]/.Power->(0&) 0 and q /. Power -> (0 &) -72 Additional ways using ReplaceAll for OP's specific example: q /. _Power -> 0 (* thanks: @Guesswhoitis. *) q /. Times -> (0&) q /. _Times -> 0 and using Block (temporarily ...


1

Perhaps use Cases DeleteCases on the default level 1 (I overlooked an assumption in my original use of Cases): q = -72 + 9 (-2 + x)^2 + 4 (3 + y)^2; DeleteCases[q, _?(!FreeQ[#, Alternatives @@ Variables[q]] &)] (* -72 *) A few other methods and examples. One problem with using First is that it assumes the constant is first, which I believe will ...


1

OK, I think this is easier than I thought: c = First[List @@ q] (* -72 *) Is there a yet easier way, or some alternate ways? (Sorry, I had not intended to post something I could so quickly answer myself!)


0

Here is my solution. completeSq calls itself recursively until there is no change. completeSq[a_. x_^2 + b_. x_ + c_: 0] := -(b^2/(4 a)) + a (b/(2 a) + x)^2 + completeSq[c] completeSq[d_] := d It even works with complex real numbers: In[236]:= completeSq[ 4.1 + z^2 + 2 x + I x^2 + 10 y + -3 x - 12 y^2 + 5.1 z + z^2] Out[236]= (2.93208 + 0.25 I) + I ...


1

Here is a simple solution. Think of everything as functions. Then define: A = Function[T , Function[{i,j,k}, u[i+1,j,k]*(T[i+1,j,k]+T[i,j,k]) - u[i-1,j,k]*(T[i-1,j,k]+T[i,j,k]) + v[i,j+1,k]*(T[i,j+1,k]+T[i,j,k]) - v[i,j-1,k]*(T[i,j-1,k]+T[i,j,k]) + ...


1

M1 = 1/3*{{1, 1, 1}, {1, α, α^2}, {1, α^2, α}}; Z1 = {{Z + Zg, Zg, Zg}, {Zg, Z + Zg, Zg}, {Zg, Zg, Z + Zg}}; M2 = {{1, 1, 1}, {1, α^2, α}, {1, α, α^2}}; Either provide an exact value in the Rule M1.Z1.M2 /. α -> -1/2 + I Sqrt[3]/2 // Simplify {{Z + 3 Zg, 0, 0}, {0, Z, 0}, {0, 0, Z}} Or use Rationalize to remove both near zero values and 1. ...


7

Unprotecting and giving meaning to ** (NonCommuntativeMultiply) will do the trick: Unprotect[NonCommutativeMultiply] NonCommutativeMultiply[H___, 0, T___] := 0


1

M1.Z1.M2 /. α -> -.5 + I Sqrt[3]/2 Chop[FullSimplify[%]] (* {{Z + 3 Zg, 0, 0}, {0, 1. Z, 0}, {0, 0, 1. Z}} *)


3

One simple solution to this is to a combination of Simplify and Chop, which will get rid of items like (0. * I). Chop[Simplify[M1.Z1.M2 /. α -> (-0.5 + I*Sqrt[3]/2)]] {{Z + 3 Zg, 0, 0}, {0, 1. Z, 0}, {0, 0, 1. Z}} There are still some (1. Z) terms in there, which, if you look at the FullForm are actually just very close to 1, according to the ...


10

I do analytical calculations with Mma on the regular basis during already about 10 years in the area of theoretical solid state physics. Previously I did such analytical calculations by hand, now I do it in the on-screen regime only, without passing to the paper stage even for intermediate steps. Basing on my experience I can tell the following. The ...



Top 50 recent answers are included