Simplify this vector expression I have a question which I know the answer to but am having difficulty showing it. It's about simplifying the following vector equation (I'm aware I've grouped the terms in an arguably strange way):  
$ (p^2 + q^2 |\mathbf{P}|^2 + (\mathbf{P} \bullet \mathbf{Q})^2)\mathbf{X} + (\mathbf{Q} \bullet \mathbf{X})(|\mathbf{P}|^2 \mathbf{Q} - (\mathbf{P} \bullet \mathbf{Q})\mathbf{P}) + (\mathbf{P} \bullet \mathbf{X})(|\mathbf{Q}|^2 \mathbf{P} - (\mathbf{P} \bullet \mathbf{Q})\mathbf{Q}) + (\mathbf{X} \bullet (\mathbf{P} \times \mathbf{Q}))(\mathbf{P} \times \mathbf{Q}), $
where $p$ and $q$ are scalars and $\mathbf{P} , \mathbf{Q} , \mathbf{X} $ are three dimensional vectors equipped with the standard dot, $\bullet$, and cross, $\times$, products. Also, $|\mathbf{P}|^2 \equiv (\mathbf{P} \bullet \mathbf{P}) $.
Furthermore, we have the condition that $p^2 + |\mathbf{P}|^2 = q^2 + |\mathbf{Q}|^2 = 1 $.
I'm quite sure that this expression should just simplify to $\mathbf{X}$, particularly having run different values of each variable and vector through some code. Maybe the last three terms always linearly combine to be parallel to $\mathbf{X}$?
Any help would be much appreciated! 
 A: Many thanks for the reply. After a few hours straight of trying to tackle this, I finally solved the problem. I'm going to use these two vector identities (which I've pulled from Wikipedia and trust to be correct).
