You are on page 1of 11

Tarea del laboratorio de cómputo

Problema #19
x+ⅈ*y-1
In[207]:= f[x_, y_] :=
x+ⅈ*y+1

In[382]:= u[x_, y_] := ComplexExpand[Re[f[x, y]]]

In[383]:= v[x_, y_] := ComplexExpand[Im[f[x, y]]]

In[222]:= Solve[u[x, y] ⩵ c, y]

- 1 - c - 2 c x + x 2 - c x2 - 1 - c - 2 c x + x 2 - c x2
Out[222]= y → - , y → 
-1 + c -1 + c

In[252]:= Clear[YU1, YU2]

- 1 - c - 2 c x + x 2 - c x2
In[253]:= YU1[x_, c_] := -
-1 + c

- 1 - c - 2 c x + x 2 - c x2
In[254]:= YU2[x_, c_] :=
-1 + c
Graficando curvas de nivel u[x,y]=c
In[266]:= Plot[Table[{YU1[x, c], YU2[x, c]}, {c, 2, 5}], {x, - 4, 0},
PlotStyle → Red, PlotLabel → "u[x,y]=c", AspectRatio → Automatic]
u[x,y]=c
1.0

0.5

Out[266]=
-4 -3 -2 -1

-0.5

-1.0

In[240]:= Solve[v[x, y] ⩵ c, y]

1- 1 - c 2 - 2 c 2 x - c 2 x2 1+ 1 - c 2 - 2 c 2 x - c 2 x2
Out[240]= y → , y → 
c c
2 apli 5.nb

1+ 1 - c 2 - 2 c 2 x - c 2 x2
In[241]:= YV1[x_, c_] :=
c

1- 1 - c 2 - 2 c 2 x - c 2 x2
In[242]:= YV2[x_, c_] :=
c
Curvas de nivel para v[x,y]=c
In[267]:= Plot[Table[{YV1[x, c], YV2[x, c]}, {c, 2, 5}], {x, - 4, 0},
PlotStyle → Blue, PlotLabel → "v[x,y]=c", AspectRatio → Automatic]
v[x,y]=c
1.0
0.8

Out[267]= 0.6
0.4
0.2

-4 -3 -2 -1

In[274]:= Show[Plot[Table[{YU1[x, c], YU2[x, c]}, {c, 2, 5}], {x, - 4, 0}, PlotStyle → Red,
AspectRatio → Automatic], Plot[Table[{YV1[x, c], YV2[x, c]}, {c, 2, 5}],
{x, - 4, 0}, PlotStyle → Blue, AspectRatio → Automatic]]
1.0

0.5

Out[274]=
-4 -3 -2 -1

-0.5

-1.0

Problema #20
θ θ
In[276]:= f[r_, θ_] := r Cos  + ⅈ * Sin 
2 2
θ
In[289]:= u[r_, θ_] := r Cos 
2
θ
In[291]:= v[r_, θ_] := r Sin 
2
In[290]:= Solve[u[r, θ] ⩵ c, r]
θ 2
Out[290]= r → c2 Sec  
2

θ 2
In[294]:= RU[θ_, c_] := c2 Sec 
2
apli 5.nb 3

Curvas de nivel para u[r,θ]=c


In[303]:= Plot[Table[RU[θ, c], {c, 0, 5}], {θ, - π, π},
PlotStyle → Red, PlotLabel → "u[r,θ]=c", AspectRatio → 1]
u[r,θ]=c

200

150

Out[303]=

100

50

-3 -2 -1 1 2 3

In[298]:= Solve[v[r, θ] ⩵ c, r]
θ 2
Out[298]= r → c2 Csc  
2

θ 2
In[299]:= RV[θ_, c_] := c2 Csc 
2
Curvas de nivel para v[r,θ]=c
4 apli 5.nb

In[302]:= Plot[Table[RV[θ, c], {c, 0, 5}], {θ, - π, π},


PlotStyle → Blue, PlotLabel → "v[r,θ]=c", AspectRatio → 1]
v[r,θ]=c

200

150

Out[302]=

100

50

-3 -2 -1 1 2 3

Mostrando u[x,y]=c y v[x,y]=c en el mismo plano de coordenadas, manteniendo los mismos colores
In[307]:= Show[{Plot[Table[RU[θ, c], {c, 0, 5}], {θ, - π, π}, PlotStyle → Red, AspectRatio → 1],
Plot[Table[RV[θ, c], {c, 0, 5}], {θ, - π, π}, PlotStyle → Blue, AspectRatio → 1]}]

200

150

Out[307]=

100

50

