NIDIA Y ALVARO

296 days ago by alvaro.reyes@tecdepabellon

Área bajo la curva Ejercicio 1: Cangrejillo Playero Tiempo: 30 minutos Bomba del Tiempo Un cangrejo se acerca hacia la playa, caminando hacia adelante algunas veces y otras veces hacia atrás, la ecuación que describe su movimiento es: t²-2t-8. Encuentra: 1) El desplazamiento que ha tenido el cangrejito desde el t=1 hasta t=6. 2) La distancia total que el cangrejito recorrió desde t=1 hasta t=6. 
       
Traceback (click to the left of this block for traceback)
...
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "_sage_input_2.py", line 10, in <module>
    exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("w4FyZWEgYmFqbyBsYSBjdXJ2YSAKRWplcmNpY2lvIDE6IENhbmdyZWppbGxvIFBsYXllcm8KVGllbXBvOiAzMCBtaW51dG9zCgpCb21iYSBkZWwgVGllbXBvClVuIGNhbmdyZWpvIHNlIGFjZXJjYSBoYWNpYSBsYSBwbGF5YSwgY2FtaW5hbmRvIGhhY2lhIGFkZWxhbnRlIGFsZ3VuYXMgdmVjZXMgeSBvdHJhcyB2ZWNlcyBoYWNpYSBhdHLDoXMsIGxhIGVjdWFjacOzbiBxdWUgZGVzY3JpYmUgc3UgbW92aW1pZW50byBlczogdMKyLTJ0LTguIEVuY3VlbnRyYToKCjEpIEVsIGRlc3BsYXphbWllbnRvIHF1ZSBoYSB0ZW5pZG8gZWwgY2FuZ3Jlaml0byBkZXNkZSBlbCB0PTEgaGFzdGEgdD02LgoyKSBMYSBkaXN0YW5jaWEgdG90YWwgcXVlIGVsIGNhbmdyZWppdG8gcmVjb3JyacOzIGRlc2RlIHQ9MSBoYXN0YSB0PTYu"),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))
  File "", line 1, in <module>
    
  File "/tmp/tmpcXQhPT/___code___.py", line 3
    Área bajo la curva 
    ^
SyntaxError: invalid syntax
#var ('t') #plot((t^2-2*t-8),t,1,6,color="green") a=1; b=6 f= lambda x:x^2-2*x-8 Lb=[[b,f(b)],[b,0],[a,0],[a,f(a)]] Lf=[[i/10,f(i/10)]for i in xrange(10*a,10*b)] P=polygon(Lb+Lf, rgbcolor=(0.2,0.8,0)) Q=plot(f(x),x,a-0.5,b+0.5) show(P+Q) 
       
1)El desplazamiento que a tenido el cangrajo desde t1 hasta t6
La integral anterior responde lo que el cangrejo recorrio dentro de la distancia t1 hasta la t6,el cangrejo avanzaba hacia adelante y retrocedia solo en este tramos de distancia, es decir si el cangrejo avanza 10 pasos retrocedia 12, para despues avanzar 10, para esto ya tiene 2 pasos de retrazo "-2 pasos", y asi conforme va avanzando va quedando a dever pasos..
¿Cuál de las dos integrales describe cada uno de los incisos? d=(x^(2)-(2*x)-8) area=integral(d,1,6) print float(area) 
       
/sagenb/sage_install/sage-4.7/local/lib/python2.6/site-packages/sage/mis\
c/functional.py:718: DeprecationWarning: Variable of integration should
be specified explicitly.
  return x.integral(*args, **kwds)
-3.33333333333
/sagenb/sage_install/sage-4.7/local/lib/python2.6/site-packages/sage/misc/functional.py:718: DeprecationWarning: Variable of integration should be specified explicitly.
  return x.integral(*args, **kwds)