$ (\mathbf{A} \times \mathbf{B}) \bullet (\mathbf{C} \times \mathbf{D}) = (\mathbf{A} \bullet \mathbf{C})(\mathbf{B} \bullet \mathbf{D}) - (\mathbf{B} \bullet \mathbf{C})(\mathbf{A} \bullet \mathbf{D}) \qquad (1)  $
$ \mathbf{D} = \frac{\mathbf{D} \bullet (\mathbf{B} \times \mathbf{C})}{[\mathbf{A},\mathbf{B},\mathbf{C}]}\mathbf{A} + \frac{\mathbf{D} \bullet (\mathbf{C} \times \mathbf{A})}{[\mathbf{A},\mathbf{B},\mathbf{C}]}\mathbf{B} + \frac{\mathbf{D} \bullet (\mathbf{A} \times \mathbf{B})}{[\mathbf{A},\mathbf{B},\mathbf{C}]}\mathbf{C} \qquad (2)  $
Where $[\mathbf{A},\mathbf{B},\mathbf{C}] = \mathbf{A} \bullet (\mathbf{B} \times \mathbf{C}) $ and $(2)$ describes how to describe a vector $\mathbf{D}$ in terms of three arbitrary vectors $\mathbf{A},\mathbf{B},\mathbf{C}$.
So let's begin!
So first, I rearrange the expression into a more useful form:
$ (p^2 + q^2  |\mathbf{P}|^2 + (\mathbf{P}\bullet\mathbf{Q})^2)\mathbf{X} + ((\mathbf{Q}\bullet\mathbf{X})|\mathbf{P}|^2 - (\mathbf{P}\bullet\mathbf{X})(\mathbf{P}\bullet\mathbf{Q}))\mathbf{Q} + ((\mathbf{P}\bullet\mathbf{X})|\mathbf{Q}|^2 - (\mathbf{Q}\bullet\mathbf{X})(\mathbf{P}\bullet\mathbf{Q}))\mathbf{P} +(\mathbf{X}\bullet(\mathbf{P}\times\mathbf{Q}))\mathbf{P}\times\mathbf{Q}  $
Using relation $(1)$, we can rewrite the coefficients of $\mathbf{P}$ and $\mathbf{Q}$ such that we have
$ (p^2 + q^2  |\mathbf{P}|^2 + (\mathbf{P}\bullet\mathbf{Q})^2)\mathbf{X} - ((\mathbf{P}\times\mathbf{Q})\bullet(\mathbf{X}\times\mathbf{P}))\mathbf{Q} + ((\mathbf{P}\times\mathbf{Q})\bullet(\mathbf{X}\times\mathbf{Q}))\mathbf{P} +(\mathbf{X}\bullet(\mathbf{P}\times\mathbf{Q}))\mathbf{P}\times\mathbf{Q}  $
Now, we use relation $(2)$ to rewrite $\mathbf{P}\times\mathbf{Q}$ in terms of $\mathbf{X} , \mathbf{P}$ and $\mathbf{Q}$ such that 
$ \mathbf{P}\times\mathbf{Q} = \frac{(\mathbf{P}\times\mathbf{Q}) \bullet (\mathbf{P} \times \mathbf{Q})}{\mathbf{X}\bullet(\mathbf{P}\times\mathbf{Q})}\mathbf{X} + \frac{(\mathbf{P}\times\mathbf{Q}) \bullet (\mathbf{Q} \times \mathbf{X})}{\mathbf{X}\bullet(\mathbf{P}\times\mathbf{Q})}\mathbf{P} + \frac{(\mathbf{P}\times\mathbf{Q}) \bullet (\mathbf{X} \times \mathbf{P})}{\mathbf{X}\bullet(\mathbf{P}\times\mathbf{Q})}\mathbf{Q} = \frac{(\mathbf{P}\times\mathbf{Q}) \bullet (\mathbf{P} \times \mathbf{Q})}{\mathbf{X}\bullet(\mathbf{P}\times\mathbf{Q})}\mathbf{X} - \frac{(\mathbf{P}\times\mathbf{Q}) \bullet (\mathbf{X} \times \mathbf{Q})}{\mathbf{X}\bullet(\mathbf{P}\times\mathbf{Q})}\mathbf{P} + \frac{(\mathbf{P}\times\mathbf{Q}) \bullet (\mathbf{X} \times \mathbf{P})}{\mathbf{X}\bullet(\mathbf{P}\times\mathbf{Q})}\mathbf{Q}$
Substituting this back, we find that terms cancel and we're left with 
$ (p^2 + q^2  |\mathbf{P}|^2 + (\mathbf{P}\bullet\mathbf{Q})^2 + |\mathbf{P}\times\mathbf{Q}|^2)\mathbf{X} = (p^2 + q^2  |\mathbf{P}|^2 +|\mathbf{P}|^2 |\mathbf{Q}|^2)\mathbf{X} = \mathbf{X} $
Many thanks for the help, really appreciated it; hope you guys don't feel like I've wasted your time... do let me know if you agree with what I've written!
A: Partial Answer
I can't simplify the final expression, maybe someone can help?

We will simplify it bits by bits, in the first bracket,
$$p^2+q^2 |\mathbf{P}|^2+ ( \mathbf{P}\bullet \mathbf{Q})^2= p^2+(1-|\mathbf{Q}|^2) |\mathbf{P}|^2+ (|\mathbf{P}| |\mathbf{Q}|)^2=1$$
So that gives us $\mathbf X$

