This question is related to this question here Can't argue with success? Looking for "bad math" that "gets away with it" The question is about ways to get the right answer with incorrect logic/methods.
One of the answers with $104$ score by Hans Engler reads like this
Here's another classical freshman calculus example:
Find $\frac{d}{dx} x^x$.
Alice says "this is like $\frac{d}{dx} x^n = nx^{n−1}$, so the answer is $xx^{x−1}=x^x$." Bob says "no, this is like $\frac{d}{dx} a^x = \log{a}⋅a^x$, so the answer is $\log{x}⋅x^x$." Charlie says "if you're not sure, just add the two terms, so you'll get partial credit".
The answer $\frac{d}{dx} x^x= (1+\log x)x^x$ turns out to be correct.
Joriki in the comments of this answer states that
That's not wrong; that's a perfectly valid method. You get the derivative of any expression with respect to x as the sums of all the derivatives with respect to the individual instances of x while holding all other instances constant.
I am having trouble making sense of his comment, this is what I think it means.
Imagine that the $x$s in $x^x$ were different. Let's call them $x_1$ and $x_2$. Thus, our expression becomes ${x_1}^{x_2}$. I believe his comment is saying that the rate of change of ${x_1}^{x_2} = \frac{\partial}{\partial x_1} {x_1}^{x_2} + \frac{\partial}{\partial x_2} {x_1}^{x_2}$. Each partial derivative evaluates the change in the quantity with respect to a different $x$ and sums them up while keeping the other $x$ constant, just like the comment says. However, I am not sure why this equality is true.