I just begun learning some math and I stumbled upon this issue.. I am currently programming a little game, where I need to deal with intersection of circle and a line and this is where I need standard circle equation like this one:
$$(x-5)^2+(y-5)^2 = 5^2$$
Now I need to expand it into general form, which is:
$$x^2 - 10 x + y^2 - 10 y + 25 = 0$$
This is what WolframAlpha spits and I trust this tool, but I do not understand, how & why EXACTLY it dealt with the right side:
$$5^2$$
Because if I try to simplify my issue as:
$$y=5^2$$
Why Wolfram spits:
$$y - 25 = 0$$
Which was done as:
$$y=25$$
But why it does not do this:
$$y-5^2=0$$
Which would lead to:
$$y+25=0$$
Is it simply, that I should treat 5^2 as variable: (5^2) .. so that it will preserve sign, when transferred?
I only saw people doing it "correctly", but I could not find any evidence, why the latter approach is illegal.
I apologize if this is something very basic, that I am lacking, but I am unable to find a cure, so thanks a lot for possible help.
The exponent is evaluated first. You have the following order of evaluation:
source
Meaning $-5^2$ is evaluated to $-25$. $(-5)^2$ would be evaluated to $25$.
Edit: As I have already mentioned in the comments, order of evaluation is not only important for evaluating equations or an arithmetic operations, but for mathematical expressions in general.