-3.33333333333
2)L a distancia total que le cangrejo recorrio desde t1 hasta t6.
De acuerdo a la evaluacion de la integral, nos arroja la conclusion de que esta es la distancia que hay entre t1 y t6, siendo este el espacio en el que el cangrejo se la paso avanzando y retrocediendo.
d=abs((x^(2)-(2*x)-8)) total=integral(d,1,6) print float(total) 
       
32.6666718426
32.6666718426
¿Otra forma de hacer las integrales? N(integral(abs(x^(2)-(2*x)-8),(x,1,6))) 
       
32.666671842626442
32.666671842626442
segundo ejercicio SUMAS DE RIEMAN/>
por la izquierda con n=1000
f= lambda x:x^2+1 a=0 b=2 n=1000 Dx=(b-a)/n rsum=sum([f(a+i*Dx)*Dx for i in range(n)]) print float(rsum) 
       
4.662668
4.662668
por el centro con n=1000/>
con esta formula nos parecio la mas adecuada, ya que el resultado se acerca demaciado al de la funcion, con un intervalo de 1000 rectangulos; estos lo determinamos haciendo varias pruebas hasta llegar a el resultado obtenido satisfactoriamente...
f= lambda x:x^2+1 a=0 b=2 n=1000 Dx=(b-a)/n rsum=sum([f(a+(i+.05)*Dx)*Dx for i in range(n)]) print float(rsum) 
       
4.66306762
4.66306762
por la derecha con n=1000
f= lambda x:x^2+1 a=0 b=2 n=1000 Dx=(b-a)/n rsum=sum([f(a+(i+1)*Dx)*Dx for i in range(n)]) print float(rsum) 
       
4.670668
4.670668
f=(x^(2)+1) f.integral(x) 
       
1/3*x^3 + x
1/3*x^3 + x
N(integral(abs(x^(2)+1),(x,0,2))) 
       
4.66666666666667

ENCONTRAR AREAS BAJO LA CURVAbr />
a mano y sage
4.66666666666667

ENCONTRAR AREAS BAJO LA CURVAbr />
a mano y sage
a=-1; b=1 f= lambda x:x^(2) Lb=[[b,f(b)],[b,0],[a,0],[a,f(a)]] Lf=[[i/10,f(i/10)]for i in xrange(10*a,10*b)] P=polygon(Lb+Lf, rgbcolor=('orange')) Q=plot(f(x),x,a-0.5,b+0.5) show(P+Q) 
       
N(integral((x^(2)),(x,-1,1))) 
       
0.666666666666667
0.666666666666667
a=0; b=2 f= lambda x:x^(3)-5*x^(2)+1 Lb=[[b,f(b)],[b,0],[a,0],[a,f(a)]] Lf=[[i/10,f(i/10)]for i in xrange(10*a,10*b)] P=polygon(Lb+Lf, rgbcolor=('red')) Q=plot(f(x),x,a-0.5,b+0.5) show(P+Q) 
       
N(integral((x^(3)-5*x^(2)+1),(x,0,2))) 
       
-7.33333333333333
-7.33333333333333
a=0; b=2 f= lambda x:x^(2)-1 Lb=[[b,f(b)],[b,0],[a,0],[a,f(a)]] Lf=[[i/10,f(i/10)]for i in xrange(10*a,10*b)] P=polygon(Lb+Lf, rgbcolor=('yellow')) Q=plot(f(x),x,a-0.5,b+0.5) show(P+Q) 
       
N(integral((x^(2)-1),(x,0,2))) 
       
0.666666666666667
0.666666666666667
a=-1; b=2 f= lambda x:-x^(3)+3*x-1 Lb=[[b,f(b)],[b,0],[a,0],[a,f(a)]] Lf=[[i/10,f(i/10)]for i in xrange(10*a,10*b)] P=polygon(Lb+Lf, rgbcolor=('royalblue')) Q=plot(f(x),x,a-0.5,b+0.5) show(P+Q) 
       
N(integral((-x^(3)+3*x-1),(x,-1,2))) 
       
-2.25000000000000
-2.25000000000000
 
       

