New answers tagged

1

Perhaps a very simple answer would be enough. I suggest Times@@ToString /@ {2, 2, 1, 50, 50, 50} which returns $$ 1\, 2^2\, 50^3 $$


5

Defer @* Power @@@ Tally[{2, 2, 1, 1, 3}] {2^2, 1^2, 3^1}


6

This may be useful: Times @@ HoldForm /@ {2, 2, 1, 50, 50, 50} 1 22 503


7

Update Fix issue pointed out by @ZeroTheHero Tally[{2, 2, 1, 1}] /. {x_Integer, y_Integer} :> If[y == 1, y, Defer[x^y]] (* {2^2, 1^2} *) Tally[{2, 2, 1, 1}] /. {x_Integer, y_Integer} :> If[x == 1, x, Defer[x^y]] (* {2^2, 1} *)


7

DisplayForm@RowBox@ Riffle[If[#2 == 1, #1, #1^#2] & @@@ Tally[HoldForm /@ {2, 2, 1, 50, 50, 50}], "\[ThinSpace]"] $2^2\, 1\, 50^3$ You can also apply TraditionalForm and TeXForm gracefully on this (but only after DisplayForm.


3

If one knows or suspects that a complicated algebraic expression can be written as an unknown combination of a small number of simpler terms, one can use SolveAlways to check this. In the present case, the physical rationale underlying the situation is investigating relativistic invariants of the electromagnetic field, where it is known that the only two ...


0

See this page Wolfram Support: default format. Set Output option under New Cell Defaults, CommonDefaultFormatTypes "Output" to TraditionalForm. If you prefer it to stay that way?


1

Clear["Global`*"] You can use a temporary dummy variable to result in the traditional ordering of multinomials. tradPoly[expr_, vars_] := (expr /. Thread[vars -> temp*vars] // TraditionalForm) /. temp -> 1 tradPoly[expr = (x + y + 1)^5 // Expand, {x, y}] Since the wrapper is not included in the definition of expr, the wrapper does not affect ...


4

After some more searching within the documentation, it seems that CurrentValue[$FrontEndSession, {CommonDefaultFormatTypes, "Output"}] = StandardForm; does the trick.


4

If we examine the box structure of the output with shift-cmd-e, we can change the value "Tiling" points to. For the input Graphics3D[{StippleShading[], Sphere[]}, Boxed -> False, Lighting -> "Accent"] it's output has boxes Here's a few choices: Edit It looks like we can use the box structure in the initial call: stipple = SurfaceAppearance["...


3

Ok, here is it. I use HoldAll,HoldFirst seems also ok. I find that Attributes[Integrate] only has {Protected, ReadProtected} ,so I removed the HoldAll or HoldFirst IntWithStepsOfTeXForm[formula_, j_] := With[{TeX2Str = Convert`TeX`ExpressionToTeX}, Steps[Int[formula, j], RubiPrintInformation -> False] // Flatten // ...


2

One quick way could be Plot[21000 x, {x, 42, 49}, Ticks -> {Automatic, Range[900000, 10^6, 50000]}] But it losses the minor ticks for some reason and I do not know now why. If I find, will update. Update Thanks to J.M.'s suggestion in the comment below. It is possible to create the ticks directly. Hence using his suggestion you could do ClearAll[x]; ...


7

Export suffers similar problem. The solution I found is, use *Form only on numbers: a = {{1.3432, 34.432123}, {5.65454, 78.9883}}; Clear[numberForm] numberForm[a_List, n_] := numberForm[#, n] & /@ a numberForm[a_, n_] := NumberForm[a, n] b = numberForm[a, {2, 2}] MatrixForm@b


0

Thanks for your input Rohit, it got me thinking. As a result, here's what I've come up with (*formatting values *) fontSize = 20; frameThickness = 5; itemSize = 1.5; (* Value Ranges *) xmin = 0; xmax = 10; ymin = xmin; ymax = xmax; (* Functions *) (* Determine which cells for student to fill in *) testFunc[x_, y_] := Mod[(x + y), 3] == 0 (* Define ...


2

You can wrap Grid with Style with the option LineBreakWithin -> False : n = 100; result = Join[ConstantArray["A", {3, n}], ConstantArray["T", {3, n}]]; columnlabels = Range[Last[Dimensions[result]]]; newcolumnlabels = Rotate[StringTake["00000" <> ToString[#], -5], \[Pi]/2] & /@ columnlabels; Style[Grid[Prepend[result, newcolumnlabels], ...


3

How about randomly blanking out cells to be filled in. hideCells = 30; (* Number of cells to blank out *) tableInterior = Table[x + y, {x, xmin, xmax}, {y, ymin, ymax}] // ReplacePart[RandomInteger[{2, xmax + 1}, {hideCells, 2}] -> ""] tableInterior[[1, 1]] = "+"; fullTable = Grid[tableInterior, Frame -> {xFrameStyle, xFrameStyle}, ...


Top 50 recent answers are included