Docsity
Docsity

Prepara tus exámenes
Prepara tus exámenes

Prepara tus exámenes y mejora tus resultados gracias a la gran cantidad de recursos disponibles en Docsity


Consigue puntos base para descargar
Consigue puntos base para descargar

Gana puntos ayudando a otros estudiantes o consíguelos activando un Plan Premium


Orientación Universidad
Orientación Universidad


Análisis Vectorial: Productos entre vectores, gráficos y transformación de coordenadas, Apuntes de Agronomía

El cálculo de productos entre vectores en el espacio vectorial, la generación de gráficos asociados y la transformación de coordenadas cartesianas a cilindrícas. Se incluyen ejemplos con código Matlab.

Tipo: Apuntes

2019/2020

Subido el 22/03/2020

frank-garcia-4
frank-garcia-4 🇭🇳

2 documentos

1 / 8

Toggle sidebar

Esta página no es visible en la vista previa

¡No te pierdas las partes importantes!

bg1
1. PRODUCTOS ENTRE CAMPOS VECTORIALES
a= {x, 2 *y, 3 *z};
b= {x ^3, y ^ 2, z};
c= {y*z, x *z, x *y};
AxB +BxC
cruz1 =Cross[a, b]
2yz-3 y2z, -x z +3 x3z, -2 x3y+x y2
cruz2 =Cross[b, c]
x y3-x z2,-x4y+y z2, x4z-y3z
cruz1 +cruz2
x y3+2yz-3 y2z-x z2,-x4y-x z +3 x3z+y z2,-2 x3y+x y2+x4z-y3z
A·C
pp =Dot[a, c]
6xyz
(A+B)x CC
d=a+b
x+x3, 2 y +y2, 4 z
cruz3 =Cross[d, c]
2xy2+x y3-4xz2,-x2y-x4y+4yz2, x2z+x4z-2 y2z-y3z
pp1 =Dot[cruz3, c]
xyx2z+x4z-2 y2z-y3z+yz2xy2+x y3-4xz2+xz-x2y-x4y+4yz2
2. GRAFICOS
v=x ^ 2 /9+ ( y-2)^2 /16
x2
9
+1
16
(-2+y)2
campoelectrico = -Grad[v, {x, y}, "Cartesian"]
-2 x
9
,
2-y
8
pf3
pf4
pf5
pf8

Vista previa parcial del texto

¡Descarga Análisis Vectorial: Productos entre vectores, gráficos y transformación de coordenadas y más Apuntes en PDF de Agronomía solo en Docsity!

1. PRODUCTOS ENTRE CAMPOS VECTORIALES

a = {x, 2 * y, 3 * z};

b = {x ^ 3, y ^ 2, z};

c = {y * z, x * z, x * y};

AxB + BxC

cruz1 = Cross[a, b]

2 y z - 3 y 2 z, - x z + 3 x 3 z, - 2 x 3 y + x y 2 

cruz2 = Cross[b, c]

x y 3 - x z 2 , - x 4 y + y z 2 , x 4 z - y 3 z

cruz1 + cruz

x y 3 + 2 y z - 3 y 2 z - x z 2 , - x 4 y - x z + 3 x 3 z + y z 2 , - 2 x 3 y + x y 2 + x 4 z - y 3 z

A·C

pp = Dot[a, c]

6 x y z

(A + B) x C)·C

d = a + b

x + x 3 , 2 y + y 2 , 4 z

cruz3 = Cross[d, c]

2 x y 2 + x y 3 - 4 x z 2 , - x 2 y - x 4 y + 4 y z 2 , x 2 z + x 4 z - 2 y 2 z - y 3 z

pp1 = Dot[cruz3, c]

x y x 2 z + x 4 z - 2 y 2 z - y 3 z + y z 2 x y 2 + x y 3 - 4 x z 2  + x z - x 2 y - x 4 y + 4 y z 2 

2. GRAFICOS

v = x ^ 2 / 9 + (y - 2 ) ^ 2 / 16

x 2 9

(- 2 + y) 2

campoelectrico = - Grad[v, {x, y}, "Cartesian"]

-

2 x 9

2 - y 8

gr1 = ContourPlot[v, {x, - 20, 20}, {y, - 20, 20}]

  • 20 - 10 0 10 20
  • 20
  • 10

0

10

20

gr2 = StreamPlot[campoelectrico, {x, - 20, 20}, {y, - 20, 20}]

  • 20 - 10 0 10 20
  • 20
  • 10

0

10

20

In[7]:= G2^ =^ Grad[c1,^ {r,^ θ,^ ϕ}, "Spherical"]

Out[7]= 4 r 3 Cos[θ] 2 Cos[ϕ] Sin[θ] 2 Sin[ϕ],

r 2 r 4 Cos[θ] 3 Cos[ϕ] Sin[θ] Sin[ϕ] - 2 r 4 Cos[θ] Cos[ϕ] Sin[θ] 3 Sin[ϕ], 1 r

Csc[θ] r 4 Cos[θ] 2 Cos[ϕ] 2 Sin[θ] 2 - r 4 Cos[θ] 2 Sin[θ] 2 Sin[ϕ] 2 

TRANSFORME AHORA EL CAMPO U A COORDENADAS

