Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

All published worksheets from http://sagenb.org

Views: 168756
Image: ubuntu2004
x,y = var('x,y') p1=complex_plot((x), (-5,5), (-5,5)) p2=contour_plot((sqrt(x**2 + y**2)), (x,-5,5), (y,-5,5), fill=false)
show(p1+p2)
x,y = var('x,y') p1=complex_plot(sin(x), (-5,5), (-5,5)) p2=contour_plot(sin(sqrt(x**2 + y**2)), (x,-5,5), (y,-5,5), fill=false)
show(p1+p2)
x,y = var('x,y') p1=complex_plot(cos(x), (-5,5), (-5,5)) p2=contour_plot(cos(sqrt(x**2 + y**2)), (x,-5,5), (y,-5,5), fill=false)
show(p1+p2)
x,y = var('x,y') p1=complex_plot(x**2, (-5,5), (-5,5)) p2=contour_plot((sqrt(x**2 + y**2))**2, (x,-5,5), (y,-5,5), fill=false)
show(p1+p2)
x,y = var('x,y') p1=complex_plot(e**x, (-5,5), (-5,5)) p2=contour_plot((exp(x)), (x,-5,5), (y,-5,5), fill=false)
show(p1+p2)
x,y = var('x,y') p1=complex_plot(tan(x), (-5,5), (-5,5)) p2=contour_plot(tan(x), (x,-5,5), (y,-5,5), fill=false)
show(p1+p2)
x,y = var('x,y') p1=complex_plot(arctan(x), (-5,5), (-5,5)) p2=contour_plot(arctan(x), (x,-5,5), (y,-5,5), fill=false)
show(p1+p2)
x,y = var('x,y') p1=complex_plot(arcsin(x), (-5,5), (-5,5)) p2=contour_plot(arcsin(x), (x,-5,5), (y,-5,5), fill=false)
show(p1+p2)
x,y = var('x,y') p1=complex_plot(arccos(x), (-5,5), (-5,5)) p2=contour_plot(arccos(x), (x,-5,5), (y,-5,5), fill=false)
show(p1+p2)
x,y = var('x,y') p1=complex_plot(x, (-5,5), (-5,5)) p2=contour_plot(sqrt((real(x+y*I))^2+(imag(x+y*I))^2), (x,-5,5), (y,-5,5), fill=false)
show(p2+p1)
+I**2
-1
real?

File: /usr/local/sage2/local/lib/python2.6/site-packages/sage/functions/other.py

Type: <class ‘sage.functions.other.Function_real_part’>

Definition: real(*args, coerce=True, hold=False, dont_call_method_on_arg=False)

Docstring:

EXAMPLES:

sage: z = 1+2*I
sage: real(z)
1
sage: real(5/3)
5/3
sage: a = 2.5
sage: real(a)
2.50000000000000
sage: type(real(a))
<type 'sage.rings.real_mpfr.RealLiteral'>
sage: real(1.0r)
1.0

TESTS:

sage: loads(dumps(real_part))
real_part

Check if #6401 is fixed:

sage: latex(x.real())
\Re \left( x \right)

sage: f(x) = function('f',x)
sage: latex( f(x).real())
\Re \left( f\left(x\right) \right)
numpy?
No object 'numpy' currently defined.
3.00000000000000 + 4.00000000000000*I
x,y = var('x,y') C = ComplexField(); C p1=complex_plot(x, (-5,5), (-5,5)) p2=plot3d(abs(sin(C(x, y)), (x,-5,5), (y,-5,5), fill=false)
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "_sage_input_45.py", line 10, in <module> exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("eCx5ID0gdmFyKCd4LHknKQpDID0gQ29tcGxleEZpZWxkKCk7IEMKcDE9Y29tcGxleF9wbG90KHgsICgtNSw1KSwgKC01LDUpKQpwMj1wbG90M2QoYWJzKHNpbihDKHgsIHkpKSwgKHgsLTUsNSksICh5LC01LDUpLCBmaWxsPWZhbHNlKQ=="),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))' + '\n', '', 'single') File "", line 1, in <module> File "/tmp/tmp3L6yKR/___code___.py", line 7 ^ SyntaxError: invalid syntax
imag?

File: /usr/local/sage2/local/lib/python2.6/site-packages/sage/functions/other.py

Type: <class ‘sage.functions.other.Function_imag_part’>

Definition: imag(*args, coerce=True, hold=False, dont_call_method_on_arg=False)

Docstring:

TESTS:

sage: z = 1+2*I
sage: imaginary(z)
2
sage: imag(z)
2
sage: loads(dumps(imag_part))
imag_part

Check if #6401 is fixed:

sage: latex(x.imag())
\Im \left( x \right)

sage: f(x) = function('f',x)
sage: latex( f(x).imag())
\Im \left( f\left(x\right) \right)
imag(sin(x+y*I))
cos(real_part(x) - imag_part(y))*sinh(real_part(y) + imag_part(x))
x,y=var('x,y') imag(x+y*I)
real_part(y) + imag_part(x)
x,y = var('x,y') p1=complex_plot(sin(x), (0,2*pi), (0,.5)) p2=contour_plot(sqrt((real(sin(x+y*I)))^2+(imag(sin(x+y*I)))^2), (x,-0,2*pi), (y,0,.5), fill=false)
show(p1+p2)
complex_plot(sin(x),(-10,10),(-10,10))
real(sin(4+3*I))
sin(4)*cosh(3)
imag(sin(4+3*I))
cos(4)*sinh(3)
x,y,w = var('x,y,w') f(w,y)=x+y*I p1=complex_plot(x, (-5,5), (-5,5)) p2=contour_plot(sqrt((real(f(w,y)))^2+(imag(f(w,y)))^2), (x,-5,5), (y,-5,5), fill=false)
show(p1+p2)
x,y,w = var('x,y,w') f(w,y)=sin(x+y*I) p1=complex_plot(sin(x), (-5,5), (-5,5)) p2=contour_plot(sqrt((real(f(w,y)))^2+(imag(f(w,y)))^2), (x,-5,5), (y,-5,5), fill=false)
show(p1+p2)
x,y,w = var('x,y,w') f(w,y)=cos(x+y*I) p1=complex_plot(cos(x), (-5,5), (-5,5)) p2=contour_plot(sqrt((real(f(w,y)))^2+(imag(f(w,y)))^2), (x,-5,5), (y,-5,5), fill=false)
show(p1+p2)
x,y,w = var('x,y,w') f(w,y)=(x+y*I) p1=complex_plot(x/abs(x), (-10,10), (-10,10)) p2=contour_plot(sqrt((real(f(w,y)))^2+(imag(f(w,y)))^2), (x,-10,10), (y,-10,10), fill=false, axes=true)
show(p1+p2)