You are on page 1of 13

UNIVERSIDAD NACIONAL AUTONOMA DE HONDURAS

FACULTAD DE CIENCIAS
ESCUELA DE FÍSICA
INSTRUCTOR: RENÉ HERMANDEZ
LABORATORIO FS-321

INFORME 1: USO DE MATEMATICA - INTRODUCCIÓN

SECCIÓN: 1700

ALUMNOS:
ELMER JOSÉ ALVARADO AMAYA 20161000019
DEYMIS ALEXANDER MORENO CASTRO 20201004014
MIGUEL EDUARDO BANEGAS GALLARDO20151020534
OSCAR LEONEL ALVARADO FIALLOS 9913962
PAULA GABRIELA MONTOYA RAMIREZ 20091004643

FECHA: 18 FEBRERO 2022


2 FS321 INFORME DE LABORATORIO.nb

CALCULOS DENTRO DEL LABORATORIO

1.1 FUNCIONES Y VARIABLES


In[172]:= f[x_] = x2
Out[172]= x2

In[171]:= g[x_] = Sin[x]


Out[171]= Sin[x]

In[173]:= h[x_] = f[x] + g[x]


Out[173]= x2 + Sin[x]

In[174]:= f[1]
Out[174]= 1

In[175]:= g[1]
Out[175]= Sin[1]

In[176]:= N[g[1]]
Out[176]= 0.841471

1.2 GRÁFICAS
In[161]:=

f[x_] = x2

g[x_] = Sin[x]

In[164]:= Plot[f[x], {x, - 10, 10 }]

100

80

60

Out[164]=

40

20

-10 -5 5 10
FS321 INFORME DE LABORATORIO.nb 3

In[165]:= Plot[{f[x], g[x]}, {x, - 5, 5 }]

25

20

15

Out[165]=

10

-4 -2 2 4

1.3 GRÁFICAS 3D
In[139]:= f[x_, y_] := x2 + Sin[y]
Plot3Df[x, y], {x, - 4, 4}, {y, - 4, 4}, AxesLabel → {"x", "y", "z"},
PlotStyle → RGBColor[0, 1, 0], PlotLegends → "x2 +Sen(y)"

Out[140]= x2 +Sen(y)

1.4 MATRÍCES
In[177]:= A = {{1, 2, 3}, {4, 5, 6}, {1, 3, 2}};
B = {{4, 3, 2}, {7, 3, 1}, {1, 0, 0}};
a = {1, 5, 8};
b = {1, 3, 4};
4 FS321 INFORME DE LABORATORIO.nb

In[181]:= (A + B) // MatrixForm
Out[181]//MatrixForm=
5 5 5
11 8 7
2 3 2

In[182]:= 5 A // MatrixForm
Out[182]//MatrixForm=
5 10 15
20 25 30
5 15 10

In[183]:= a.b
Out[183]= 48

In[184]:= B.a
Out[184]= {35, 30, 1}

In[185]:= A.B // MatrixForm


Out[185]//MatrixForm=
21 9 4
57 27 13
27 12 5

1.5 DERIVACIÓN E INTEGRACIÓN


In[202]:= h[x_] = x5 Sin[y];

In[203]:= D[h[x], x]
Out[203]= 5 x4 Sin[y]

In[204]:= Integrate[h[x], y]
Out[204]= - x5 Cos[y]

In[205]:= Integrate[h[x], {y, 0, π }]


Out[205]= 2 x5

1.6 FUNCIONES VECTORIALES


In[234]:=

F[x_, y_, z_] = 2 * x * y, Cos[z], Logx2 Cos[z]


Out[234]= 2 x y, Cos[z], Logx2 Cos[z]

In[235]:= TransformedField[{"Cartesian" → "Cylindrical"}, F[x, y, z], {x, y, z} → {ρ, θ, η}]


Out[235]= Cos[η] Sin[θ] + 2 ρ2 Cos[θ]2 Sin[θ],
Cos[η] Cos[θ] - 2 ρ2 Cos[θ] Sin[θ]2 , Logρ2 Cos[η] Cos[θ]2 
FS321 INFORME DE LABORATORIO.nb 5

In[236]:= Div[F[x, y, z], {x, y, z}]


Out[236]= 2 y - Tan[z]

In[237]:= Curl[F[x, y, z], {x, y, z }]


2
Out[237]= Sin[z], - , - 2 x
x