-3 -2 -1 1 2 3
apli 5.nb 5

Problema #21
1
In[309]:= f[x_, y_] := 1 x + ⅈ * y +
x+ⅈ*y

A)
In[310]:= u[x_, y_] := ComplexExpand[Re[f[x, y]]]

In[311]:= v[x_, y_] := ComplexExpand[Im[f[x, y]]]

La función de potencial es:


In[312]:= u[x, y]
x
Out[312]= x+
x2 + y2

La función de lineas de corriente es:


In[318]:= v[x, y]
y
Out[318]= y-
x2 + y2

B)
In[316]:= upolar[r_, θ_] := u[r * Cos[θ], r * Sin[θ]]

In[317]:= vpolar[r_, θ_] := v[r * Cos[θ], r * Sin[θ]]

La función de potencial en coordenadas polares es:


In[319]:= upolar[r, θ]
r Cos[θ]
Out[319]= r Cos[θ] +
r2 Cos[θ]2 + r2 Sin[θ]2

La función de lineas de corriente en coordenadas polares es:


In[320]:= vpolar[r, θ]
r Sin[θ]
Out[320]= r Sin[θ] -
r2 Cos[θ]2 + r2 Sin[θ]2
6 apli 5.nb

C)
In[321]:= Solve[upolar[r, θ] ⩵ c, r]

c Cos[θ]2 - - 2 + c2 - 2 Cos[2 θ] + c Sin[θ]2


Out[321]= r → ,
2 Cos[θ]3 + Cos[θ] Sin[θ]2 

c Cos[θ]2 + - 2 + c2 - 2 Cos[2 θ] + c Sin[θ]2


r → 
2 Cos[θ]3 + Cos[θ] Sin[θ]2 

c Cos[θ]2 + - 2 + c2 - 2 Cos[2 θ] + c Sin[θ]2


In[322]:= rupolar1[θ_, c_] :=
2 Cos[θ]3 + Cos[θ] Sin[θ]2 

c Cos[θ]2 - - 2 + c2 - 2 Cos[2 θ] + c Sin[θ]2


In[323]:= rupolar2[θ_, c_] :=
2 Cos[θ]3 + Cos[θ] Sin[θ]2 

In[325]:= Reduce- 2 + c2 - 2 Cos[2 θ] > 0, c

Out[325]= c ∈  && Cos[2 θ] < - 1 || Cos[2 θ] ≥ - 1 && c < - 2 + 2 Cos[2 θ] || c > 2 + 2 Cos[2 θ] 

In[342]:= Solve[vpolar[r, θ] ⩵ c, r]

c Cos[θ]2 - 2 + c2 - 2 Cos[2 θ] + c Sin[θ]2


Out[342]= r → ,
2 Cos[θ]2 Sin[θ] + Sin[θ]3 

c Cos[θ]2 + 2 + c2 - 2 Cos[2 θ] + c Sin[θ]2


r → 
2 Cos[θ]2 Sin[θ] + Sin[θ]3 

c Cos[θ]2 + 2 + c2 - 2 Cos[2 θ] + c Sin[θ]2


In[344]:= rvpolar1[θ_, c_] :=
2 Cos[θ]2 Sin[θ] + Sin[θ]3 

c Cos[θ]2 - 2 + c2 - 2 Cos[2 θ] + c Sin[θ]2


In[345]:= rvpolar2[θ_, c_] :=
2 Cos[θ]2 Sin[θ] + Sin[θ]3 

Mostrando ϕ[x,y]=c y ψ[x,y]=c en el mismo plano de coordenadas, ϕ en rojo y ψ en azul


apli 5.nb 7

In[350]:= Show[{Plot[Table[{rupolar1[θ, c], rupolar2


[θ, c]}, {c, 0, 5}], {θ, 0, 2 π}, PlotStyle → Red], Plot[Table[{rvpolar1[θ, c], rvpolar2
[θ, c]}, {c, 0, 5}], {θ, 0, 2 π}, PlotStyle → Blue]}, AspectRatio → 1]

15

10

Out[350]=
1 2 3 4 5 6

-5

-10

-15

Problema #22
x+ⅈ*y+1 x+ⅈ*y+1
In[352]:= f[x_, y_] := Log  + I * Arg 
x+ⅈ*y-1 x+ⅈ*y-1

A)
◼ i)
In[354]:= Solve[u[x, y] ⩵ c1, y]

1 - ⅇ2 c1 + 2 x + 2 ⅇ2 c1 x + x2 - ⅇ2 c1 x2 1 - ⅇ2 c1 + 2 x + 2 ⅇ2 c1 x + x2 - ⅇ2 c1 x2
Out[354]= y → - , y → 
- 1 + ⅇ2 c1 - 1 + ⅇ2 c1

