Tag Info

New answers tagged

1

The code below works for matrices representing ordinary complex numbers. matrixToComplexNumber[{{a_, b_}, {c_, d_}}] := Module[{p, q, x}, p = (a - d)^2/4 + b c; If[p >= 0, Return["N is not an ordinary complex number"]]; x = (a + d)/2; Return[{x, Sqrt[-p]}]; ] See: 2x2 Real Matrices


1

Log[1, Pi] (* ComplexInfinity *) Log[0, Pi] (* 0 *) Log[Pi, -1] // N (* 0. + 2.744 [ImaginaryI] *) f[x_] := Im@Log[x, -1]; GraphicsGrid[{{Plot[f[x], {x, 0.99, 1.02}, PlotRange -> All], Plot[f[x], {x, 0.99, 1.02}, PlotRange -> Automatic]}}] Log[Pi, 0] // N (* -Infinity *)


1

Rule {Complex[re_, im_] :> Complex[re, -im]} seems to convert complex expressions which contain symbols which are meant to be real. Rule {I -> -I} does not, even on simple example: 2 I /.{I -> -I} 2 I the reason being that symbol I is automatically translated by Mathematica to Complex[0, 1] and rule above is interpreted ...


3

Look at the documentation for Re, under Possible Issues Re can stay unevaluated for numeric arguments: {Re[Log[2 + I]], Re[Sqrt[1 + I]]} To get around this, try using Re[ComplexExpand[χ/(1 + I ω τ)]].


0

You can also use Refine with Element : Refine[Sqrt[2] Conjugate[Sqrt[1/L]] Sin[(Pi* Conjugate[n x])/Conjugate[L]], {Element[L, Reals], Element[n, Integers]}] gives and if you add that L>0: Refine[Sqrt[2] Conjugate[Sqrt[1/L]] Sin[(Pi* Conjugate[n x])/Conjugate[L]], {Element[L, Reals], Element[n, Integers], L > 0}] Other simple examples : 1. ...



Top 50 recent answers are included