







Prepara tus exámenes y mejora tus resultados gracias a la gran cantidad de recursos disponibles en Docsity
Gana puntos ayudando a otros estudiantes o consíguelos activando un Plan Premium
Esta página no es visible en la vista previa
¡No te pierdas las partes importantes!








(%i1) polinomio:x^10-313x^9+40066x^8-2672290x^7+97544905x^6-1862097841* factor(polinomio); (%o2) ( x - 60 )^3 ( x - 59 )^2 ( x - 6 )^2 ( x - 1 )^3
(%i3) suma:0; for k:1 step 2 thru 11329 do suma:suma+k; print(suma); (%o3) 0 (%o4) done 32092225
(%o5) 32092225
(%i6) suma:0; for k:0 step 64 thru 4161 do suma:suma+k; print(suma); (%o6) 0 (%o7) done
137280 (%o8) 137280
(%i9) suma:0; for n:1 thru 79 do (suma:suma+1/n^7); float(suma); (%o9) 0 (%o10) done (%o11) 1.
(%i12) (^) numerosprimos:0; for n:6556 thru 6626 do (if primep(n) then numerosprimos:numerosprimo print(numerosprimos); (%o12) (^0) (%o13) done
8 (%o14) (^8)
(%i15) numerosprimos:0; for n:6556 thru 6626 do (if primep(n) then numerosprimos:numerosprimo print(numerosprimos); (%o15) 0 (%o16) (^) done
52686
(%o17) 52686
2 Algebra Lineal
(%i18) (^) block(mbcbp:transpose(matrix([0,0,0,3],[-1,6,4,0],[0,1,1,0],[0,0,-1, mbcbq:transpose(matrix([2,0,0,0],[0,1,0,1],[0,0,-1,1],[0,1,0,0])), mbpbc:invert(mbcbp))$ mbpbc.mbcbq;
(%o19)
0
- 2
12 4
1 3
0
1 1
1 3
0
0 1
0
0
1 1
(%i20) block(mbcbq:transpose(matrix([2,0,0,0],[0,1,0,1],[0,0,-1,1],[0,1,0,0] mbcbr:transpose(matrix([1,0,2,0],[0,1,0,0],[-1,0,1,0],[0,0,0,7])), mbpbc:invert(mbcbq))$ mbpbc.mbcbr;
(%o21)
1 2 2
- 2 - 2
0
0
0
1
-
1 2 1
- 1 - 1
0
7
0
- 7
(%i30) (^) mbpbq:mbpbc.mbcbq$ w:transpose([0,1,-1,6])$ mbpbq.w;
(%o32)
0
0 7
6
(%i33) (^) A:matrix([93,20,-10,0],[-504,-111,60,0],[-288,-68,43,0],[0,0,0,3]); charpoly(A,x);
(%o33)
93
- 504 - 288
0
20
- 111 - 68
0
- 10
60
43
0
0
0
0
3 (%o34) (( - x - 111 () 3 - x )( 43 - x + ) 4080( 3 - x ))( 93 - x - ) 20
( 17280( 3 - x - ) 504( 3 - x )( 43 - x )) - 10( 288( - x - 111 () 3 - x + ) 34272( 3 - x ))
(%i35) (^) expand(%); (%o35) x^4 - 28 x^3 + 258 x^2 - 900 x + 1053
(%i36) (^) solve(%=0,x); (%o36) [ x = 9 , x = 13 , x = 3 ]
(%i37) multiplicities; (%o37) (^) [ 1 , 1 , 2 ]
(%i38) v:[-1,6,3,12]$ A.v-3*v;
(%o39)
0
0
0
0
(%i40) (^) nullspace(A-3ident(4)); nullspace(A-13ident(4)); nullspace(A-9*ident(4));
;Compiler warnings for "C:/PROGRA~2/MAXIMA~1.0/share/maxima/5.25.0/share/line ; In $VANDERMONDE_MATRIX: IGNORE declaration for unknown variable LK
;Compiler warnings for "C:/PROGRA~2/MAXIMA~1.0/share/maxima/5.25.0/share/line ; In $VANDERMONDE_MATRIX: Unused lexical variable LK
(%o40) span
0
0
0
60
60
- 360 - 180
0
(%o41) span
400
- 2400 - 1600
0
(%o42) span
0
- 144 - 288
0
(%i43) D:p^^(-1).A.p;
(%o43) p -^^1_._
93
- 504 - 288
0
20
- 111 - 68
0
-^10 60
43
0
0
0
0
3
. p
(%i53) (^) L:B-11*ident(4);
(%o53)
84
- 504 - 288
0
20
- 120 - 68
0
- 10
60
34
0
0
0
0
- 6
(%i54) (^) M:B-15*ident(4);
(%o54)
80
- 504 - 288
0
20
- 124 - 68
0
- 10
60
30
0
0
0
0
- 10
(%i55) Z:K.M.L;
(%o55)
0
0 0
0
0
0 0
0
0
0 0
0
0
0 0
0
3 Aplicaciones de Cálculo Integral
(%i56) (^) wxplot2d([x^2-8x+7,x^3-19x^2+95x-77], [x,0.5,12.5]); solve(x^2-8x+7=x^3-19x^2+95x-77);
(%t56)
(%o56)
(%o57) [ x = 1 , x = 12 , x = 7 ]
(%i58) f(x):=x^2-8x+7; g(x):=x^3-19x^2+95*x-77;
(%o58) f( x := x )^2 - 8 x + 7
(%o59) g( x := x )^3 - 19 x^2 + 95 x - 77
(%i60) integrate(g(x)-f(x),x,1,7)+integrate(f(x)-g(x),x,7,12);
(%o60)
5581 12
(%i61) f(x):=x^4-32x^3+342x^2-1312x+1001; g(x):=x^3-19x^2+95*x-77;
(%o61) (^) f( x := x )^4 - 32 x^3 + 342 x^2 + ( - 1312 ) x + 1001
(%o62) (^) g( x := x )^3 - 19 x^2 + 95 x - 77
(%i63) (^) solve(f(x)=g(x),x);
(%o63) [ x = 14 , x = 7 , x = 11 , x = 1 ]
(%i72) (^) 4/3%pi2^3;
(%o72)
(^32) 3
(%i73) ymas(x):=12+sqrt(2^2-x^2); ymenos(x):=12-sqrt(2^2-x^2);
(%o73) ymas( x := ) 12 + 2 2 - x^2
(%o74) ymenos( x := ) 12 - 2 2 - x^2
(%i75) float(quad_qags(%pi*(ymas(x)^2-ymenos(x)^2),x,-2,2)[1]); (%o75) (^) 947.
(%i76) ymas(x):=16+sqrt(2^2-x^2); ymenos(x):=16-sqrt(2^2-x^2);
(%o76) ymas( x := ) 16 + 2 2 - x^2
(%o77) ymenos( x := ) 16 - 2 2 - x^2
(%i78) area:quad_qags(2%piymas(x)sqrt(1+diff(ymas(x),x)^2)+2%pi*ymenos(x (%o78) [ 1263.309363339398 , 2.49455297307577 10 -7^ , 567 , 0 ]
(%i79) IntegraTrapecio(f,a,b,n):=( valorexacto:integrate(f,x,a,b), h:(b-a)/n, integral:h/2(ev(f,x=a)+ev(f,x=b)), for j:1 thru n-1 do integral:integral+hev(f,x=a+jh), errora:valorexacto-integral, print("exacto=",float(valorexacto),". Trapecio=",float(integral), ". Error=",float(errora),". n=",n) ); IntegraTrapecio(cos(4x)+sin(x)+%e^x,0,2,14);
(%o79) IntegraTrapecio( f , a , b , n := ( valorexacto : )
(^) a
b f d x , h :
b - a n
integral :
h 2
( ev( f , x = a + ) ev( f , x = b )) , for j thru n - 1 do integral :
integral + h ev( f , x = a + j h , errora : valorexacto - integral , ) print ( exacto= ,
float( valorexacto ,. Trapecio= , ) float( integral ,. Error= , ) float( errora , )
. n= , n ) )
exacto= 8.052542497133638_. Trapecio=_ 8.054228069237517_. Error= -_ 0.0016855721038791_. n=_ 14
(%o80) 14
(%i81) (^) IntegraSimpsonCompuesta(f,a,b,n):=block(if oddp(n) then (print("El nú else( kill(errora,integral,h,valorexacto), valorexacto:integrate(f,x,a,b), h:(b-a)/n, integral:h/3(ev(f,x=a)+ev(f,x=b)), for j:2 thru n/2 do integral:integral+2h/3ev(f,x=a+2(j-1)h), for j:1 thru n/2 do integral:integral+4h/3ev(f,x=a+(2j-1)h), errora:abs(valorexacto-integral), print("Valor exacto= ",float(valorexacto)), print("Valor calculado con la fórmula de Simpson= ",float(integral)) print("Error=",float(errora)) ) ); IntegraSimpsonCompuesta(cos(4x)+sin(x)+%e^x,0,2,14); (%o81) IntegraSimpsonCompuesta( f , a , b , n := ) block ( if oddp( n ) then
print( El número esperado de intervalos es par! ) else (
kill( errora , integral , h , valorexacto , valorexacto : )
(^) a
b f d x , h :
b - a n
integral :
h 3
( ev( f , x = a + ) ev( f , x = b )) , for j from 2 thru
n 2
do integral :
integral +
2 h 3
ev( f , x = a + 2( j - 1 ) h , ) for j thru
n 2
do integral : integral +
4 h
3
ev( f , x = a + ( 2 j - 1 ) h , errora : valorexacto - integral , )
print( Valor exacto= , float( valorexacto ) ) ,
print( Valor calculado con la fórmula de Simpson= , float( integral )) ,
print( Error= , float( errora )) ) )
Valor exacto= 8. Valor calculado con la fórmula de Simpson= 8.
Error= 1.7044002452770712 10 -
(%o82) (^) 1.7044002452770712 10 -
(%i6) kill(all); f(x):=cos(x)sin(6x)+sin(x)cos(6x); fp(x):=at(diff(f(xx),xx),xx=x); x0:0.33659921288462; tolerancia:10^(-7);/*con esta variable fijamos el error máximo fijad display(er:abs(f(x0))); indice:0; while(er>tolerancia) do( indice:indice+1, x0:float(x0-f(x0)/fp(x0)), print("x0=",x0), er:abs(f(x0)) ); display(solucion:x0); display(indice); (%o0) done (%o1) f( x := ) cos( x )sin( 6 x + ) sin( x )cos( 6 x ) (%o2) fp( x := ) at( diff( f( xx , xx , xx = x ) ) ) (%o3) 0.
(%o4)
1 10000000 er = 0.
(%o5) done (%o6) 0
x0= 0.
x0= 0. x0= 0.
(%o7) done
solucion = 0.
(%o8) done indice = 3
(%o9) done