Hoja02
system:sage


{{{id=1|
var('x,y')
///
(x, y)
}}}

{{{id=4|
"""
ii.9
limite en el origen de (x^2-y^2)/(x^2+y^2)
"""
///
}}}

{{{id=2|
plot3d((x^2-y^2)/(x^2+y^2),(x,-2,2),(y,-2,2))
///
}}}

{{{id=3|
""" si x=y el limite es claramente 0;
si y=0 el limite es 1;
luego esta función no tiene limite en el origen
"""
///
}}}

{{{id=10|
"""
ii.11
limite en el origen de (x^2-2*x*y+y^2)/(x-y)
"""
///
}}}

{{{id=11|
plot3d((x^2-2*x*y+y^2)/(x-y),(x,-2,2),(y,-2,2))
///
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "_sage_input_26.py", line 5, in <module>
    exec compile(ur'plot3d((x**_sage_const_2 -_sage_const_2 *x*y+y**_sage_const_2 )/(x-y),(x,-_sage_const_2 ,_sage_const_2 ),(y,-_sage_const_2 ,_sage_const_2 ))' + '\n', '', 'single')
  File "", line 1, in <module>
    
  File "base.pyx", line 76, in sage.plot.plot3d.base.Graphics3d.__repr__ (sage/plot/plot3d/base.c:2247)
  File "base.pyx", line 1083, in sage.plot.plot3d.base.Graphics3d.show (sage/plot/plot3d/base.c:10676)
  File "base.pyx", line 821, in sage.plot.plot3d.base.Graphics3d._prepare_for_jmol (sage/plot/plot3d/base.c:6910)
  File "base.pyx", line 899, in sage.plot.plot3d.base.Graphics3d._transform_to_bounding_box (sage/plot/plot3d/base.c:8618)
  File "/usr/local/sage-4.2-linux-Ubuntu_9.04-i686-Linux/local/lib/python2.6/site-packages/sage/plot/plot3d/shapes2.py", line 270, in frame_labels
    fmt = fmt_string(lz1 - lz0)
  File "/usr/local/sage-4.2-linux-Ubuntu_9.04-i686-Linux/local/lib/python2.6/site-packages/sage/plot/plot3d/shapes2.py", line 255, in fmt_string
    n = max(0, 2 - nd(a/2.0))
  File "/usr/local/sage-4.2-linux-Ubuntu_9.04-i686-Linux/local/lib/python2.6/site-packages/sage/plot/plot3d/shapes2.py", line 250, in <lambda>
    nd = lambda a: int(log(a)/log10)
ValueError: cannot convert float NaN to integer
}}}

{{{id=12|
def f(x,y): return (x^2-2*x*y+y^2)/(x-y)
///
}}}

{{{id=13|
f(1,-1)
///
2
}}}

{{{id=15|
"""
ii.14
"""
///
}}}

{{{id=14|
f(0,0)
///
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "_sage_input_25.py", line 5, in <module>
    exec compile(ur'f(_sage_const_0 ,_sage_const_0 )' + '\n', '', 'single')
  File "", line 1, in <module>
    
  File "_sage_input_21.py", line 5, in f
  File "element.pyx", line 1286, in sage.structure.element.RingElement.__div__ (sage/structure/element.c:10775)
  File "integer.pyx", line 1420, in sage.rings.integer.Integer._div_ (sage/rings/integer.c:11119)
  File "integer_ring.pyx", line 247, in sage.rings.integer_ring.IntegerRing_class._div (sage/rings/integer_ring.c:5148)
ZeroDivisionError: Rational division by zero
}}}