In[238]:= VectorPlot3D[F[x, y, z], {x, - 5, 5 }, {y, - 5, 5 }, {z, - 5, 5}]

Out[238]=

1.7 DERIVACIÓN E INTEGRACIÓN DE FUNCIONES VECTORIALES


In[243]:=

F[x_, y_, z_] = 2 * x * y, Cos[z], Logx2 Cos[z];

In[249]:= Integrate[F[x, y, z], x]


Out[249]= x2 y, x Cos[z], - 2 x + x Logx2 Cos[z]

In[245]:= D[F[x, y, z], x]


2
Out[245]= 2 y, 0, 
x
6 FS321 INFORME DE LABORATORIO.nb

1.8 SISTEMA DE ECUACIONES


In[186]:= Solve [{x + 1 + y ⩵ 3, x - 5 y ⩵ 6}, {x, y}]
8 2
Out[186]= x → , y → - 
3 3

In[187]:= NSolve[{x + 1 + y ⩵ 3, x - 5 y ⩵ 6}, {x, y}]


Out[187]= {{x → 2.66667, y → - 0.666667}}

1.9 AJUSTES DE DATOS


Datos = {{2, 4}, {3.5, 5}, {4.3, 5.8}, {5.2, 6.7}, {6, 8.3}};

In[104]:= AJ = NonlinearModelFitDatos, a x2 + b x + c, {a, b, c}, x

Out[104]= FittedModel 4.08363 - 0.381475 x + 0.177877 x2 

In[105]:= fa[x_] = Normal[AJ]


Out[106]= 4.08363 - 0.381475 x + 0.177877 x2

In[107]:= AJ["ParameterTable"]
Estimate Standard Error t-Statistic P-Value
Out[107]= a 0.177877 0.0466206 3.81542 0.0623389
b -0.381475 0.375934 -1.01474 0.417018
c 4.08363 0.697547 5.85427 0.02796

1.10 GRÁFICOS DE CONTORNO


In[109]:= f[x_, y_] := x ^ 2 + Sin[y]
ContourPlot[f[x, y], {x, - 4, 4}, {y, - 4, 4}, PlotLegends → "x^2+Sen(y)"]
4

0
Out[110]= x^2+Sen(y)

-2

-4
-4 -2 0 2 4
FS321 INFORME DE LABORATORIO.nb 7

1.11 AJUSTE DE DATOS


In[ ]:= Datos = {{0, 0}, {2, 4}, {3.5, 5}, {4.3, 5.8}, {5.2, 6.7}, {6, 8.3}};
g1 = ListPlot[Datos, PlotStyle → {PointSize[Medium], RGBColor[54, 0, 0]},
AxesLabel → {"x", "y"}, PlotLabel → "Ejemplo de Grafica de Datos"];
g2 = ListLinePlot[Datos, PlotStyle → {PointSize[Medium], RGBColor[0, 54, 0]},
AxesLabel → {"x", "y"}, PlotLegends → "Datos Registrados",
PlotLabel → "Ejemplo de Grafica de Datos"];

In[ ]:= Show[g2, g1]


Ejemplo de Grafica de Datos
y

Out[]= Datos Registrados


4

x
1 2 3 4 5 6
8 FS321 INFORME DE LABORATORIO.nb

CALCULOS FUERA DE LABORATORIO

EJERCICIO 1.1
1. Dadas las funciones vectoriales, transforme del sistema de coordenada que se encuentra, al solici-
tado :
*Transforme el campo vectorial a coordenadas cartesianas y cilíndricas :

  + (rCos[θ] Sin[θ]) θ + (3*Cos[ϕ]) ϕ



A = (r2 - 6) ρ

In[308]:=

u[r_, θ_, ϕ_] = r2 -6,r*Cos[θ]*Sin[θ],3*Cos[ϕ];


FullSimplify[
TransformedField[{"Spherical"} → {"Cartesian"}, u[r, θ, ϕ], {r, θ, ϕ} → {x, y, z}]]

3y z2 - 6 + x 2 + y2 + z2
Out[309]= x - + + ,
x 2 + y2 x 2 + y2 + z2 x 2 + y2 + z2
3 x2 y z2 y - 6 + x2 + y2 + z2  x2 + y2  z z - 6 + x2 + y2 + z2 
+ + ,- + 
x 2 + y2 x 2 + y2 + z2 x 2 + y2 + z2 x 2 + y2 + z2 x 2 + y2 + z2

