Recent content by guerom00

  1. G

    Mathematica Dealing with a Discontinuous ArcTan[] Function in Mathematica

    I see now… :) Well, that doesn't solve my problem: I now have a function of this angle (I use this ArcTan[] to calculate an angle, obviously) which is discontinuous at one point… I'll have to make a specific test to avoid this very point. Thanks :)
  2. G

    Mathematica Dealing with a Discontinuous ArcTan[] Function in Mathematica

    Result : 0 Alternative form : -1.5708 :confused: WTF ?! This is clearly broken, no ? :biggrin: Edit: Haha :biggrin: Compare http://www.wolframalpha.com/input/?i=ArcTan%5B1.%2B0+I%2C+0.%5D and http://www.wolframalpha.com/input/?i=ArcTan%5B1.%2B0.+I%2C+0.%5D Difference is subtle…
  3. G

    Mathematica Dealing with a Discontinuous ArcTan[] Function in Mathematica

    Like I said : http://reference.wolfram.com/mathematica/ref/ArcTan.html Click the “More Information” and have a look at the last bullet :) ArcTan[x,y] is simply ArcTan[y/x]. If x or y are complex, y/x is a complex number… No problem here.
  4. G

    Mathematica Dealing with a Discontinuous ArcTan[] Function in Mathematica

    The help page of ArcTan[x,y] indicates that it can handle complex arguments. It then uses the expression which involves the Log[] I gave. Problem is: my quantities x and y are not complex according to the tests I make… Which is strange because I thought that the number 0.` is different from 0...
  5. G

    Mathematica Dealing with a Discontinuous ArcTan[] Function in Mathematica

    Hello everyone, I copy-paste here a little bit of code: In[4417]:= x = (1.5` + 0.` I); y = (0.` + 0.` I); (* 1 *) ArcTan[x, y] (* 2 *) ArcTan[x // Chop, y // Chop] (* 3 *) -I Log[(x + I y)/Sqrt[x^2 + y^2]] {y == 0, Re[y] == 0, Im[y] == 0, Im[x] == 0} Out[4419]= -1.5708 + 0. I...
  6. G

    Mathematica [Mathematica] Combining several Graphics in a Graphics3D

    Thanks for your answer. StackGraphics[] does work and does what I want although it lacks basic options...
  7. G

    Mathematica [Mathematica] Combining several Graphics in a Graphics3D

    Hello all, I'll try to make myself clear... My goal here is to plot a function f(x,y) in 3D. But, instead of using the Plot3D[] function, I made a table of Plot[] for, say, several values of the x variable. So I'm now with a list which looks like this ...
  8. G

    Mathematica [Mathematica] Redefining a built-in symbol

    Thank you for your answer, I'll try that. And thanks for your warnings : I better define my own square root function and leave the built-in one untouched :)
  9. G

    Mathematica [Mathematica] Redefining a built-in symbol

    Hello all :) I would like to redefine the built-in square root function. I have written this : mySqrt[z_]:=√z; Unprotect[Sqrt]; Sqrt[z_]:=If[Re[mySqrt[z]]+Im[mySqrt[z]]>0,mySqrt[z],-mySqrt[z]]; Protect[Sqrt] This works fine and redefine Sqrt[] as I want it to be. But, the symbol √ (by typing...
  10. G

    Mathematica [Mathematica] Confusion with Return[]

    OK, thanks :) Well, at least for my purpose, using the f[x_]:=body notation solves the issue… @Simon_Tyler: I can reproduce this issue both in 7.0.1 and 8 on a Mac.
  11. G

    Mathematica [Mathematica] Confusion with Return[]

    I think the bottom line is that there must be a difference between defining a function using the notation f=Function[x,body] and the notation f[x_]=body. But I don't know, I thought those two notations were equivalent...
  12. G

    Mathematica [Mathematica] Confusion with Return[]

    Hello all, There's something I don't understand when using Return[]… Take this input : f := Function[{x}, (If[x > 5, Return[a]]; x + 3)]; g[x_] := (If[x > 5, Return[a]]; x + 3); and this output : In[25]:= f[6] g[6] Out[25]= Return[a] Out[26]= a In one case, it returns...
  13. G

    Integral of Log det(1-A(x).B(x)) wrt x

    Indeed there is a closed form for numbers (1x1 matrices) which necessarily commute. I'm wondering if that can be somehow generalized for non commuting matrices quantities. I know that if a closed form exists, it will indeed involve the dilogarithm of a matrix :biggrin: I'll think of what this...
  14. G

    Integral of Log det(1-A(x).B(x)) wrt x

    True. So let me be more specific because, in my case, how my matrices depend on x is known :smile: In reality I have a product of 4 matrices : R1.Exp[-k x].R2.Exp[-k x] Let me explain each terms : • R1 and R2 do not depend on x but are not symmetric (hence the no commutation in all those...
  15. G

    Integral of Log det(1-A(x).B(x)) wrt x

    Hello all :) I have two square matrices whose elements are functions of a variable x, let's call them A(x) and B(x). Those two matrices do not commute : A(x).B(x)≠B(x).A(x) I then define the quantity Log det(1-A(x).B(x)) where 1 is the identity matrix. I'm interested in a closed form for...
Back
Top