I have been trying to simplify equations using Mathematica of the following basic form: $$\text{FullSimplify}\left[x^2+y^2,\text{Assumptions}\to x^2+y^2==c^2\right]$$ With the output being, $$x^2+y^2$$
FullSimplify[x^2 + y^2, Assumptions -> x^2 + y^2 == c^2]
However, if $c$ were a number, the expected result is obtained ie. $c^{2}$. I would like to know how to make Mathematica replace the more complex(as per Leaf count) LHS with the simpler RHS.
expr /. y^2 :> c^2 - x^2
$\endgroup$Simplify[x^2 + y^2, Assumptions -> x^2 + y^2 == m]
returnsm
and then you could replacem
withc^2
in the resulting expression. $\endgroup$FullSimplify[x^2+y^2,TransformationFunctions->{(#/.(x^2+y^2)->c^2)&}]
$\endgroup$