In[355]:= Simplify[ExpToTrig[%]]

Out[355]= y → -  2 √ Cosh[c1] + Sinh[c1] 2 x Cosh[c1] - 1 + x2  Sinh[c1] 


 - 1 + Cosh[2 c1] + Sinh[2 c1] ,
y →  2 √ Cosh[c1] + Sinh[c1] 2 x Cosh[c1] - 1 + x2  Sinh[c1] 
 - 1 + Cosh[2 c1] + Sinh[2 c1] 
8 apli 5.nb

Obteniendo y2 que esta presente en la ecuación original

In[356]:= Simplify 2 √ Cosh[c1] + Sinh[c1] 2 x Cosh[c1] - 1 + x2  Sinh[c1] 


2
 - 1 + Cosh[2 c1] + Sinh[2 c1]  

Out[356]= - 1 - x2 + 2 x Coth[c1]

y2 =-1 - x2 + 2 x Coth[c1], Coth[x]2 - Csch[x]2 = 1


=>
y2 =-Coth[c1]2 - Csch[c1]2  - x2 + 2 x Coth[c1]
y2 =-Coth[c1]2 + Csch[c1]2 - x2 + 2 x Coth[c1]
x2 - 2 x Coth[c1] + Coth[c1]2 + y2 = Csch[c1]2
(x - Coth[c1])2 + y2 = Csch[c1]2

◼ ii)
In[357]:= v[x, y]
1+x+ⅈy
Out[357]= 2 Arg 
-1 + x + ⅈ y

No es posible espejar nada a partir de esta ecuación que es armonica, pero se pueden emplear las
ecuaciónes de Cauchy-Riemann para obtener v[x,y] como el conjugado armonico de la función u[x,y]
∂u ∂v
∂x
= ∂y
∂u
∂y
= - ∂v
∂x

Obteniendo v[x,y]
∂v
Obteniendo ∂y

In[385]:= Dvy[x_, y_] := D[u[x, y], x]


∂v
Integrando parcialmente ∂y
respecto de y para encontrar v

In[390]:= v[x_, y_] := Integrate[Dvy[x, y], y]

In[388]:= Dvpx[x_, y_] := D[vp[x, y], x]

In[391]:= v[x, y]
y y
Out[391]= - ArcTan  + ArcTan 
-1 + x 1+x
apli 5.nb 9

In[392]:= Solve[v[x, y] ⩵ c2, x]


Out[392]= x →
- √ - 1 - 2 ⅈ y + y2 + Cos[2 c2] - 2 ⅈ y Cos[2 c2] - y2 Cos[2 c2] + ⅈ Sin[2 c2] + 2 y Sin[2 c2] - ⅈ
y2 Sin[2 c2]   - 1 + Cos[2 c2] + ⅈ Sin[2 c2] ,
x → √ - 1 - 2 ⅈ y + y2 + Cos[2 c2] - 2 ⅈ y Cos[2 c2] - y2 Cos[2 c2] + ⅈ Sin[2 c2] +
2 y Sin[2 c2] - ⅈ y2 Sin[2 c2]   - 1 + Cos[2 c2] + ⅈ Sin[2 c2] 

Obteniendo x 2 , que esta presente en la ecuacion original


In[394]:= Simplify
- √ - 1 - 2 ⅈ y + y2 + Cos[2 c2] - 2 ⅈ y Cos[2 c2] - y2 Cos[2 c2] + ⅈ Sin[2 c2] + 2 y Sin[2 c2] -
2
ⅈ y2 Sin[2 c2]   - 1 + Cos[2 c2] + ⅈ Sin[2 c2]  

Out[394]= 1 - y2 - 2 y Cot[c2]

x 2 = 1 - y2 - 2 y Cot[c2]
x 2 + y2 + 2 y Cot[c2] = 1, Csc[x]2 = 1 + Cot[x]2
x 2 + y2 + 2 y Cot[c2] = -Cot[c2]2 + Csc[c2]2
x 2 + y2 + 2 y Cot[c2] + Cot[c2]2 = Csc[c2]2

x 2 + (y + Cot[c2 - Cte])2 = Csc[c2 - Cte]2