In[310]:=

FullSimplify[
TransformedField[{"Spherical"} → {"Cylindrical"}, u[r, θ, ϕ], {r, θ, ϕ} → {ρ, σ, z}]]
z2 ρ ρ - 6 + z2 + ρ2  z ρ2 z - 6 + z2 + ρ2 
Out[310]=  + , 3 Cos[σ], - + 
z2 + ρ2 z2 + ρ2 z2 + ρ2 z2 + ρ2

EJERCICIO 1.2
1. Dadas las funciones vectoriales, transforme del sistema de coordenada que se encuentra, al solici-
tado :
*Transforme el campo vectorial a coordenadas cartesianas y cilíndricas :


B = (xy) x + (yz) y + (zx) z
h[x_, y_, z_] = {(x*y),(y*z),(z*x)};

In[300]:=

FullSimplify[
TransformedField[{"Cartesian"} → {"Cylindrical"}, h[x, y, z], {x, y, z} → {ρ, ϕ, η}]]
Out[300]= ρ Sin[ϕ] ρ Cos[ϕ]2 + η Sin[ϕ], ρ Cos[ϕ] Sin[ϕ] η - ρ Sin[ϕ], η ρ Cos[ϕ]
FS321 INFORME DE LABORATORIO.nb 9

In[313]:= FullSimplify[
TransformedField[{"Cartesian"} → {"Spherical"}, h[x, y, z], {x, y, z} → {r, θ, ϕ}]]
Out[313]= r2 Sin[θ] Cos[θ]2 Cos[ϕ] + Cos[ϕ]2 Sin[θ]2 Sin[ϕ] + Cos[θ] Sin[θ] Sin[ϕ]2 ,
r2 Cos[θ] Sin[θ] - Cos[ϕ] Sin[θ] + Cos[ϕ]2 Sin[θ] Sin[ϕ] + Cos[θ] Sin[ϕ]2 ,
r2 Cos[ϕ] Sin[θ] Sin[ϕ] Cos[θ] - Sin[θ] Sin[ϕ]

EJERCICIO 2.1
Los siguientes datos representan el movimiento rectilíneo de una gota de agua que cae a velocidad
terminal en un tubo lleno de aceite

Asumiendo que el movimiento de la gota se describe a través de la función y(t) = vt, realice lo siguiente:
◼ Encuentre v y b con sus respectivos errores absolutos, ajustando los datos a la siguiente función:
y = vt + b
◼ En un mismo sistema de ejes coordenados, realice las siguientes gráficas:
◼ Datos experimentales.
◼ Curva de ajuste: tome en cuenta la función dada arriba y la constantes perdidas. (Etiquete
adecuadamente los ejes, grafíque los datos y la curva de ajuste con diferentes colores).

Estimando el valor de v y b
Datos1 = {{0, 0}, {5, 13.72}, {10, 27.34}, {15, 40.48}, {20, 53.91},
{25, 66.74}, {30, 79.56}, {35, 92.25}, {40, 105.61}, {45, 118.78}, {50, 131.88}};

In[133]:= Ajuste1 = NonlinearModelFit[Datos1, v * t + b, {v, b}, t]

Out[133]= FittedModel 0.768182 + 2.6248 t 

In[134]:= FindFit[Datos1, v * t + b, {v, b}, t]


Out[134]= {v → 2.6248, b → 0.768182}

In[135]:=

e[t_] = Normal[Ajuste1]
Out[135]= 0.768182 + 2.6248 t

In[136]:=

Ajuste1["ParameterTable"]
Estimate Standard Error t-Statistic P-Value
Out[136]= v 2.6248 0.00799546 328.286 1.14934 × 10-19
b 0.768182 0.236509 3.248 0.0100294
10 FS321 INFORME DE LABORATORIO.nb

Gráficas
e1 = ListPlot[Datos1, AxesLabel → {"t(s)", "y(cm)"},
PlotLegends → {"Datos experimentales"}, PlotLabel → "Movimineto rectilíneo de la gota",
PlotStyle → {PointSize[Large], RGBColor[54, 54, 0]}]

Movimineto rectilíneo de la gota


y(cm)

120

100

80
Out[]= Datos experimentales
60

40

20

t(s)
10 20 30 40 50

In[ ]:=