martes 2 de agosto 2011.
f=((x-5)^(2)) f.integral(x) 
       
1/3*x^3 - 5*x^2 + 25*x
1/3*x^3 - 5*x^2 + 25*x
f=((x^(2) + x + 3)) f.integral(x) 
       
1/3*x^3 + 1/2*x^2 + 3*x
1/3*x^3 + 1/2*x^2 + 3*x
a=1; b=2 f= lambda x: 0.5*e^(0.6931*x) Lb=[[b,f(b)],[b,0],[a,0],[a,f(a)]] Lf=[[i/10,f(i/10)]for i in xrange(10*a,10*b)] P=polygon(Lb+Lf, rgbcolor=('orange')) Q=plot(f(x),x,a-0.5,b+0.5) show(P+Q) 
       
Traceback (click to the left of this block for traceback)
...
TypeError: unable to simplify to float approximation
Traceback (most recent call last):    show(P+Q)
  File "", line 1, in <module>
    
  File "/tmp/tmp3rUImN/___code___.py", line 7, in <module>
    P=polygon(Lb+Lf, rgbcolor=('orange'))
  File "/sagenb/sage_install/sage-4.7/local/lib/python2.6/site-packages/sage/plot/polygon.py", line 271, in polygon
    return polygon2d(points, **options)
  File "/sagenb/sage_install/sage-4.7/local/lib/python2.6/site-packages/sage/misc/decorators.py", line 573, in wrapper
    return func(*args, **kwds)
  File "/sagenb/sage_install/sage-4.7/local/lib/python2.6/site-packages/sage/misc/decorators.py", line 432, in wrapper
    return func(*args, **options)
  File "/sagenb/sage_install/sage-4.7/local/lib/python2.6/site-packages/sage/plot/polygon.py", line 346, in polygon2d
    xdata, ydata = xydata_from_point_list(points)
  File "/sagenb/sage_install/sage-4.7/local/lib/python2.6/site-packages/sage/plot/plot.py", line 2602, in xydata_from_point_list
    ydata = [float(z[1]) for z in points]            
  File "expression.pyx", line 959, in sage.symbolic.expression.Expression.__float__ (sage/symbolic/expression.cpp:5543)
TypeError: unable to simplify to float approximation
plot((0.5*E^(0.6931*x)),x,1,6,color="green") 
       