B)
In[402]:= Grid[{{"Valor al que tiende c1", "Coordenada x", "Coordenada y"},
{∞, Limit[Coth[c1], c1 → ∞], 0}, {- ∞, Limit[Coth[c1], c1 → - ∞], 0},
{"0 por la derecha", Limit[Coth[c1], c1 → 0, Direction → - 1], 0},
{"0 por la izquierda", Limit[Coth[c1], c1 → 0, Direction → 1], 0}}]
Valor al que tiende c1 Coordenada x Coordenada y
∞ 1 0
Out[402]= -∞ -1 0
0 por la derecha ∞ 0
0 por la izquierda -∞ 0

C)
z = 1 = (1,0)
z = -1 = (-1,0)
Todas las curvas pasan en estos puntos sin importar su valor de c2
Solvex2 + y + Cot[c2]2 ⩵ Csc[c2]2 , y
1 1
y → - 2 Cot[c2] - - 4 x2 + 4 Csc[c2]2 , y → - 2 Cot[c2] + - 4 x2 + 4 Csc[c2]2 
2 2
10 apli 5.nb

1
In[403]:= fuerza1[x_, c2_] := - 2 Cot[c2] + - 4 x2 + 4 Csc[c2]2
2
1
In[404]:= fuerza2[x_, c2_] := - 2 Cot[c2] - - 4 x2 + 4 Csc[c2]2
2
Encontrando intersecciones entre fuerzas con c2 constantes diferentes, usando constantes ‘h’ y ‘k’
Solve[fuerza1[x, h] ⩵ fuerza1[x, k], x]
1
Out[407]= x → -
2 Cot[h]2 - 2 Cot[h] Cot[k] + Cot[k]2
√ - Cot[h]4 + 4 Cot[h]3 Cot[k] - 6 Cot[h]2 Cot[k]2 + 4 Cot[h] Cot[k]3 - Cot[k]4 + 2 Cot[h]2
Csc[h]2 - 4 Cot[h] Cot[k] Csc[h]2 + 2 Cot[k]2 Csc[h]2 - Csc[h]4 + 2 Cot[h]2 Csc[k]2 -
4 Cot[h] Cot[k] Csc[k]2 + 2 Cot[k]2 Csc[k]2 + 2 Csc[h]2 Csc[k]2 - Csc[k]4 ,
1
x → √ - Cot[h]4 + 4 Cot[h]3 Cot[k] -
2 Cot[h]2 - 2 Cot[h] Cot[k] + Cot[k]2
6 Cot[h]2 Cot[k]2 + 4 Cot[h] Cot[k]3 - Cot[k]4 + 2 Cot[h]2 Csc[h]2 -
4 Cot[h] Cot[k] Csc[h]2 + 2 Cot[k]2 Csc[h]2 - Csc[h]4 + 2 Cot[h]2 Csc[k]2 -
4 Cot[h] Cot[k] Csc[k]2 + 2 Cot[k]2 Csc[k]2 + 2 Csc[h]2 Csc[k]2 - Csc[k]4 

In[408]:= FullSimplify[%]
Out[408]= {{x → - 1}, {x → 1}}

In[409]:= FullSimplify[Solve[fuerza2[x, h] ⩵ fuerza2[x, k], x]]


Out[409]= {{x → - 1}, {x → 1}}

Evaluando x=1 y x=-1 en la ecuación de fuerza “y”


Simplify[fuerza1[- 1, h]]

Out[413]= - Cot[h] + Cot[h]2

In[418]:= Simplify[fuerza1[1, h]]

Out[418]= - Cot[h] + Cot[h]2

In[419]:= Simplify[fuerza2[- 1, h]]

Out[419]= - Cot[h] - Cot[h]2

In[420]:= Simplify[fuerza1[1, h]]

Out[420]= - Cot[h] + Cot[h]2

Todos los valores obtenidos son equivalentes a 0, y = 0


Los puntos obtenidos son (1,0) y (-1,0)
Lo cual demuestra que todas las curvas pasan por los puntos (1,0) y (-1,0) sin importar el valor de c2

D)
apli 5.nb 11

In[421]:= equipotencial1[x_, c1_] := - 1 - x2 + 2 x Coth[c1]

In[422]:= equipotencial2[x_, c1_] := - - 1 - x2 + 2 x Coth[c1]

Las lineas de fuerza son las curvas azules


y las curvas equipotenciales son las curvas rojas
In[431]:= Show[{Plot[Table[{equipotencial1[x, c1], equipotencial2[x, c1]}, {c1, 1, 20}], {x, - 2, 3},
PlotStyle → Red], Plot[Table[{fuerza1[x, c2], fuerza2[x, c2]}, {c2, 1, 20}],
{x, - 2, 3}, PlotStyle → Blue]}, AspectRatio → Automatic]

0.5

Out[431]=
-2 -1 1 2 3

-0.5

You might also like