Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

Exercício 1 (c) da Seção 21 do Elon

Project: Projetos
Views: 198
%md ## Exercício 1 (c) da Seção 21

Exercício 1 (c) da Seção 21

A = 9 B = -12 C = 16 D = 10 E = -55 F = 171
x, y = var('x y') phi(x,y) = A*x^2 + 2*B*x*y + C*y^2 + D*x + E*y + F phi
(x, y) |--> 9*x^2 - 24*x*y + 16*y^2 + 10*x - 55*y + 171
c = 0
phi(x,y) == c
9*x^2 - 24*x*y + 16*y^2 + 10*x - 55*y + 171 == 0
xmin = -10 xmax = 15 ymin = -10 ymax = 15 pcurva = implicit_plot(phi(x,y) - c, (x, xmin, xmax), (y, ymin, ymax)) pcurva.show(axes_labels=['$X$', '$Y$'], axes=True)
s, t = var('s t') h, k = var('h k') X = s + h Y = t + k
phibarra(s,t) = phi(X,Y).simplify_full() phibarra
(s, t) |--> 9*h^2 - (24*h + 55)*k + 16*k^2 + 2*(9*h - 12*k + 5)*s + 9*s^2 - (24*h - 32*k + 24*s + 55)*t + 16*t^2 + 10*h + 171
A*C - B^2
0
Dlinha = 2*A*h + 2*B*k + D Elinha = 2*B*h + 2*C*k + E
Dlinha
18*h - 24*k + 10
Elinha
-24*h + 32*k - 55
N = Matrix([[18, -24, -10], [-24, 32, 55]]) N
[ 18 -24 -10] [-24 32 55]
N.echelon_form()
[ 6 -8 80] [ 0 0 125]
solve(Elinha == 0, k)
[k == 3/4*h + 55/32]
h = 0 k = 3/4*h + 55/32
X = s + h Y = t + k
X
s
Y
t + 55/32
phibarra(s,t) = phi(X,Y).simplify_full() phibarra
(s, t) |--> 9*s^2 - 24*s*t + 16*t^2 - 125/4*s + 7919/64
pcurvaOST = implicit_plot(phibarra(s,t) - c, (s, xmin, xmax), (t, ymin, ymax)) pcurvaOST.show(axes_labels=['$S$', '$T$'], axes=True)
t = var('t') r1 = parametric_plot([h, t], (t, -10, 15), color='black', linestyle='--') r2 = parametric_plot([t, k], (t, -10, 15), color='black', linestyle='--') tS = text("S", (14, 3), color='black') tT = text("T", (1, 14), color='black') p = pcurva + r1 + r2 + tS + tT p.show(axes_labels=['$X$', '$Y$'], axes=True)
M = Matrix([[A, B], [B, C]]) M
[ 9 -12] [-12 16]
z = var('z') solve(z^2 - (A+C)*z + A*C - B^2 == 0, z)
[z == 0, z == 25]
M.eigenvalues()
[25, 0]
lambda1, lambda2 = M.eigenvalues()
lambda1
25
lambda2
0
D, P = M.eigenmatrix_right()
D
[25 0] [ 0 0]
P
[ 1 1] [-4/3 3/4]
w1 = vector(P[:,0]) w2 = vector(P[:,1])
w1
(1, -4/3)
w2
(1, 3/4)
u1 = (1/w1.norm())*w1 u2 = (1/w2.norm())*w2
u1
(3/5, -4/5)
u2
(4/5, 3/5)
u1.dot_product(u2)
0
p1 = arrow((0,0), u1, color='green', legend_label='u1', legend_color='black') p2 = arrow((0,0), u2, color='red', legend_label='u2', legend_color='black') pP = arrow((0,0), 3*u1, linestyle='--', width=1, color='black') pQ = arrow((0,0), 3*u2, linestyle='--', width=1, color='black') tP = text("P", 3.2*u1, color='black') tQ = text("Q", 3.2*u2, color='black') p = p1 + p2 + pcurvaOST + pP + pQ + tP + tQ p.show(aspect_ratio=1,axes_labels=['$S$', '$T$'], xmin=-2, xmax=8, ymin=-3, ymax=8, axes=True, gridlines=True)
a = u1[0] b = u1[1]
a
3/5
b
-4/5
theta = var('theta') solve([cos(theta) == a, sin(theta) == b], theta)
[[theta == 2*pi*z66 - arctan(4/3)]]
-arctan(4/3).n()
-0.927295218001612
(-arctan(4/3)*180/pi).n()
-53.1301023541560
p, q = var('p q')
S = a*p - b*q T = b*p + a*q
phibarra2(p,q) = phibarra(S,T).simplify_full() phibarra2
(p, q) |--> 25*p^2 - 75/4*p - 25*q + 7919/64
phibarra2(p,q) == c
25*p^2 - 75/4*p - 25*q + 7919/64 == 0
pcurvaPQ = implicit_plot(phibarra2(s,t) - c, (s, xmin, xmax), (t, ymin, ymax)) pcurvaPQ.show(axes_labels=['$P$', '$Q$'], axes=True)
%latex $$25p^2 - \frac{75}{4}p - 25q + \frac{7919}{64} = 0$$ $$25 \left( p^2 - \frac{3}{4}p \right) - 25q + \frac{7919}{64} = 0$$ $$25 \left( p - \frac{3}{8} \right)^2 -25 \left( \frac{3}{8} \right)^2 - 25q + \frac{7919}{64} = 0$$ $$25 \left( p - \frac{3}{8} \right)^2 - 25q + \frac{7694}{64} = 0$$ $$\left( p - \frac{3}{8} \right)^2 = q - \frac{3847}{800}$$
m, n = var('m n')
P = m + 3/8 Q = n + 3847/800
phibarra3(m,n) = phibarra2(P,Q).simplify_full() phibarra3
(m, n) |--> 25*m^2 - 25*n
pcurvaMN = implicit_plot(phibarra3(m,n) - c, (m, xmin, xmax), (n, ymin, ymax)) pcurvaMN.show(axes_labels=['$M$', '$N$'], axes=True)
X
s
Y
t + 55/32
S
3/5*p + 4/5*q
T
-4/5*p + 3/5*q
P
m + 3/8
Q
n + 3847/800
Xf(s,t) = X Yf(s,t) = Y Sf(p,q) = S Tf(p,q) = T Pf(m,n) = P Qf(m,n) = Q
Xf
(s, t) |--> s
Yf
(s, t) |--> t + 55/32
Sf
(p, q) |--> 3/5*p + 4/5*q
Tf
(p, q) |--> -4/5*p + 3/5*q
Pf
(m, n) |--> m + 3/8
Qf
(m, n) |--> n + 3847/800
Sf(Pf(m,n), Qf(m,n)) Tf(Pf(m,n), Qf(m,n))
3/5*m + 4/5*n + 509/125 -4/5*m + 3/5*n + 10341/4000
X1f = Xf(Sf(Pf(m,n), Qf(m,n)), Tf(Pf(m,n), Qf(m,n))) Y1f = Yf(Sf(Pf(m,n), Qf(m,n)), Tf(Pf(m,n), Qf(m,n))) X1f Y1f
3/5*m + 4/5*n + 509/125 -4/5*m + 3/5*n + 538/125
phibarra(m,n) = phi(X1f,Y1f).simplify_full() phibarra
(m, n) |--> 25*m^2 - 25*n