Tom K. answered 04/09/21
Knowledgeable and Friendly Math and Statistics Tutor
The inner product divided by the product of the magnitudes equals the cosine of the angle between them.
Thus, (-4,p,-2) . (-2, 3, 6) = 8 + 3p - 12 = 3p - 4
|-4, p, -2| * |-2,3,6| = sqrt(4^2+p^2+(-2)^2)*sqrt((-2)^2+3^2+6^2) = 7sqrt(20+p^2)
Thus,
(3p - 4)/7sqrt(20+p^2) = 4/21
28 sqrt(20+p^2) = 21(3p-4)
4 sqrt(20+p^2) = 3(3p-4)
Squaring both sides,
16(20+p^2) = 9(3p-4)^2
320+16p^2 = 81p^2 - 216p + 144
65p^2 - 216p - 176 = 0
(p - 4)(65p + 44) = 0
p = 4, - 44/65
As we squared, though, we may have introduced an extra root, so we substitute back into
(3p - 4)/7sqrt(20+p^2)
when p = 4, (3*4-4)/7sqrt(20+4^2) = 8/(7*6) = 4/21
when p=-44/65, (3*-44/65-4)/7sqrt(20+(-44/65)^2) =
-392/65/(7/65*sqrt(86436)) =
-392/(7*294) =
-98*4/(7*98*3) =
-4/21
This is, of course, not a solution, but the negative of it (introduced by squaring, as we expected)
p = 4