e2 = Plot[e[t], {t, 0, 50}, AxesLabel → {"t(s)", "y(cm)"},


PlotLegends → {"y= 0.7681818181818204`+2.6248` t"}, PlotLabel →
"Funcion Descritiva Movimineto rectilineo de la gota", PlotStyle → RGBColor[54, 0, 0]]
Funcion Descritiva Movimineto rectilineo de la gota
y(cm)

120

100

80
Out[]= y= 0.7681818181818204`+2.6248` t
60

40

20

t(s)
10 20 30 40 50
FS321 INFORME DE LABORATORIO.nb 11

In[ ]:= Show[e1, e2, PlotLabel → "Datos Experimentales vs Funcion Descritiva"]

Datos Experimentales vs Funcion Descritiva


y(cm)

120

100

Datos experimentales
80
Out[]=

60
y= 0.7681818181818204`+2.6248` t

40

20

t(s)
10 20 30 40 50

EJERCICIO 2.2
Se sabe que el número de pulgadas en el que una estructura recién construida, se hunde en el suelo,
está dada por y = 3 (1 - ⅇαx ) donde x es el número de meses que lleva construida la estructura.

Realice lo siguiente:
◼ Estime el valor de alfa (α) para dichos datos y su respectivo error.
◼ En un mismo sistema de ejes coordenados, realice las siguientes gráficas:
◼ Datos experimentales.
◼ Curva de ajuste: tome en cuenta la función dada arriba y la constante perdida. (Etiquete
adecuadamente los ejes, grafíque los datos y la curva de ajuste con diferentes colores).

Estimando el valor de α
Datos2 = {{2, 1.07}, {4, 1.88}, {6, 2.26}, {12, 2.78}, {18, 2.97}, {24, 2.99}};

In[130]:= Ajuste2 = NonlinearModelFitDatos2, 3 - 3 ⅇa x , a, x

Out[130]= FittedModel 3 - 3 ⅇ-0.233784 x 

In[123]:= FindFitDatos2, 3 - 3 ⅇa x , a, x
Out[123]= {a → - 0.233784}

In[124]:= g[x_] = Normal[Ajuste2]


Out[124]= 3 - 3 ⅇ-0.233784 x
12 FS321 INFORME DE LABORATORIO.nb

In[125]:=

Ajuste2["ParameterTable"]
Estimate Standard Error t-Statistic P-Value
Out[125]=
a -0.233784 0.00496572 -47.0797 8.16658 × 10-8

Gráficas
In[126]:= g1 = ListPlot[Datos2, AxesLabel → {"meses", "pulgadas"},
PlotLegends → {"Datos experimentales"},
PlotLabel → "Datos exteperimetales, Hundimineto de suelo",
PlotStyle → {PointSize[Large], RGBColor[54, 0, 0]}]

Datos exteperimetales, Hundimineto de suelo


pulgadas

3.0

2.5

2.0
Out[126]= Datos experimentales
1.5

1.0

0.5

meses
5 10 15 20

In[131]:=

g2 = Plotg[x], {x, 0, 24}, AxesLabel → {"meses", "pulgadas"},


PlotLegends → "y= 3-3 ⅇ-0.2337844857566959 x ", PlotLabel →
"Funcion Descritiva de Hundimineto de suelo", PlotStyle → RGBColor[0, 255, 0]

Funcion Descritiva de Hundimineto de suelo


pulgadas

3.0

2.5

2.0
Out[131]= y= 3-3 ⅇ-0.2337844857566959 x
1.5

1.0

0.5

meses
5 10 15 20
FS321 INFORME DE LABORATORIO.nb 13

In[128]:= Show[g1, g2, PlotLabel → "Datos Experimentales vs Funcion Descritiva"]

Datos Experimentales vs Funcion Descritiva


pulgadas

3.0

2.5

2.0 Datos experimentales


Out[128]=
1.5 y= 3-3 ⅇ-0.2337844857566959 x

1.0

0.5

meses
5 10 15 20

LABORATORIO FS-321 PRACTICA 1


“INTRODUCION A MATEMATICA”

ALUMNOS: ELMER JOSÉ ALVARADO AMAYA 20161000019


DEYMIS ALEXANDER MORENO CASTRO 20201004014
MIGUEL EDUARDO BANEGAS GALLARDO20151020534
OSCAR LEONEL ALVARADO FIALLOS 9913962
PAULA GABRIELA MONTOYA RAMIREZ 20091004643

INSTRUCTOR: RENE DAVID HERNANDEZ BACA


SECCIÓN: 1700

You might also like