Solving a vector length equation

66 Views Asked by At

I have the equation $(a + kb)^2 = c$ where $a$ is a vector, $b$ is a unit vector and $k$ and $c$ are both scalars. By $^2$ I mean vector length (is this the correct notation?)

I am trying to solve for $k$, but I am not sure where to start.

I have noticed when I plot this graph there is sometimes no solution for $k$ (for example if k is less than $a^2$ and $b$ is perpendicular to $a$), is it possible to solve the lower bound?

2

There are 2 best solutions below

0
On BEST ANSWER

You can use the scalar product and use $|v|^2=v\cdot v$ for any vector $v$. Then $$|a+kb|^2=(a+kb)\cdot(a+kb)=|a|^2 +2k a\cdot b + k^2 |b|^2.$$ So your equation for $k$ becomes the quadratic $$ |b|^2 k^2 + 2(a\cdot b)k+ |a|^2-c =0.$$ You can now solve using the usual solution formula for quadratics (and you find out when there is no solution).

1
On

HINT

Recall that

$$\vec v^2=\vec v \cdot \vec v=|\vec v|^2$$

therefore

$$(\vec a + k\vec b)^2 = (\vec a + k\vec b)\cdot(\vec a + k\vec b)=|\vec a|^2+k^2|\vec b|^2+2k|\vec a||\vec b|\cos \theta=c$$

$$k^2+2k|\vec a|\cos \theta+|\vec a|^2-c=0 $$

and then

$$k=\frac{-2|\vec a|\cos \theta\pm \sqrt{4|\vec a|^2\cos^2 \theta-4|\vec a|^2+4c}}{2}=-|\vec a|\cos \theta \pm \sqrt{c-|\vec a|^2\sin^2 \theta}$$