Traceback (click to the left of this block for traceback)
...
NameError: name 'E' is not defined
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "_sage_input_24.py", line 10, in <module>
    exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("cGxvdCgoMC41KkVeKDAuNjkzMSp4KSkseCwxLDYsY29sb3I9ImdyZWVuIik="),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))
  File "", line 1, in <module>
    
  File "/tmp/tmpqyvcsG/___code___.py", line 3, in <module>
    exec compile(u'plot((_sage_const_0p5 *E**(_sage_const_0p6931 *x)),x,_sage_const_1 ,_sage_const_6 ,color="green")
  File "", line 1, in <module>
    
NameError: name 'E' is not defined

EJERCICIO 6
¿cuanto valen tus haorros?
var ('t') f=(1200*e^(0.06*(10-t))) f.integral(t) 
       
-20000.0*e^(-0.06*t + 0.6)/log(e)
-20000.0*e^(-0.06*t + 0.6)/log(e)
var ('t') N(integral(1200*e^(0.06*(10-t)),(t,0,10))) 
       
16442.3760078102
16442.3760078102
 
       

EJERCICIO 7
x = var("y") P1 = plot(12 - x^(2), y, x, -5, 3) P2 = plot(x^(2)- 6, x, -5, 3) T1 = text("$y = x+1$", (1,2.6)) T2 = text("$y = 9-x^2$", (2,7)) show(P1+P2+T1+T2) integrate((x^2- 6) - (12 - x^(2)),x, -1, 2) 
       

-48

-48
f=(x^(2)-6) f.integral(x) 
       
1/3*x^3 - 6*x
1/3*x^3 - 6*x
N(integral((x^(2)-6),(x,-3,3))) 
       
-18.0000000000000
-18.0000000000000
x = var("y") P1 = plot(12 - y^(2), y, x, -5, 3) P2 = plot(y^(2)- 6, x, -5, 3) T1 = text("$y = x+1$", (1,2.6)) T2 = text("$y = 9-x^2$", (2,7)) show(P1+P2+T1+T2) integrate((y^2- 6) - (12 - y^(2)),x, -1, 2) 
       

-48

-48
x = var("y") P1 = plot((1 - x^(2))^(1/2), y, x, -1,1 ) P2 = plot(1*x, x, -1, 1) T1 = text("$y = x+1$", (1,2.6)) T2 = text("$y = 9-x^2$", (2,7)) show(P1+P2+T1+T2) integrate((1*x) - ((1-x^(2))^(1/2)),x, -1, 2) 
       

-1/4*pi - I*sqrt(3) - 1/2*arcsin(2) + 3/2

-1/4*pi - I*sqrt(3) - 1/2*arcsin(2) + 3/2
x = var("x") P1 = plot(3*x^(2), x, -2, 3) P2 = plot(6*x, x, -2, 3) T1 = text("$y = x+1$", (1,2.6)) T2 = text("$y = 9-x^2$", (2,7)) show(P1+P2+T1+T2) integrate((6*x) - (3*x^(2)),x, -1, 2) 
       

0

0
 
       

VOLUMENES
var('x,y') p2=plot3d(x^(3)+1,(x,-2,1),(y,-2,1),color='red'); p3=plot3d(x+1,(x,-2,1),(y,-2,1),color='blue'); show(p2,viewer='tachyon') 
       
x = var("x") P1 = plot(x^(3)+1, x, -2, 3) P2 = plot(6*x, x, -2, 3) T1 = text("$y = x+1$", (1,2.6)) T2 = text("$y = 9-x^2$", (2,7)) show(P1+P2+T1+T2) integrate((6*x) - (3*x^(2)),x, -1, 2) 
       

0

0
var('x,y') p2=plot3d(2*x-x^(2),(x,-2,1),(y,-2,1),color='red'); show(p2,viewer='tachyon') 
       
x = var("x") P1 = plot(2*x-x^(2)+1, x, -2, 3) P2 = plot(6*x, x, -2, 3) T1 = text("$y = x+1$", (1,2.6)) T2 = text("$y = 9-x^2$", (2,7)) show(P1+P2+T1+T2) integrate((6*x) - (3*x^(2)),x, -1, 2) 
       

0

0
var('x,y') p2=plot3d(((4-x^(2))^(1/2)/4),(x,-2,1),(y,-2,1),color='red'); show(p2,viewer='tachyon') 
       
x = var("x") P1 = plot(((4-x^(2))^(1/2)/4)+1, x, -2, 3) T1 = text("$y = x+1$", (1,2.6)) show(P1+T1) integrate((6*x) - (3*x^(2)),x, -1, 2) 
       
verbose 0 (4075: plot.py, generate_plot_points) WARNING: When plotting,
failed to evaluate function at 41 points.
verbose 0 (4075: plot.py, generate_plot_points) Last error message: ''

0
verbose 0 (4075: plot.py, generate_plot_points) WARNING: When plotting, failed to evaluate function at 41 points.
verbose 0 (4075: plot.py, generate_plot_points) Last error message: ''

0
var('x,y') p2=plot3d((9-x^(2)^(1/2))*cos(x),(x,-2,1),(y,-2,1),color='red'); p3=plot3d((9-x^(2)^(1/2))*sin(x),(x,-2,1),(y,-2,1),color='blue'); show(p2+p3,viewer='tachyon') 
       
Traceback (click to the left of this block for traceback)
...
ValueError: negative number to a fractional power not real
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "_sage_input_19.py", line 10, in <module>
    exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("dmFyKCd4LHknKQpwMj1wbG90M2QoKDkteF4oMileKDEvMikpKmNvcyh4KSwoeCwtMiwxKSwoeSwtMiwxKSxjb2xvcj0ncmVkJyk7CnAzPXBsb3QzZCgoOS14XigyKV4oMS8yKSkqc2luKHgpLCh4LC0yLDEpLCh5LC0yLDEpLGNvbG9yPSdibHVlJyk7CnNob3cocDIrcDMsdmlld2VyPSd0YWNoeW9uJyk="),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))
  File "", line 1, in <module>
    
  File "/tmp/tmpJmxmz6/___code___.py", line 6, in <module>
    exec compile(u"show(p2+p3,viewer='tachyon')" + '\n', '', 'single')
  File "", line 1, in <module>
    
  File "/sagenb/sage_install/sage-4.7/local/lib/python2.6/site-packages/sage/misc/functional.py", line 1487, in show
    return x.show(*args, **kwds)
  File "base.pyx", line 1083, in sage.plot.plot3d.base.Graphics3d.show (sage/plot/plot3d/base.c:9762)
  File "base.pyx", line 836, in sage.plot.plot3d.base.Graphics3d._prepare_for_tachyon (sage/plot/plot3d/base.c:7120)
  File "base.pyx", line 844, in sage.plot.plot3d.base.Graphics3d._box_for_aspect_ratio (sage/plot/plot3d/base.c:7345)
  File "base.pyx", line 214, in sage.plot.plot3d.base.Graphics3d._safe_bounding_box (sage/plot/plot3d/base.c:3529)
  File "base.pyx", line 1277, in sage.plot.plot3d.base.Graphics3dGroup.bounding_box (sage/plot/plot3d/base.c:12104)
  File "parametric_surface.pyx", line 318, in sage.plot.plot3d.parametric_surface.ParametricSurface.bounding_box (sage/plot/plot3d/parametric_surface.c:2991)
  File "parametric_surface.pyx", line 366, in sage.plot.plot3d.parametric_surface.ParametricSurface.triangulate (sage/plot/plot3d/parametric_surface.c:3521)
  File "parametric_surface.pyx", line 361, in sage.plot.plot3d.parametric_surface.ParametricSurface.triangulate (sage/plot/plot3d/parametric_surface.c:3451)
  File "parametric_surface.pyx", line 580, in sage.plot.plot3d.parametric_surface.ParametricSurface.eval_grid (sage/plot/plot3d/parametric_surface.c:5222)
  File "wrapper_rdf.pyx", line 78, in sage.ext.interpreters.wrapper_rdf.Wrapper_rdf.__call__ (sage/ext/interpreters/wrapper_rdf.c:1347)
