Solving $3$ equations with $3$ unknowns when one of the equations is not linear

72 Views Asked by At

I have $3$ equation with $3$ unknowns $(i, j, k)$ while $a, b, c, d, e$ and $f$ are known.

$$ai + bj + ck = 1\\ di + ej + fk = 1\\ i^2 + j^2 + k^2 = 1$$

This type of equation set is typical for unit vector solving problems. So I need to find the vector $(i, j, k).$

How can I solve this?

2

There are 2 best solutions below

3
On

Solve the first equation for $i$. Substitute this in the second equation. Solve the second equation for $j$. Substitute this in the expression for $i$. Substitute both $i$ and $j$ in the third equation. Then you are left with a quadratic equation in $k$. Solve the quadratic equation for $k$. This gives you $i$, $j$, $k$.

1
On

This will at least let you know how many solutions to expect.

Write these in terms of the dot product. Let $x=(i,j,k)$ and $v=(a,b,c)$ and $w=(d,e,f).$ Assume $w\neq v.$

Then your equations are:

$$x\cdot v=x\cdot w=x\cdot x=1.$$

So $x$ is perpendicular to $w-v.$

If $\theta_v$ is the angle between vectors $x$ and $v,$ then:

$$c_v=\cos(\theta_v)=\frac1{\|v\|}$$

You also have, for a similar $\theta_w$

$$c_w=\cos(\theta_w)=\frac1{\|w\|}$$

An interesting restriction is that you need $$\|v\|,\|w\|\geq 1.\tag 1$$

Since the cosines are positive, both angles are less than $\frac\pi2.$

If $\alpha$ is the angle between $v,w$ then $\alpha\leq \theta_v+\theta_w,$ and $$c_{vw}=\cos\alpha =\frac{v\cdot w}{\|v\|\cdot\|w\|}$$

Since cosine is strictly decreasing on $[0,\pi]$ you need:

$$c_{vw} \geq c_vc_w-\sqrt{(1-c_v^2)(1-c_w^2)}\tag2$$

You need $(1)$ and $(2)$ to be true for there to be any solutions.

All of these values can be computed directly from $a,b,c,d,e,f.$

If you have equality in $(2),$ you get one solution.

If you get strict inequality in $(2)$ you get two answers.


$(2)$ is equivalent to:

$$\sqrt{(\|v\|^2-1)(\|w\|^2-1)}\geq 1-v\cdot w\tag3$$

If $v\cdot w\geq 1,$ then the right side is not positive, so $(3)$ is true.

Otherwise, if $v\cdot w<1,$ then we can square both sides and get:

$$(\|v\|^2\|w\|^2-(\|v\|^2+\|w\|^2) \geq (v\cdot w)^2-2(v\cdot w)$$

So we need $v\cdot v\geq 1, w\cdot w\geq 1,$ and either $v\cdot w\geq 1,$ or

$$(v\cdot v)(w\cdot w)-(v\cdot w)^2 \geq (v+w)\cdot (v+w)\tag4$$