<s>[INST] Express the value of $s\left(m\right)=\frac{1}{a^2}+\frac{1}{b^2}+\frac{1}{c^2}+\frac{1}{d^2}$ in terms of $m$. The previous question was: Find the range such that the equation $|x^2 -3x +2|=mx $ has 4 distinct real solutions: $a,b,c,d$, and that turned out to be $0<m<3-2\sqrt{2}$. The book says that the solution is $\frac{m^2+5}{2}$. I have been trying to express $a$ and $b$ as the two possible results from the quadratic equation resulting from $x^2−3x+2=mx$, and $c$ and $d$ as the ones from the equation $x^2−3x+2=-mx$, and plugging that into $\frac{1}{a^2}+\frac{1}{b^2}+\frac{1}{c^2}+\frac{1}{d^2}$, yet I do not see how a complicated expression can end up being the answer given by the book. Therefore I am sure I must be doing something wrong. 
 [/INST] Hint:  $a+b=m+3$ and $ab=2$ by Vieta's relations for $x^2-(m+3)x+2=0\,$, so: 
$$\frac{1}{a^2}+\frac{1}{b^2}=\frac{a^2+b^2}{a^2b^2} = \frac{(a+b)^2-2\cdot ab}{(ab)^2}=\frac{(m+3)^2-2 \cdot 2}{2^2}=\frac{m^2+6m+5}{4}$$
Repeat the similar calculation for $\,\cfrac{1}{c^2}+\cfrac{1}{d^2}\,$, then add them up.
</s>