In least squares minimization, we minimize the sum of squares of the residuals: $f = ||b-Ax||_2 ^2 $
The Hessian of this matrix is given by $2A^TA$, and from the Hessian we can do the second partial derivative test for critical points.
Let's say we want to change the objective function: $f_1 = ||b-Ax||_2 ^k$ where $(k \neq 2)$, or $f_2 = exp(||b-Ax||_2 ^2) $. Is there an easy way to calculate the Hessian for these new objective functions?
I'm going to offer two answers here.
First of all, both $f_1$ (for $k>0$) and $f_2$ have exactly the same optimal solution that $f$ does. That is to say, any minimizer of $f$ is going to minimize $f_1$ and $f_2$ as well. There's a reason why $\|b-Ax\|_2^2$ is the go-to objective function for $\ell_2$ norm minimization: because among all of the functions $\phi(\|Ax-b\|_2)$ one could consider, where $\phi$ is a strictly increasing function $\phi(y)=y^2$ is the best choice from a computational perspective, because it yields nice simple derivatives. As we'll see below, your examples $f_1$ and $f_2$ are more complex. Furthermore, for $0<k<1$, the function ceases to be convex, which complicates numerical solution methods.
(Note: if you're adding constraints on $x$, then some solvers are going to prefer $\phi(y)=y$; that is, they will prefer to work with the non-squared norm.)
Now let's assume you are truly determined to compute these derivatives. Given that $f_1$ and $f_2$ are just compositions of $f$ with a simple scalar function, you don't even need the matrix cookbook. A sensible application of the chain rule will suffice. But I agree that if you're going to start working with functions of vectors and matrices, you'll want that resource.
Given $h(x)\triangleq g(f(x))$, where $g$ is a scalar function, we have $$\nabla h(x) = g'(f(x)) \nabla f(x), \quad \nabla^2 h(x) = g''(f(x)) (\nabla f(x))(\nabla f(x))^T + g'(f(x)) \nabla^2 f(x)$$ For $f(x)=\|b-Ax\|_2^2$, we have $$\nabla f(x) = 2A^TAx, \quad \nabla^2 f(x)=2A^TA$$ For $f_1$, we have $$g(y) = y^{k/2} \quad g'(y) = (k/2) y^{k/2-1} \quad g''(y) = (k/2)(k/2-1)y^{k/2-2}$$ For $f_2$, we have $$g(y) = g'(y) = g''(y) = e^y.$$ Therefore, $$\nabla f_1(x) = k\|Ax-b\|_2^{k-2} A^TAx$$ $$\nabla^2 f_1(x) = k(k-2)\|Ax-b\|_2^{k-4} A^TAxx^TA^TA + k\|Ax-b\|_2^{k-2} A^TA$$ and $$\nabla f_2(x) = 2 e^{\|Ax-b\|_2^2} A^TAx$$ $$\nabla^2 f_2(x) = 4 e^{\|Ax-b\|_2^2} A^TAxx^TA^TA + 2 e^{\|Ax-b\|_2^2} A^TA$$ Simplify per your preferences :-)