ESFERICAS Y ENCUENTRE SU GRADIENTE EN ESTAS COORDENADAS

In[8]:= c2 = FullSimplify[ TransformedField["Cartesian" → "Spherical", u[x, y, z], {x, y, z} → {r, θ, ϕ}]]

Out[8]= r 4 Cos[θ] 2 Cos[ϕ] Sin[θ] 2 Sin[ϕ]

In[9]:= G2 = Grad[c2, {r, θ, ϕ}, "Spherical"]

Out[9]= 4 r^3 Cos[θ]^2 Cos[ϕ]^ Sin[θ]^2 Sin[ϕ],

r 2 r 4 Cos[θ] 3 Cos[ϕ] Sin[θ] Sin[ϕ] - 2 r 4 Cos[θ] Cos[ϕ] Sin[θ] 3 Sin[ϕ], 1 r

Csc[θ] r 4 Cos[θ] 2 Cos[ϕ] 2 Sin[θ] 2 - r 4 Cos[θ] 2 Sin[θ] 2 Sin[ϕ] 2 

ENCUENTRE LA DIVERGENCIA, ROTACIONAL,

Y LAPLACIANO DEL CAMPO VECTORIAL F EN COORDENADAS CARTESIANAS

d1 = Div[F[x, y, z], {x, y, z}, "Cartesian"] 0

rot1 = Curl[F[x, y, z], {x, y, z}, "Cartesian"] {- 1 + x, - y, 1 - 2 y}

l1 = Laplacian[F[x, y, z], {x, y, z}, "Cartesian"] {2, 0, 0}

TRANSFORME ESTE CAMPO EN COORDENADAS CILINDRICAS Y

VUELVA A ENCONTRAR SU DIVERGENCIA, ROTACIONAL Y LAPLACIANO

c3 = FullSimplify[ TransformedField["Cartesian" → "Cylindrical", F[x, y, z], {x, y, z} → {ρ, ϕ, Z}]] Sin[ϕ] (Z + ρ Cos[ϕ] ( 1 + ρ Sin[ϕ])), Cos[ϕ] (Z + ρ Cos[ϕ]) - ρ 2 Sin[ϕ] 3 , ρ 2 Cos[ϕ] Sin[ϕ]

d2 = Div[c3, {ρ, ϕ, Z}, "Cylindrical"] Sin[ϕ] (ρ Cos[ϕ] Sin[ϕ] + Cos[ϕ] ( 1 + ρ Sin[ϕ])) + 1 ρ

- ρ C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- Cos[ϕ] (Z + ρ Cos[ϕ]) + ρ 2 Sin[ϕ] 3 + Cos[ϕ]

(Z + ρ Cos[ϕ] ( 1 + ρ Sin[ϕ])) + Sin[ϕ] ρ 2 Cos[ϕ] 2 - ρ Sin[ϕ] ( 1 + ρ Sin[ϕ]) + 1 ρ

- ρ Cos[ϕ] 2 - Cos[ϕ] (Z + ρ Cos[ϕ]) - 6 ρ 2 Cos[ϕ] 2 Sin[ϕ] + 2 ρ Sin[ϕ] 2 +

3 ρ 2 Sin[ϕ] 3 + Cos[ϕ] (Z + ρ Cos[ϕ] ( 1 + ρ Sin[ϕ])) +

Sin[ϕ] ρ 2 Cos[ϕ] 2 - ρ Sin[ϕ] ( 1 + ρ Sin[ϕ]) , 0

4. OTRAS COSAS

AJUSTE NO LINEAL

vector = {4, 4.8, 5.1, 6, 7.2, 8.3, 9, 10, 10.9, 12.2}

{4, 4.8, 5.1, 6, 7.2, 8.3, 9, 10, 10.9, 12.2}

Dat = Table[{i, vector[[i]]}, {i, 1, Length[vector], 1}]

{{1, 4}, {2, 4.8}, {3, 5.1}, {4, 6}, {5, 7.2}, {6, 8.3}, {7, 9}, {8, 10}, {9, 10.9}, {10, 12.2}}

gra2 = Plot[Normal[ajuste], {x, 0, 11}]

2 4 6 8 10

6

8

10

12

14

Show[gra1, gra2]

2 4 6 8 10

2

4

6

8

10

12

GRAFICO DE DISCREPANCIAS

Needs["ErrorBarPlots`"]

g = ErrorListPlot[{{9.77, 0.03}, {9.82, 0.04}}, PlotRange → {{0, 3}, {9.7, 9.9}}, PlotLegends → {"Mediciones"}]

0.5 1.0 1.5 2.0 2.5 3.

Mediciones

ref = Plot[9.8, {x, 0, 4}, PlotStyle → {Red, Dashed}, PlotLegends → {"Teorico"}]

1 2 3 4

5

10

15

20

Teorico

Show[g, ref, Ticks → {{{1, "Medida 1"}, {2, "Medida 2"}}, Automatic}, AxesLabel → {None, "m/s^2"}, PlotLabel → "Grafico de Discrepancia"]

Medida 1 Medida 2

m/s^

Grafico de Discrepancia

Mediciones

Teorico

NonlinearModelFit::ivar : x^3 is not a valid variable. 

NonlinearModelFit::ivar : x^3 is not a valid variable. 