{{{id=16|
plot3d((x^2-2*x*y+y^2)/(x-y),(x,-2,2),(y,-2,2))
///
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "_sage_input_27.py", line 5, in <module>
    exec compile(ur'plot3d((x**_sage_const_2 -_sage_const_2 *x*y+y**_sage_const_2 )/(x-y),(x,-_sage_const_2 ,_sage_const_2 ),(y,-_sage_const_2 ,_sage_const_2 ))' + '\n', '', 'single')
  File "", line 1, in <module>
    
  File "base.pyx", line 76, in sage.plot.plot3d.base.Graphics3d.__repr__ (sage/plot/plot3d/base.c:2247)
  File "base.pyx", line 1083, in sage.plot.plot3d.base.Graphics3d.show (sage/plot/plot3d/base.c:10676)
  File "base.pyx", line 821, in sage.plot.plot3d.base.Graphics3d._prepare_for_jmol (sage/plot/plot3d/base.c:6910)
  File "base.pyx", line 899, in sage.plot.plot3d.base.Graphics3d._transform_to_bounding_box (sage/plot/plot3d/base.c:8618)
  File "/usr/local/sage-4.2-linux-Ubuntu_9.04-i686-Linux/local/lib/python2.6/site-packages/sage/plot/plot3d/shapes2.py", line 270, in frame_labels
    fmt = fmt_string(lz1 - lz0)
  File "/usr/local/sage-4.2-linux-Ubuntu_9.04-i686-Linux/local/lib/python2.6/site-packages/sage/plot/plot3d/shapes2.py", line 255, in fmt_string
    n = max(0, 2 - nd(a/2.0))
  File "/usr/local/sage-4.2-linux-Ubuntu_9.04-i686-Linux/local/lib/python2.6/site-packages/sage/plot/plot3d/shapes2.py", line 250, in <lambda>
    nd = lambda a: int(log(a)/log10)
ValueError: cannot convert float NaN to integer
}}}

{{{id=17|
f(0.0001,0)
///
0.000100000000000000
}}}

{{{id=18|
f(10^-20,0)
///
1/100000000000000000000
}}}

{{{id=19|
# ...
///
}}}

{{{id=5|
"""
limite en el origen de x*y^2/(x^2+y^2)
"""
///
}}}

{{{id=7|
plot3d(x*y^2/(x^2+y^2),(x,-1,1),(y,-1,1))
///
}}}

{{{id=8|
def f(x,y): return x*y^2/(x^2+y^2)
///
}}}

{{{id=20|
f(x,0)
///
0
}}}

{{{id=21|
f(x,x)
///
1/2*x
}}}

{{{id=22|
f(x,x^2)
///
x^5/(x^4 + x^2)
}}}

{{{id=23|
f(x^2,x)
///
x^4/(x^4 + x^2)
}}}

{{{id=24|
"""
segun estas direcciones el limite es 0.
Observese que la expresion de la funcion puede escribirse como x * (y^2/(x^2+y^2)) y la segunda expresion esta acotada superiormente por el 1 e inferiormente por el 0. Como x tiende a 0 el producto de ambas expresiones tiende tambien a 0
"""
///
}}}

{{{id=25|
"""
ii.10
limite en el origen de x*y^2/(x^2+y^4)
"""
///
}}}

{{{id=26|
plot3d(x*y^2/(x^2+y^4),(x,-1,1),(y,-1,1))
///
}}}

{{{id=27|
def f(x,y): return x*y^2/(x^2+y^4)
///
}}}

{{{id=28|
f(0,0)
///
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "_sage_input_45.py", line 5, in <module>
    exec compile(ur'f(_sage_const_0 ,_sage_const_0 )' + '\n', '', 'single')
  File "", line 1, in <module>
    
  File "_sage_input_44.py", line 5, in f
  File "element.pyx", line 1286, in sage.structure.element.RingElement.__div__ (sage/structure/element.c:10775)
  File "integer.pyx", line 1420, in sage.rings.integer.Integer._div_ (sage/rings/integer.c:11119)
  File "integer_ring.pyx", line 247, in sage.rings.integer_ring.IntegerRing_class._div (sage/rings/integer_ring.c:5148)
ZeroDivisionError: Rational division by zero
}}}

{{{id=29|
f(x,0)
///
0
}}}

{{{id=30|
f(0,y)
///
0
}}}

{{{id=31|
f(x^2,x)
///
1/2
}}}

{{{id=32|
"""
ii.16
limite en el origen de y^4*sin(x*y)/(x^2+y^2)
"""
///
}}}

{{{id=33|
plot3d(y^4*sin(x*y)/(x^2+y^2),(x,-1,1),(y,-1,1))
///
}}}

{{{id=34|
"""
este caso se descompone en un limite ya calculado por el limite de una funcion acotada. Por lo tanto el limite buscado es 0
"""
///
}}}