ValueError: negative number to a fractional power not real
x = var("x,t") P1 = plot(((9-x^(2))^(1/2)*cos(t)), x, -2, 3) P2 = plot(((9-x^(2))^(1/2)*sin(t)), x, -2, 3) T1 = text("$y = x+1$", (1,2.6)) T2 = text("$y = 9-x^2$", (2,7)) show(P1+P2+T1+T2) 
       
Traceback (click to the left of this block for traceback)
...
TypeError: unsupported operand type(s) for ** or pow(): 'tuple' and
'int'
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "_sage_input_27.py", line 10, in <module>
    exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("eCA9IHZhcigieCx0IikKUDEgPSBwbG90KCgoOS14XigyKSleKDEvMikqY29zKHQpKSwgeCwgLTIsIDMpClAyID0gcGxvdCgoKDkteF4oMikpXigxLzIpKnNpbih0KSksIHgsIC0yLCAzKQpUMSA9IHRleHQoIiR5ID0geCsxJCIsICgxLDIuNikpClQyID0gdGV4dCgiJHkgPSA5LXheMiQiLCAoMiw3KSkKc2hvdyhQMStQMitUMStUMik="),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))
  File "", line 1, in <module>
    
  File "/tmp/tmpzWivwV/___code___.py", line 4, in <module>
    P1 = plot(((_sage_const_9 -x**(_sage_const_2 ))**(_sage_const_1 /_sage_const_2 )*cos(t)), x, -_sage_const_2 , _sage_const_3 )
  File "integer.pyx", line 1821, in sage.rings.integer.Integer.__pow__ (sage/rings/integer.c:12870)
