Whenever we have a square root in our function , we find it hard to differentiate hence we square the function and find the value of x such that the function is maximum or minimum.
for example: $$A=x\sqrt{x^{2}-cx}$$ (where c is an arbitrary constant) here we square the function $A^{2}=Z$ and proceed to find for what value of x Z attains maximum or minimum (such that A is maximum or minimum)
But if we have a function like $y=3x+c$ , Y does not have a maximum or minimum as its first derivative doesn't have an x term in it , but if we square the function $y^2=W$ , $9x^{2}+c^{2}+6xc=W$
We introduce new solutions into the equation. My question is , if this method of squaring introduces new solutions how can we spot these kind of "spurious" solutions when we are doing the ones with the square root as mentioned above.