least squares problem SVD consider the least squares problem $$\min_{x\in \mathbb{R}^n} \|Ax - b \|_2^2 + \|Lx \|_2^2, L \in \mathbb{R}^{n\times n}.$$ I am asked to show that the solution of this least squares problem is the same as the solution to
$$(A^TA + L^TL)x = A^Tb$$
My attempt: for the least squares problem $$\|A\hat{x} -b \|_2 = \min_{x \in \mathbb{R}^n} \|Ax - b \|_2 $$ have previously shown that the condition $$A^TA\hat{x} = A^Tb$$ is a necessary and sufficient condition for the minimiser $\hat{x}$ and I have been trying to apply it here, but to no avail.

Let $\tilde{A}= \begin{bmatrix} A \\ L\end{bmatrix}$,
$\tilde{b}= \begin{bmatrix} b \\ 0 \end{bmatrix}$, then the problem reduces
to $\min {1 \over 2} \| \tilde{A} x - \tilde{b} \|$ for which you know the
necessary & sufficient condition for a minimum to be
$\tilde{A}^T (\tilde{A} x- \tilde{b}) = 0$.
Since $\tilde{A}^T  \tilde{A} = A^T A + L^T L$ and
$\tilde{A}^T  \tilde{b} = A^T b$, you have the desired result.
