Show that $\begin{vmatrix} a^2+\lambda &ab &ac \\ ab & b^2+\lambda & bc \\ ac & bc & c^2+\lambda \end{vmatrix}=0$ is divisible by $\lambda^2$ and find the other factor.
My attempt is as follows:-
$$R_1\rightarrow R_1+R_2+R_3$$
$$\begin{vmatrix} a(a+b+c)+\lambda &b(a+b+c)+\lambda &c(a+b+c)+\lambda \\ ab & b^2+\lambda & bc \\ ac & bc & c^2+\lambda \end{vmatrix}=0$$
$$C_1\rightarrow C_1-\dfrac{a}{b}C_2$$ $$C_2\rightarrow C_2-\dfrac{b}{c}C_3$$
$$\begin{vmatrix} \lambda-\dfrac{a\lambda}{b}&\lambda-\dfrac{b\lambda}{c} &c(a+b+c)+\lambda \\ -\lambda & \lambda & bc \\ 0 & -\lambda & c^2+\lambda \end{vmatrix}=0$$
Taking $\lambda^2$ common
$$\lambda^2\begin{vmatrix} 1-\dfrac{a}{b}&1-\dfrac{b}{c} &c(a+b+c)+\lambda \\ -1 & 1 & bc \\ 0 & -1 & c^2+\lambda \end{vmatrix}=0 $$
$$\dfrac{\lambda^2}{bc}\begin{vmatrix} b-a&c-b &c(a+b+c)+\lambda \\ -b & c & bc \\ 0 & -c & c^2+\lambda \end{vmatrix}=0 $$
$$R_1\rightarrow R_1-R_3$$
$$\dfrac{\lambda^2}{bc}\begin{vmatrix} b-a&2c-b &ca+bc \\ -b & c & bc \\ 0 & -c & c^2+\lambda \end{vmatrix}=0$$
$$R_1\rightarrow R_1-R_2$$
$$\dfrac{\lambda^2}{bc}\begin{vmatrix} 2b-a&c-b &ca \\ -b & c & bc \\ 0 & -c & c^2+\lambda \end{vmatrix}=0$$
Now expanding it
$$\dfrac{\lambda^2}{bc}\left(c(2b^2c-abc+abc)+(c^2+\lambda)(2bc-ac+bc-b^2)\right)=0$$
$$\dfrac{\lambda^2}{bc}\left(2b^2c^2+(c^2+\lambda)(3bc-ac-b^2)\right)=0$$ $$\dfrac{\lambda^2}{bc}\left(2b^2c^2+3bc^3-ac^3-b^2c^2+3bc\lambda-\lambda ac-\lambda b^2\right)=0$$ $$\dfrac{\lambda^2}{bc}\left(b^2c^2+3bc^3-ac^3+3bc\lambda-\lambda ac-\lambda b^2\right)=0$$
$$\dfrac{\lambda^2}{bc}\left(c^2(b^2+3bc-ac\right)+\lambda(3bc-ac-b^2)=0$$
So another factor seems to be $\dfrac{1}{bc}\left(c^2(b^2+3bc-ac)+\lambda\left(3bc-ac-b^2\right)\right)$
But actual answer is $a^2+b^2+c^2+\lambda$.
I tried to find my mistake, but everything seems correct. What am I missing here? Please help me in this.
Let me give you a much simpler solution, using the general fact that if $B$ is a square matrix of rank $1$, then $\det({\rm Id}_n+B) = 1+{\rm tr}(B)$. Let $A$ be the matrix you want to compute the determinant of. Then if $v = [a ~ b ~c]^\top$, we have that $A = \lambda{\rm Id}_3 + vv^\top$. This means that $$\begin{align}\det(A) &= \det(\lambda{\rm Id}_3+vv^\top) = \det\left(\lambda\left({\rm Id}_3 + \frac{1}{\lambda}vv^\top\right)\right) \\ &= \lambda^3 \det\left({\rm Id}_3 + \frac{1}{\lambda}vv^\top\right) = \lambda^3\left(1+ {\rm tr}\left(\frac{1}{\lambda}vv^\top\right)\right) \\ &= \lambda^3\left(1+ \frac{\|v\|^2}{\lambda}\right) = \lambda^3 + \lambda^2\|v\|^2 \\ &= \lambda^2(\lambda + \|v\|^2).\end{align}$$