TypeError: unsupported operand type(s) for ** or pow(): 'tuple' and 'int'
 
       

SOLIDOS EN REVOLUCION
http://s3.amazonaws.com/lcp/analisis-matematico/myfiles/SOLIDOSDEREVOLUCION.pdf http://www.youtube.com/watch?v=0KAxGjKbHqw&feature=related­­ 
       
N(integral(pi*(x^(3)+1)^(2),(x,0,3))) 
       
1118.18258520271
1118.18258520271
var('x') parabola=(x^(3)+1)^(2) sur2=revolution_plot3d(parabola,(x,0,1),opacity=0.5,rgbcolor=(0,1,0),show_curve=True,parallel_axis='x') show(sur2,viewer='tachyon') 
       
 
       
<br /> EJERCICIO 12
<br /> EJERCICIO 12
var('x') parabola=x+1 sur2=revolution_plot3d(parabola,(x,0,1),opacity=0.5,rgbcolor=(0,1,0),show_curve=True,parallel_axis='x') show(sur2,viewer='tachyon') 
       
x = var("y") P1 = plot(2*x^(2), y, x, -3, 3) P2 = plot(x+1, x, -3, 3) T1 = text("$y = x+1$", (1,2.6)) T2 = text("$y = 2*x^2$", (2,7)) show(P1+P2+T1+T2) integrate((x+1) - (2*x^(2)),x, -1, 2) 
       

-3/2

-3/2
N(integral(pi*(((x+1)^(2))-(2*x^(2))^(2)),(x,0,1))) 
       
4.81710873550435
4.81710873550435
 
       

EJERCICIO 13
var('x') parabola=x^3 sur2=revolution_plot3d(parabola,(x,0,1),opacity=0.5,rgbcolor=(1,0.5,0),show_curve=True,parallel_axis='x') show(sur2,viewer='tachyon') 
       
x = var("x") P1 = plot(x^(3), x, x, -3, 3) T1 = text("$x = x+1$", (1,2.6)) show(P1+T1) integrate((x^(3)),x, -1, 2) 
       

15/4

15/4
N(integral(pi*(x^(3))^(2),(x,0,4))) 
       
7353.12200520217
7353.12200520217
 
       

CLASE SERIES
EJERCICIO 1
taylor(ln(x), x, 10, 5) 
       
1/500000*(x - 10)^5 - 1/40000*(x - 10)^4 + 1/3000*(x - 10)^3 - 1/200*(x
- 10)^2 + 1/10*x + log(10) - 1
1/500000*(x - 10)^5 - 1/40000*(x - 10)^4 + 1/3000*(x - 10)^3 - 1/200*(x - 10)^2 + 1/10*x + log(10) - 1
u=taylor(ln(x), x, 1, 5)._fast_float_('x') print u(2) d=ln(2) print float (d) 
       
0.783333333333
0.69314718056
0.783333333333
0.69314718056
z=ln(x) w=taylor(ln(x), x, 10, 10) plot(w,(x,0,20),color='blue')+plot(z,(x,0,20),color='red') 
       
 
       

EJERCICIO 2
var("sin") taylor(sin(x^(2)),x, 0,1,4) 
       
x^2
x^2
u=taylor(sin(x^(2)), x, 0, 4)._fast_float_('x') print u(2) d=ln(2) print float (d) 
       
4.0
0.69314718056
4.0
0.69314718056
z=sin(x^(2)) w=taylor(sin(x^(2)), x, 0, 1) plot(w,(x,0,10),color='green')+plot(z,(x,0,10),color='red')