Now let the vectors in the second bracket can be written as:
$$(\mathbf Q \bullet \mathbf X) (|\mathbf P |^2) \left(\mathbf Q - \frac{(\mathbf P \bullet \mathbf Q)}{|\mathbf P|^2} \mathbf P\right)$$
The vector inside is $\mathbf Q$ minus its projection onto $\mathbf P$, which is perpendicular to $\mathbf P$. The vector in the third bracket is similar. Note that these two vectors are in the same plane as $\mathbf P$ and $\mathbf Q$. But the vector in the last bracket is perpendicular to both $\mathbf {P,Q}$. So from this, I suspect that the expression is only breaking $\mathbf X$ down into different components.
Now let $ \mathbf Q - \frac{(\mathbf P \bullet \mathbf Q)}{|\mathbf P|^2} \mathbf P = (\mathbf {|Q|} \sin \theta) \mathbf {\hat {n}_P}$
Where $\theta$ is the angle between $\mathbf {P,Q}$,    $\mathbf {\hat {n}_P}$ is the unit vector that is perpendicular to $\mathbf P$ and lies on the span of $\mathbf {P,Q}$. 
Define $\mathbf{\hat{n}_Q}$ similarly.
Also by the fact $|\mathbf P \times \mathbf Q| = \mathbf{|P| |Q|}\sin \theta$
We can group together the three brackets:
$$(\mathbf{|P|^2 |Q|^2} \sin \theta )\left(\frac 1{\mathbf {|Q|}} (\mathbf {Q} \bullet \mathbf {X}) \mathbf{\hat{n}_P}+ \frac 1{\mathbf {|P|}} (\mathbf {P} \bullet \mathbf {X}) \mathbf{\hat{n}_Q}+ \frac {\sin \theta}{\mathbf{|P\times Q|}} (\mathbf X \bullet (\mathbf{P \times Q})) \mathbf{\hat{n}}\right)$$
Almost done, we need to find the projection of $\mathbf X$ onto $\mathbf{\hat{n}_P}$, notice:
$$ \frac 1{\mathbf{|Q|}}(\mathbf Q \bullet \mathbf X)= \left(\frac{(\mathbf P \bullet \mathbf Q)}{|\mathbf P|^2 |\mathbf Q|} \mathbf P \right)\bullet \mathbf X + \sin (\theta) \mathbf {\hat {n}_P} \bullet \mathbf X$$
And
$$\frac 1{\mathbf{|P|}} (\mathbf P \bullet \mathbf X)= \left(\frac{(\mathbf P \bullet \mathbf Q)}{|\mathbf Q|^2 \mathbf{|P|}} \mathbf Q \right)\bullet \mathbf X +\sin (\theta) \mathbf {\hat {n}_Q} \bullet \mathbf X$$
Plug these two dot products into our expression:
$$(\mathbf{|P|^2 |Q|^2} \sin^2 \theta )\left(  (\mathbf {\hat {n}_P} \bullet \mathbf X) \mathbf{\hat{n}_P}+ (\mathbf {\hat {n}_Q} \bullet \mathbf X) \mathbf{\hat{n}_Q}+  (\mathbf {\hat{n}}\bullet \mathbf X) \mathbf{\hat{n}}\right)+ \sin\theta \mathbf{|Q| (\mathbf{P\bullet Q})(\mathbf{P \bullet X}) \hat{n}_P} +\sin \theta \mathbf{|P| (\mathbf{P\bullet Q})(\mathbf{Q \bullet X}) \hat{n}_Q} $$
The whole first bracket is just $\mathbf X$ because we are just projecting $\mathbf X$ onto three linearly independent unit vectors and summing them together. This is analogous to writing $\mathbf v = a\mathbf{\hat i}+ b \mathbf{\hat j} +c \mathbf{\hat k}$
So we have:
$$ (\mathbf{|P|^2 |Q|^2} \sin^2 \theta ) \mathbf X + \left(\mathbf Q - \frac{(\mathbf P \bullet \mathbf Q)}{|\mathbf P|^2} \mathbf P \right) (\mathbf P\bullet \mathbf Q)(\mathbf P \bullet \mathbf X) + \left(\mathbf P - \frac{(\mathbf P \bullet \mathbf Q)}{|\mathbf Q|^2} \mathbf Q \right) (\mathbf {P\bullet Q})(\mathbf{Q \bullet X})$$
This is as far as I can get
