ASKSAGE: Sage Q&A Forum - Latest question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sun, 08 Mar 2015 04:22:49 -0500how do i plot 3d planes like x=1https://ask.sagemath.org/question/26070/how-do-i-plot-3d-planes-like-x1/ I plotted z=x^2+y^2 and would like to add some planes to the diagram. How do i plot x=1?fredsmith999Sun, 08 Mar 2015 04:22:49 -0500https://ask.sagemath.org/question/26070/add a plane defined by two vectorshttps://ask.sagemath.org/question/10537/add-a-plane-defined-by-two-vectors/I have a set of three vectors
p1 = vector([1,-0.5,0]) # eigenvector of eigenvalue 2
p2 = vector([0,0,1]) # eigenvector of eigenvalue 2
c = vector([1,-1,0]) # eigenvector of eigenvalue 3
plot(p1, color = "red") + plot(p2, color = "red") + plot(c)
Vectors `p1` and `p2` form a plane since they come from the same eigenvalue. How would I add a plane defined by these two vectors?Roman LuĀtrikFri, 13 Sep 2013 09:30:40 -0500https://ask.sagemath.org/question/10537/Basic vector functions in Sagehttps://ask.sagemath.org/question/8924/basic-vector-functions-in-sage/Isn't there any inbuilt 3D vector functions in Sage?
For instance like a function to get the dot product, cross product or angle between two vectors? Or functions to get the distance from a point to a line? Find the intersections between two lines? Having such functions would be a great help and would greatly increase the speed of my workflow in school.paldepindWed, 25 Apr 2012 00:43:34 -0500https://ask.sagemath.org/question/8924/Unexpected behavior of log() in complex planehttps://ask.sagemath.org/question/8409/unexpected-behavior-of-log-in-complex-plane/For the log() to be defined properly in the complex plane we need to agree on where its cut is located. So, for sage it is easy to check that the cut is located on the negative Re-axis (as is most common), namely
sage: var('eps')
sage: limit(log(-1+i*eps),eps=0,dir='+')
I*pi
sage: limit(log(-1+i*eps),eps=0,dir='-')
-I*pi
Ok. Now I want to use this with symbolic variables. So I do
sage: var('w eps')
sage: forget()
sage: assume(w,'real')
sage: assume(w>0)
sage: limit(log(-w+i*eps),eps=0,dir='+')
I*pi + log(w)
sage: limit(log(-w+i*eps),eps=0,dir='-')
-I*pi + log(w)
Ok. That is correct. Now I want to get a little more adventurous, namely
sage: var('w ec eps')
sage: forget()
sage: assume(w,'real')
sage: assume(ec,'real')
sage: assume(eps,'real')
sage: assume(w>0)
sage: assume(w<ec)
sage: limit(log(w-ec+i*eps),eps=0,dir='+')
I*pi + log(-ec + w)
sage: limit(log(w-ec+i*eps),eps=0,dir='-')
-I*pi + log(-ec + w)
**Oops? This is wrong.** The argument of the log() has not been turned into the absolute value its real part, i.e. `ec-w`. This also contradicts the previous simpler startup examples.
Just for backup. Mathematica will give you
In[6]:= Limit[Log[w-ec+I eps],eps->0,Direction->-1,Assumptions->{w>0,w<ec}]
Out[6]= I Pi+Log[ec-w]
In[7]:= Limit[Log[w-ec+I eps],eps->0,Direction->1,Assumptions->{w>0,w<ec}]
Out[7]= -I Pi+Log[ec-w]
As I was expecting and at variance with sage's output.XaverSun, 23 Oct 2011 09:46:45 -0500https://ask.sagemath.org/question/8409/