New answers tagged

2

sol = Solve[-t (x - 8)/8 == -2 (x + 4)/t /. t -> Sqrt[tt], tt] /. tt -> t^2 (* {{t^2 -> (16 (4 + x))/(-8 + x)}} *) Equal @@ (First@First@sol) (* t^2 == (16 (4 + x))/(-8 + x) *) Or Reduce[-t (x - 8)/8 == -2 (x + 4)/t /. t -> Sqrt[tt], tt] /. tt -> t^2 (* -8 + x != 0 && 4 + x != 0 && t^2 == (16 (4 + x))/(-8 + x) ...


3

Tell Mathematica your constraint 0 <= x <= 2 Pi: Solve[{Cos[x] + Sin[x] == 0, 0 <= x <= 2 Pi}, x] (*{{x -> 2 π + 2 ArcTan[1 - Sqrt[2]]}, {x -> 2 ArcTan[1 + Sqrt[2]]}}*) FullSimplify[%] (*{{x -> (7 π)/4}, {x -> (3 π)/4}}*)


0

<<k>> means that k elements have not been shown in the expression. The documentation for Short says : Short[expr] gives a "skeleton form" of expr, with omitted sequences of k elements indicated by <<k>>.


9

Function shorthand A short way is to use this Function notation: (x \[Function] 2 x + 1) /@ {1, 2, 3} (* output: {3, 5, 7} *) In a Notebook this formats as: The \[Function] operator can be entered with EscfnEsc. Cases Nasser's suggestion does not meet your requirements because it relies on listability just as (2x+1) /. x -> {1,2,3} does. ...


Top 50 recent answers are included